VectorLinux

Please login or register.

Login with username, password and session length
Advanced search  

News:

Visit our home page for VL info. For support and documentation, visit the Vector Linux Knowledge Center or search the Knowledge Center and this Forum using the search box above.

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

roarde

  • Vectorian
  • ****
  • Posts: 610
  • 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, 10:22:11 pm by sixforty »
Logged
Robert
VL 7.1 Light

bigpaws

  • Vectorian
  • ****
  • Posts: 1869
Re: How to read user's profile when using an x-display manager?
« Reply #1 on: October 01, 2010, 05:58:02 am »

Look at /etc/profile.

Bigpaws
Logged

roarde

  • Vectorian
  • ****
  • Posts: 610
  • move the needle
Re: How to read user's profile when using an x-display manager?
« Reply #2 on: October 01, 2010, 08: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?
Logged
Robert
VL 7.1 Light

bigpaws

  • Vectorian
  • ****
  • Posts: 1869
Re: How to read user's profile when using an x-display manager?
« Reply #3 on: October 01, 2010, 12:27:46 pm »

~/.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
Logged

roarde

  • Vectorian
  • ****
  • Posts: 610
  • move the needle
Re: [SOLVED] How to read user's profile when using an x-display manager?
« Reply #4 on: October 01, 2010, 10: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.
Logged
Robert
VL 7.1 Light