Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

On my Debian Wheezy system, I used to start my X session with the startx command.

My .xinitrc file is:

exec /usr/bin/awesome --config /home/cscs/.config/awesome/rc.lua >> ~/.cache/awesome/stdout 2 >> ~/.cache/awesome/stderr

Is there an other way to implement this using trap "" INT somewhere? I had no success catching the CTRL+C sequence, my X server exited with the message: unexpected signal 2.

Login managers (slim, gdm, kdm, etc.) are not applicable.

share|improve this question

migrated from superuser.com Apr 11 '13 at 20:20

This question came from our site for computer enthusiasts and power users.

    
Migrated on request of the OP. (Your question would have been fine to stay on Super User as well, just FYI.) –  slhck Apr 11 '13 at 20:20

1 Answer 1

up vote 1 down vote accepted

There is no need to use trap here. You actually want to make xinit run WITHOUT a terminal, thus making SIGINT to be avoided after CTRL-C.

Run X server like this:

startx & disown; exit

and edit /etc/X11/Xwrapper.config so that a specific user can run X.

share|improve this answer
    
With zsh and bash, you can do this instead: startx &! exit. I believe other shells--I'm not sure which ones--support this syntax as well. –  paraxor Apr 20 '13 at 1:49
    
Thank you for improving my answer. –  Rany Albeg Wein Apr 20 '13 at 15:41

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.