logout of X session from a command line interface?
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
logout of X session from a command line interface?
Hello eveyone,
I've just a quick question: here at uni, we have some red hat enterprise boxes installed. At the moment, the IT department are upgrading from RHEL 3 to 4 (I think) and this is causing some problems. One of these problems manifests itself by not producing the taskbar (for wont of a better word) and therefore we have no button to click on to log out of the current X session. We can still however open a terminal by right clicking on the desktop, which does appear.
Therefore I was wondering if there's a command which can be issued in the terminal which will exit the current session. I know that ctrl+alt+backspace will restart the X server, but I was wondering if there was a "cleaner" way of doing it.
If you are using a recent release of KDE, you can use Ctrl+Alt+Shift+Delete to logout and Alt+F1 to access the KMenu from which, you can select to log out.
Thanks kevkim55. Unfortunately they're setup to run Gnome by default, although we have the option of KDE at login, invariably no one chooses it. I should have mentioned that in my original post; sorry.
unfortunately in gnome I can only place a button to log out on the taskbar itself, not on the desktop. if i could "look inside" the logout button and find out what command it executes when you click it, then i could create a new shortcut to that command on the desktop, but i don't know what the command is...
logout is a command you can use, not sure if you have to be in a text run level (and using startx to run x), likewise may be the case with ctrl-alt-backspace
You could just kill -TERM GNOME or the X server. That should be a bit cleaner than Ctrl-Alt-Backspace (the sig will be passed to any X apps running, giving them the opportunity to exit cleanly, as opposed to the (presumably abnormal) termination that occurs when they get the SIGPIPE from the broken X socket). I think.
since this seems to be some sort of gnome error (since it's the taskbar that doesn't appear), would renaming .gnome to .gnome.old resolve the error? as far as I'm aware, if gnome is started and it can't find and existing .gnome folder, then it creates a new one. this is a list of the folders in ~ that are related to gnome:
.gnome
.gnome2
.gnome2_private
.gnome-desktop
any suggestions on which one is likely to hold the (presumably) corrupt file?
would renaming .gnome to .gnome.old resolve the error?
It could certainly be some sort of configuration problem, so this is worth a try. I've no idea how gnome stores it's data, so I don't know which is the most likely directory to be causing the problem, but you can easily rename them all at once with the rename command, e.g.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.