:: Re: [DNG] desktop environment indep…
Etusivu
Poista viesti
Vastaa
Lähettäjä: Florian Zieboll
Päiväys:  
Vastaanottaja: dng
Aihe: Re: [DNG] desktop environment independent logout tool
On Thu, 19 May 2016 13:51:11 +0200
<emninger@???> wrote:

> Is there somewhere a desktop independent tool, to logout from an
> xsession (and even better: with a suspend and reboot command too :)
> )?
>
> I tried with lxde-logout in a jwm desktop, but apparently that
> does not work.
>
> I also tried a script (found in arch), called oblogout (which
> originally came from crunchbang (which was debian based). But that
> didn't do the job too.
>
> But probably, i'm doing something wrong (?)
>
> I'd be happy for any suggestion!



Here a quick "universal logout" hack for slim:

### file: /etc/slim.conf
(...)
login_cmd    export slim_session=%session && exec /root/lwrap.sh
(...)



### file: /lwrap.sh
#!/bin/bash
/bin/bash -login /etc/X11/Xsession $session


### file /universal_logout.sh
#!/bin/bash
kill -s 15 `ps aux | grep lwr[a-z]p.sh | awk '{print $2}'`


Slim needs to be restarted; then, after successfully logging in, just
execute /root/universal_logout.sh to return to slim's login screen.

Florian