ratpoison-devel
[Top][All Lists]
Advanced

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

Re: [RP] dot bash_logout


From: Jeff Abrahamson
Subject: Re: [RP] dot bash_logout
Date: Mon, 5 Jan 2015 19:16:31 +0100

Hi, Dieter. Welcome to ratpoison-devel !

The last time I traced through startx, there was an exec along the way in one of the file that it sourced, maybe ~/.xsession, but I forget the precise details. So the reason you wouldn't run .logout or return to your non-X shell is simply that the exec happens and so you can't.

IIRC, changing that is not hard per se, but would require changing stuff (like startx itself) that isn't meant to be customized, meaning a future upgrade might change it back on you. More precisely, you'd delete the word "exec" and then probably call wait afterwards.

The emacs server does have one thing to do with your window manager: it runs under X. ;-)  My advise would be to use the quit hook. OTOH, you can keep the config separate by putting in a startup / stop script and calling that from your quit hook.


Jeff Abrahamson
+33 6 24 40 01 57
+44 7920 594 255    <-- only if I'm in the UK

http://jeff.purple.com/
http://blog.purple.com/jeff/


On 5 January 2015 at 14:49, Dieter Van Eessen <address@hidden> wrote:

Hello,

Just joined the list. Got a question regarding the shutdown of ratpoison and xserver.
At the moment I'm working with debian 8 and I 'startx' in .profile after which I configure keyboard, visuals and start ratpoison in .xinitrc.

Quitting ratpoison results in shutdown of xserver (last client has finished) and a log out of the system. All behavior in the last sentence is default.
 if [ -z "$DISPLAY"] && [ $(tty) = /dev/tty1 ]; then
     exec startx
 fi
Been using this for a while and I'm happy with it :)

Now I've considered starting an emacs-daemon when I login (personal preference) in .profile and I would like to shut it down when logging out. I've added emacsclient -e '(kill-emacs)' to .bash_logout to shut it down. This command seems to work fine when I log in and exit in another tty (eg. tty2).

But when I log in on a tty which automatically starts an X-server, the commands in .bash_logout doesn't seem to have any effect when the shutdown of the X-server forces you to log out.

Thus the following questions:
-Why does :quit ting ratpoison shut down the X-server? Most likely answer is because ratpoison is it's last client... but I'm not sure. It would be usefull to remain on console where the configs provided by xmodmap (and xrdb) are still available.

-Why shutting down the X-server result in logging off? Xserver is 'just a program' started when logging in, why don't I return to the tty console where I am logged in?

-After x-server shuts down, it forces the log out somehow. Why doesn't this logout take the commands in .bash_logout? After all, you are logging out of a login-shell.


That's about it...
I'd prefer NOT to tweak things with the ratpoison 'quit'-hook: The emacs-server has got nothing to do with my window manager so I'd like to keep their configurations (startup, stop,...) separated.
(If I wasn't so depending on conkeror web browser to view pdf's and websites, I'd only need the xserver for it's xmodmap...)

--
gtz,
Dieter VE

_______________________________________________
Ratpoison-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/ratpoison-devel



reply via email to

[Prev in Thread] Current Thread [Next in Thread]