dot bash_logout

Dieter Van Eessen <[email protected]> Mon, 5 Jan 2015 14:49:05 +0100
Newsgroups gmane.comp.window-managers.ratpoison.devel
Message-ID <CAC2TPPi1Vqy9-iSRLecSC4fyQEDsa-EiMZFA+zr=oLd6q3Lvdw@mail.gmail.com>
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
[email protected]
https://lists.nongnu.org/mailman/listinfo/ratpoison-devel