Linux - Software This 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
05-02-2006, 05:21 AM
|
#1
|
Senior Member
Registered: Oct 2005
Location: UK
Distribution: Slackware
Posts: 1,847
Rep: 
|
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.
Thanks in advance
|
|
|
05-02-2006, 05:28 AM
|
#2
|
Member
Registered: Dec 2005
Location: Edmonton
Distribution: BLFS, Gentoo
Posts: 353
Rep:
|
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.
|
|
|
05-02-2006, 05:35 AM
|
#3
|
Senior Member
Registered: Oct 2005
Location: UK
Distribution: Slackware
Posts: 1,847
Original Poster
Rep: 
|
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.
|
|
|
05-02-2006, 05:38 AM
|
#4
|
Member
Registered: Dec 2005
Location: Edmonton
Distribution: BLFS, Gentoo
Posts: 353
Rep:
|
Why not create a shortcut to logout and place it on desktop ?
|
|
|
05-02-2006, 06:33 AM
|
#5
|
Senior Member
Registered: Oct 2005
Location: UK
Distribution: Slackware
Posts: 1,847
Original Poster
Rep: 
|
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...
|
|
|
05-02-2006, 07:40 AM
|
#6
|
Senior Member
Registered: Apr 2005
Location: London
Distribution: Arch - Latest
Posts: 1,522
Rep:
|
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
|
|
|
05-02-2006, 07:48 AM
|
#7
|
Member
Registered: Sep 2005
Location: Old Blighty
Distribution: Slackware, NetBSD
Posts: 536
Rep:
|
Quote:
but i don't know what the command is...
|
There is no specific command to exit X, not external anyway (at least not that I know of). It would be an internal function of the wm.
|
|
|
05-02-2006, 07:50 AM
|
#8
|
Member
Registered: Sep 2005
Location: Old Blighty
Distribution: Slackware, NetBSD
Posts: 536
Rep:
|
Quote:
logout is a command you can use,
|
logout is a shell builtin which exits the shell, nothing to do with X.
|
|
|
05-02-2006, 07:53 AM
|
#9
|
Member
Registered: Sep 2005
Location: Old Blighty
Distribution: Slackware, NetBSD
Posts: 536
Rep:
|
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.
|
|
|
05-02-2006, 11:50 AM
|
#10
|
Senior Member
Registered: Oct 2005
Location: UK
Distribution: Slackware
Posts: 1,847
Original Poster
Rep: 
|
thanks ioerror. i'll give it a go.
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?
thanks
|
|
|
05-02-2006, 12:01 PM
|
#11
|
Member
Registered: Sep 2005
Location: Old Blighty
Distribution: Slackware, NetBSD
Posts: 536
Rep:
|
Quote:
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.
Code:
rename gnome gnome-old .gnome*
Last edited by ioerror; 05-02-2006 at 12:03 PM.
|
|
|
All times are GMT -5. The time now is 05:51 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|