PDA

View Full Version : [ubuntu] 9.04 Jaunty won't source .xsession or .xinitrc



mpbb77
April 20th, 2009, 02:39 AM
I've posted this bug in launchpad some weeks ago but got no reply whatsoever.

Did anyone notice that since upgrading to Jaunty from Ibex, the .xsession file is not sourced or is it just me ??

Actually I've noticed as I had monicarc in my xinitrc to correct my gamma settings, and it worked fine until jaunty beta.

Doing some research I actually discovered that I hadn actually any .xsession file but manifestly .xinit would still be sourced by gdm as monicarc would be called by graphic login.

I thought creating an .xsession link to .xinitrc would solve the issue but nope.

I'm surprised that such a bug would pass unnoticed. So I'm still trying to find up what is special about setup, though a have a pretty much vanilla distro.

mpbb77
April 21st, 2009, 05:18 PM
wow. i'm more and more impressed

apparently noone cares about this or got this issue

maybe the solution is to have a new user account, etc... the usual stuff adviced when you have been upgrading since gutsy...

dunno, seems like ubuntu is straying from its strength, ie not breaking things...

peletiah
April 26th, 2009, 10:46 PM
i have the same problem after upgrading yesterday, used it to launch gnome-session for xmonad, was looking for a fix when i stumbled over your post(which seems to be the only one mentioning the problem on the ubuntu-forums)...

mpbb77
May 3rd, 2009, 04:02 PM
Yes, the problem remains and I have your confirmation, found another post from march (the guy also did not receive any response) and someone confirmed the bug I posted in launchpad (then the only feedback I got from the maintainers was that I was double filing the bug in xinit and xorg...)

So apparently this is real. I can't understand that the ubuntu maintainers are leaving this bug open for the last month... How many people out there have path definitions and other program being launched from xsession ??

I' m thinking that I'll have to switch back to the dreaded opensuse after 3 years, seems like they solved their nightmarish zen/yast issues. Anyway never more participating any ubuntu beta or rc program (it was my first try, thanks that I refrained from entering alpha)

Brandon Williams
May 4th, 2009, 02:55 AM
Looking through the scripts in /etc/X11/Xsession.d/, it looks like the expected filename is .xsessionrc. The file .xsession will be executed as a /bin/sh script if no other session has already been selected. The .xsessionrc file will be sourced if it exists and is readable.

mpbb77
May 7th, 2009, 11:29 PM
Well, it does seem from the scripts that some $userxsesssion or $altuserxsession is to be sourced also but don t know why , and haven gone deeper as i'm not expert on permissions at startup, etc...

Brandon Williams
May 8th, 2009, 04:39 AM
Actually, no ...

USERXSESSION (.xsession) or ALTUSERXSESSION (.Xsession) will be used as the startup command if it exists and there is no other startup command specific. If you start a gnome session, for example, then neither of those two will be used, because you have specified a higher priority startup command.

On the other hand, USERXSESSIONRC (.xsessionrc) is always sourced, no matter what startup command you are using. If you want environment variables to be set no matter which session type you select, then you should set those variables in .xsessionrc, not .xsession or .Xsession.

As far as I can tell, this has been true at least since Hardy (I don't have any earlier versions to check). If .xinitrc is being sourced in Intrepid, I can't identify what is doing it. That file is only supposed to be used when you are not using Xsession ... only when you're running startx from the command line in a console login.

mpbb77
May 15th, 2009, 08:45 PM
Tx Brandon

You may be right, at least i canīt tell since I hadnīt any .xsession in my system under Intrepid. Only that .xinitrc that as I īve told was being sourced.

Iīm curious about waht is installed theses days from the CD, or still no .xsession(rc) by default ?

Do people know that .xsessionrc is the way to go ? I think that you can see a lot of posts mentioning .xsession or even the wiki https://wiki.ubuntu.com/CustomXSession.

Brandon Williams
May 15th, 2009, 10:31 PM
The wiki post that you link to uses .xinitrc and .xsession exactly as I expect them to be used, that is, they are executed, not sourced. Is this possibly just a terminology problem?

The files .xsessionrc and .xprofile are sourced by Xsession, and they are intended to impact any type of session that you start via a graphical login like gdm or xdm. If you are expecting the file to be sourced no matter which session type you choose in the GDM session selector, then you should name it .xsessionrc or .xprofile.

On the other hand, .xinitrc and .xsession are both intended to be executed, not sourced, and they are expected to start all programs that are required for a fully functioning X session. The .xsession file completely takes the place of the system-wide session startup programs. The howto that you link to uses .xsession in just this way, and explains that you have to select a different session for your GDM login in order to have your .xsession file executed. If this is how you are expecting your .xsession file to work, then you must select 'Run Xclient script' as your session type in GDM. If you do that, it will work as you intend.

In any case, all of these files appear to be working exactly as intended in Hardy, Intrepid, and Jaunty. I think it's just a matter of clarifying what each one is intended to do.

mystdragon
September 23rd, 2009, 09:36 PM
you must select 'Run Xclient script' as your session type in GDM

I've spent the last two days trying to get my .xsession to be read, and I missed this option, instead looking for "xsession" or "default session" as described by The XMonad FAQ for getting gdm/kdm/xdm to run .xsession (http://haskell.org/haskellwiki/Xmonad/Frequently_asked_questions#How_can_I_use_xmonad_wi th_a_display_manager.3F_.28xdm.2C_kdm.2C_gdm.29)

Thanks, this was helpful.

mystdragon
September 25th, 2009, 02:51 AM
I spoke too soon. Using the xclients script option works for Hardy Heron. Not for Jaunty. Which is fine, I've got one computer to work now, but I will have to keep searching for a solution.