View previous topic :: View next topic |
Author |
Message |
attenpeter n00b
Joined: 25 Nov 2006 Posts: 33
|
Posted: Thu Apr 12, 2007 7:38 pm Post subject: XSESSION in /etc/rc.conf |
|
|
Hi,
what I was trying to do was to set up a default Xsession for users that don't have a ~/.xsession... Sounds like a simple task, but in fact, it isn't, at least with gentoo...
in /etc/rc.conf theres a variable called XSESSION which is intended to be used for this purpose: "This is basically used as a way for the system admin to configure a default system wide WM, [...]"
but it doesn't work very well, because it is ALWAYS used, if it is set to prevent kdm from crashing... so even if a user has his .xsession it won't be used because XSESSION was set...
Now i have two questions:
a) Is there another elegant way to do what i want or do i have to edit the /etc/X11/chooser (as i now did and it kinda works)?
b) Isn't it a bit, well excessive , to break the purpose of this variable just because one package (fscking kdm) behaves badly?
cu |
|
Back to top |
|
|
Bones McCracker Veteran
Joined: 14 Mar 2006 Posts: 1611 Location: U.S.A.
|
Posted: Fri Apr 13, 2007 12:09 am Post subject: |
|
|
From what the rc.conf comments say, if the variable is set in rc.conf, the user's .xsession won't be used. However, it also says the user could export the variable (i.e. the bash profile).
If that's so, to define a default the user can easily change, you could put it in /etc/skel/.bash_profile. To make it really obvious to the user, you could create an /etc/skel/.X_session (or whatever) and then add to /etc/skel/.bash_profile a line like Code: | [ -e ./.X_session ] && source ./.X_session | (/etc/skel/.X_session would just have to include a one-line export of XSESSION)
Then, if the new user does nothing, the default is in place. If they delete ~/.X_session, it will fall back to the /etc/rc.conf XSESSION setting. And they can easily identify and change the very visible ~/.X_session file their preference (guided by your helpful comments in that file).
You could even name the file .xsession, but that might lead to confusion -- or errors if you later decide to un-set XSESSION in /etc/rc.conf.
or
You could simply not set it in rc.conf and instead put a .xsession file in /etc/skel |
|
Back to top |
|
|
bunder Bodhisattva
Joined: 10 Apr 2004 Posts: 5937
|
Posted: Fri Apr 13, 2007 2:39 pm Post subject: |
|
|
what about /etc/conf.d/xdm? _________________
Neddyseagoon wrote: | The problem with leaving is that you can only do it once and it reduces your influence. |
banned from #gentoo since sept 2017 |
|
Back to top |
|
|
attenpeter n00b
Joined: 25 Nov 2006 Posts: 33
|
Posted: Fri Apr 13, 2007 3:02 pm Post subject: |
|
|
hmm haven't thought of skeletons thanks...
@bunder: what do you mean? is there a way I can specify a default session for xdm to use in /etc/conf.d/xdm? (I looked at that file but didn't found any comments pointing in that direction...) That would be even more convenient...
EDIT: fixed typos |
|
Back to top |
|
|
bunder Bodhisattva
Joined: 10 Apr 2004 Posts: 5937
|
Posted: Fri Apr 13, 2007 5:19 pm Post subject: |
|
|
attenpeter wrote: | is there a way I can specify a default session for xdm to use in /etc/conf.d/xdm? |
its a new addition, i think they want us to move away from using rc.conf.
http://www.gentoo.org/news/en/gwn/20061127-newsletter.xml#doc_chap2 _________________
Neddyseagoon wrote: | The problem with leaving is that you can only do it once and it reduces your influence. |
banned from #gentoo since sept 2017 |
|
Back to top |
|
|
|