LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 02-07-2012, 04:33 PM   #1
LAPIII
Member
 
Registered: Mar 2009
Location: Virginia, US
Distribution: Ubuntu 10.10 & Debian 6.0.3,
Posts: 350

Rep: Reputation: 7
How do I log out via terminal?


I know how to sudo reboot & sudo shutdown -h now, but not logout!

Last edited by LAPIII; 02-07-2012 at 05:03 PM.
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 02-07-2012, 05:05 PM   #2
klearview
Member
 
Registered: Aug 2006
Location: London
Distribution: Debian, Kubuntu
Posts: 572

Rep: Reputation: 75
exit
 
2 members found this post helpful.
Old 02-07-2012, 05:16 PM   #3
LAPIII
Member
 
Registered: Mar 2009
Location: Virginia, US
Distribution: Ubuntu 10.10 & Debian 6.0.3,
Posts: 350

Original Poster
Rep: Reputation: 7
I meant logout & go to the login screen.
 
Old 02-07-2012, 05:25 PM   #4
klearview
Member
 
Registered: Aug 2006
Location: London
Distribution: Debian, Kubuntu
Posts: 572

Rep: Reputation: 75
Quote:
Originally Posted by Advice Pro View Post
I meant logout & go to the login screen.
If you enter 'exit' in the terminal, you go to the login screen. If you meant terminal emulator or SSH connection - that's a different matter.
 
Old 02-07-2012, 05:38 PM   #5
LAPIII
Member
 
Registered: Mar 2009
Location: Virginia, US
Distribution: Ubuntu 10.10 & Debian 6.0.3,
Posts: 350

Original Poster
Rep: Reputation: 7
I guess exit just won't work in 11.10 with these configurations:


Code:
sudo apt-get install gnome-session-fallback

sudo add-apt-repository ppa:jconti/gnome3

sudo apt-get update

sudo apt-get install indicator-applet indicator-applet-complete indicator-applet-session
 
Old 02-08-2012, 10:51 PM   #6
kmkswamy
LQ Newbie
 
Registered: Feb 2012
Posts: 2

Rep: Reputation: Disabled
Wink

or just use Ctrl+d to logout.
 
Old 02-09-2012, 12:29 AM   #7
widget
Senior Member
 
Registered: Oct 2008
Location: S.E. Montana
Distribution: Debian Testing, Stable, Sid and Manjaro, Mageia 3, LMDE
Posts: 2,628

Rep: Reputation: 497Reputation: 497Reputation: 497Reputation: 497Reputation: 497
Ctrl+d takes you out of your terminal.

exit certainly does not work for me either. Hardly ever log out but thought I would give it a whack.

I use Debian testing so I don't think there should be much difference in terminal commands like this. I use plain halt in my root terminal to shut down.

Last edited by widget; 02-09-2012 at 12:33 AM.
 
Old 04-25-2012, 09:36 AM   #8
spezticle
Member
 
Registered: May 2010
Distribution: Ubuntu 10.04
Posts: 30

Rep: Reputation: 0
Code:
gnome-session-save --logout
or
Code:
gnome-session-save --force-logout
or
Code:
gnome-session-save --help
 
Old 05-24-2012, 03:14 AM   #9
lampion
LQ Newbie
 
Registered: May 2012
Posts: 1

Rep: Reputation: Disabled
Actually for me on Ubuntu precise (12.04) :
Code:
/usr/bin/gnome-session-quit --no-prompt
work
 
Old 03-27-2013, 05:59 PM   #10
mrSquiggle
LQ Newbie
 
Registered: Mar 2009
Posts: 2

Rep: Reputation: 0
Thumbs up

Quote:
Originally Posted by klearview View Post
exit
Thanks klearview, "exit" worked perfectly for me. Command line in server is all new to me so am all at sea as yet with what and how I'm doing things in 12.04
Cheers
 
Old 05-06-2013, 05:08 AM   #11
andrew.comly
Member
 
Registered: Dec 2012
Distribution: Trisquel-Mini 7.0, Lubuntu 14.04, Debian lxde 8.0
Posts: 311
Blog Entries: 2

Rep: Reputation: 16
Thumbs down exit doesn't log one out

Quote:
Originally Posted by klearview View Post
exit
entering "exit" in the terminal will close terminal. This certainly has nothing to do with logging out.
 
Old 05-06-2013, 05:11 AM   #12
andrew.comly
Member
 
Registered: Dec 2012
Distribution: Trisquel-Mini 7.0, Lubuntu 14.04, Debian lxde 8.0
Posts: 311
Blog Entries: 2

Rep: Reputation: 16
Thumbs down Doesn't work in Lubuntu

Quote:
Originally Posted by lampion View Post
Actually for me on Ubuntu precise (12.04) :
Code:
/usr/bin/gnome-session-quit --no-prompt
work
This doesn't work in Lubuntu's LX terminal, when I enter "/usr/bin/gnome-session-quit --no-prompt" in the terminal I only get back a "** (gnome-session-quit:13804): WARNING **: Failed to call logout: The name org.gnome.SessionManager was not provided by any .service files".
 
Old 05-06-2013, 05:12 AM   #13
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
Quote:
Originally Posted by andrew.comly View Post
entering "exit" in the terminal will close terminal. This certainly has nothing to do with logging out.
Actually, it has. If you log in on a virtual terminal (not a terminal emulator) or connect via SSH or Telnet to a machine the exit command will log you out.
 
Old 05-06-2013, 05:19 AM   #14
andrew.comly
Member
 
Registered: Dec 2012
Distribution: Trisquel-Mini 7.0, Lubuntu 14.04, Debian lxde 8.0
Posts: 311
Blog Entries: 2

Rep: Reputation: 16
Thumbs down Warning: Non functional advice

Quote:
Originally Posted by spezticle View Post
Code:
gnome-session-save --logout
or
Code:
gnome-session-save --force-logout
or
Code:
gnome-session-save --help
This advice yields:
a@SAM:~$ gnome-session-save --logout
gnome-session-save: command not found
a@SAM:~$ gnome-session-save --force-logout
gnome-session-save: command not found
a@SAM:~$ gnome-session-save --help
gnome-session-save: command not found
I even tried to install the "gnome" command above, only to encounter:
a@SAM:~$ sudo apt-get install gnome-session-save
Password:
正在讀取套件清單... 完成
正在了解依存關係
Currently reading status info... Completed
E: Can't find gnome-session-save package location
 
Old 05-06-2013, 05:37 AM   #15
andrew.comly
Member
 
Registered: Dec 2012
Distribution: Trisquel-Mini 7.0, Lubuntu 14.04, Debian lxde 8.0
Posts: 311
Blog Entries: 2

Rep: Reputation: 16
Talking Lubuntu: Solution

Below are some commands that ended up working on my Lubuntu 12.10 (LXDE,non virtual boot):
sudo pkill -u username
sudo service lightdm restart

Worked beautifully!!

Last edited by andrew.comly; 05-06-2013 at 05:54 AM. Reason: added a solution
 
  


Reply



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
Is there a way to log terminal sessions? bostonantifan Ubuntu 2 10-26-2007 04:30 PM
Deleting Terminal log!! A.S.A.P! itz2000 Linux - Newbie 4 06-24-2006 04:18 PM
Log in terminal as Root ron126 Linux - Newbie 3 03-22-2005 10:45 AM
terminal log? iLLuSionZ Linux - General 8 11-24-2003 08:06 PM
how to log off x-window from terminal ? johnyy Linux - Software 1 10-25-2003 08:04 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 02:29 AM.

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