LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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


Reply
  Search this Thread
Old 05-02-2006, 05:21 AM   #1
pwc101
Senior Member
 
Registered: Oct 2005
Location: UK
Distribution: Slackware
Posts: 1,847

Rep: Reputation: 128Reputation: 128
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
 
Old 05-02-2006, 05:28 AM   #2
kevkim55
Member
 
Registered: Dec 2005
Location: Edmonton
Distribution: BLFS, Gentoo
Posts: 353

Rep: Reputation: 32
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.
 
Old 05-02-2006, 05:35 AM   #3
pwc101
Senior Member
 
Registered: Oct 2005
Location: UK
Distribution: Slackware
Posts: 1,847

Original Poster
Rep: Reputation: 128Reputation: 128
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.
 
Old 05-02-2006, 05:38 AM   #4
kevkim55
Member
 
Registered: Dec 2005
Location: Edmonton
Distribution: BLFS, Gentoo
Posts: 353

Rep: Reputation: 32
Why not create a shortcut to logout and place it on desktop ?
 
Old 05-02-2006, 06:33 AM   #5
pwc101
Senior Member
 
Registered: Oct 2005
Location: UK
Distribution: Slackware
Posts: 1,847

Original Poster
Rep: Reputation: 128Reputation: 128
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...
 
Old 05-02-2006, 07:40 AM   #6
ethics
Senior Member
 
Registered: Apr 2005
Location: London
Distribution: Arch - Latest
Posts: 1,522

Rep: Reputation: 45
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
 
Old 05-02-2006, 07:48 AM   #7
ioerror
Member
 
Registered: Sep 2005
Location: Old Blighty
Distribution: Slackware, NetBSD
Posts: 536

Rep: Reputation: 34
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.
 
Old 05-02-2006, 07:50 AM   #8
ioerror
Member
 
Registered: Sep 2005
Location: Old Blighty
Distribution: Slackware, NetBSD
Posts: 536

Rep: Reputation: 34
Quote:
logout is a command you can use,
logout is a shell builtin which exits the shell, nothing to do with X.
 
Old 05-02-2006, 07:53 AM   #9
ioerror
Member
 
Registered: Sep 2005
Location: Old Blighty
Distribution: Slackware, NetBSD
Posts: 536

Rep: Reputation: 34
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.
 
Old 05-02-2006, 11:50 AM   #10
pwc101
Senior Member
 
Registered: Oct 2005
Location: UK
Distribution: Slackware
Posts: 1,847

Original Poster
Rep: Reputation: 128Reputation: 128
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
 
Old 05-02-2006, 12:01 PM   #11
ioerror
Member
 
Registered: Sep 2005
Location: Old Blighty
Distribution: Slackware, NetBSD
Posts: 536

Rep: Reputation: 34
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can only use command line interface! The helpless one Linux - Newbie 6 03-12-2006 03:42 PM
Command line through a web interface tangle Linux - Software 2 01-13-2005 02:54 PM
Can't get from command line interface to GUI dphildebrand Linux - Newbie 3 12-03-2003 01:51 PM
RHL9.0 hangs when logout/exit command line mellsie25 Linux - Newbie 7 10-17-2003 09:30 PM
Question: How do you cleanly logout of X using command line? tzeng865 Linux - General 15 01-31-2003 02:16 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:51 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration