[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: startx + ~/.xsession and no ~/.xinitrc, results in reduced functionality (xfce4, sid)



Charlie wrote:
> On Thu, 12 Dec 2013 17:23:31 +1100 Zenaan Harkness sent:
> 
> > My .xsession is mode 755 and contains:
> > ---
> > #!/bin/bash --login
> > exec ck-launch-session startxfce4
> 
> I may be wrong but shouldn't that be .xsessionrc?

No it really should be ~/.xsession.  This can be deduced by inspecting
the /etc/X11/Xsession.d/50x11-common_determine-startup file.  Or see
the man page such as these snippets from it.

  $ man Xsession

       /etc/X11/Xsession.d/40x11-common_xsessionrc
              Source global environment variables.  This  script  will  source
              anything  in  $HOME/.xsessionrc  if  the  file  is present. This
              allows the user to set global environment variables for their  X
              session, such as locale information.

       /etc/X11/Xsession.d/50x11-common_determine-startup
              Determine  startup  program.  The X client to launch as the con-
              trolling process (the one  that,  upon  exiting,  causes  the  X
              server  to  exit  as  well) is determined next.  If a program or
              failsafe argument was given and is allowed (see  above),  it  is
              used  as  the  controlling  process.   Otherwise,  if  the  line
              ‘allow-user-xsession’  is   present   in   Xsession.options,   a
              user-specified session program or script is used.  In the latter
              case, two historically popular names for user X session  scripts
              are  searched for: $HOME/.xsession and $HOME/.Xsession (note the
              difference in case).  The first  one  found  is  used.   If  the
              script  is  not executable, it is marked to be executed with the
              Bourne shell interpreter, sh.  Finally, if  none  of  the  above
              succeeds,    the    following   programs   are   searched   for:
              /usr/bin/x-session-manager,    /usr/bin/x-window-manager,    and
              /usr/bin/x-terminal-emulator.   The first one found is used.  If
              none are found, Xsession aborts with an error.

And so we see that ~/.xesssionrc is intended to be used to set
variables.  Therefore almost anything in the .profile or .bashrc should
be reasonable.

But for X session scripts such as starting xfce then the ~/.xsession
script is the documented interface.  (However I would be the first to
volunteer that the above is a complicated description!  It is
accurate.  But now you know why I think reading the script itself is
simpler than the documentation of it.)

Bob

Attachment: signature.asc
Description: Digital signature


Reply to: