Please support VectorLinux!

Author Topic: [SOLVED] How to read user's profile when using an x-display manager?  (Read 1167 times)

roarde

  • Vectorian
  • ****
  • Posts: 584
  • move the needle
I'm looking for a place to store common settings that a user will want for any ?dm-initiated session, no matter which window manager is selected. Also useful would be a place to store settings a user will want for any session -- whether text, dm, or startx.

Are there existing scripts in VL, especially light, that source /etc/xprofile and/or ~/.xprofile, for starters?
« Last Edit: October 01, 2010, 09:22:11 pm by sixforty »
Robert
VL Light RC 1.2

bigpaws

  • Vectorian
  • ****
  • Posts: 1868
Re: How to read user's profile when using an x-display manager?
« Reply #1 on: October 01, 2010, 04:58:02 am »
Look at /etc/profile.

Bigpaws

roarde

  • Vectorian
  • ****
  • Posts: 584
  • move the needle
Re: How to read user's profile when using an x-display manager?
« Reply #2 on: October 01, 2010, 07:18:17 am »
Thank you, bigpaws, but I'm looking for a standard way of doing this on a per-user basis. /etc/profile checks mail, unless overridden by a shell-dependent startup file, as an example. So how might it be done on a non-shell-dependent basis for each user; let a user choose their own LANG rather than the system-set language, for example?
Robert
VL Light RC 1.2

bigpaws

  • Vectorian
  • ****
  • Posts: 1868
Re: How to read user's profile when using an x-display manager?
« Reply #3 on: October 01, 2010, 11:27:46 am »
~/.profile
~/.bachrc

All of my scripts and such are in ~/.profile 

This may help as well:

http://www.cyberciti.biz/faq/howto-customizing-unix-linux-user-account/#comments

HTH

Bigpaws

roarde

  • Vectorian
  • ****
  • Posts: 584
  • move the needle
Re: [SOLVED] How to read user's profile when using an x-display manager?
« Reply #4 on: October 01, 2010, 09:33:27 pm »
Before switching to VL, I always used .profile and $ENV. Thing is, .profile wasn't being sourced when I first installed VL. I recently ruined that installation ( user data stayed intact :) ) and reinstalled light. .profile still wasn't being sourced when session started from kdm. Since I wanted to see what gdm and xdm would do, I ran vxdmset. Gdm sourced .profile and .xprofile, and xdm sourced .profile twice, then .xprofile. Since I'm used to looking at kdm, I switched it back with vxdmset. Kdm started sourcing both .profile and .xprofile.

Apparently, I didn't run across vxdmset during two installs. Running it causes kdm to source the files correctly, and that solves my problem.

Thanks Bigpaws. Just took me a while to see it because it wasn't working as documented. Now to move the stuff that various scripts put in .bashrc that should be in .profile.
Robert
VL Light RC 1.2