Re: [i3]Not able to get the reboot/suspend script work.
- To: debian-user@lists.debian.org
- Subject: Re: [i3]Not able to get the reboot/suspend script work.
- From: Brian <ad44@cityscape.co.uk>
- Date: Tue, 1 Apr 2014 10:04:11 +0100
- Message-id: <[🔎] 20140401090410.GL3271@copernicus.demon.co.uk>
- In-reply-to: <CA+Jf9AHjWfLV2DrpiwZ0jc=Y41guk5cc+xYG11z4r0hS5arCuQ@mail.gmail.com>
- References: <CA+Jf9AGY8ETiJux_TRQObsJp+QyuuVyzXRa22k4BLePARpFqFw@mail.gmail.com> <87wqfb7h3e.fsf@lpt00.freehck.ru> <CA+Jf9AHQp87PcwX6EdUMwy6UeaAo5M3gkYRqv6zEOUumrNRy0Q@mail.gmail.com> <87sipz6ib1.fsf@lpt00.freehck.ru> <CA+Jf9AHdtUxk19_rP0V37kzUO98JCuYAN4bzHUgvaEAd8NHeug@mail.gmail.com> <87lhvq7kto.fsf@lpt00.freehck.ru> <20140331183538.GJ3271@copernicus.demon.co.uk> <CA+Jf9AHjWfLV2DrpiwZ0jc=Y41guk5cc+xYG11z4r0hS5arCuQ@mail.gmail.com>
On Tue 01 Apr 2014 at 01:45:59 +0530, Anubhav Yadav wrote:
> > Lightdm also uses /etc/X11/Xsession, which does a lot more than starting
> > a window manager. However, it does source ~/.xsession.
>
> I created an .xsession and the contents were as follows:
>
> #!/bin/bash
> # Set PATH
> PATH=$HOME/bin:$PATH
The basic problem is that lightdm in Debian hard-codes the path
https://launchpadlibrarian.net/94971962/01_set-default-path.patch
and there appears to be no system-wide way to alter it from within
lightdm. It doesn't matter what WM is used - a *user* has little choice
but to alter $PATH by employing the facilities provided by X.
If line above is the only line in your .xsession you would be very lucky
to get any WM up and running.
A working .xsession (after reverting all you have done in /etc/lightdm
and elsewhere) is executable and would contain
export PATH=$HOME/bin:$PATH
xterm &
exec /usr/bin/i3
Personally I would follow the suggestion given in
https://lists.debian.org/debian-user/2014/03/msg01691.html
to use .xsessionrc to hold 'export PATH=$HOME/bin:$PATH' because it is
an environment variable. Please see Xsession(5)
> Yet I am not able to call my i3exit script ( which I have stored in
> ~/bin directory)
> from i3. Because somehow the PATH variable is not set according to either i3
> or according to lightdm. I also have other problems with lightdm, which I would
> like to discuss but lets stay on the topic for now.
There is another approach: If it was decided by the *administrator* that
*all* users were to have access to suspending, shutting down etc the
machine then the script could reside in /usr/local/bin.
Reply to: