2

My window manger (Unity) does not show any window decoration or launchbar (that's a different question), so I would like to log out in a clean manner using only my terminal window.

When I enter gnome-session-quit in my (graphical), nothing happens. I do not want to do a pkill -u $USER since that affects essential long-running jobs of mine. What other alternative(s) do I have?

B--rian
  • 85
  • 9

2 Answers2

1

Well... i think that when you want to log out that your 'long-running' prograns in(from) that session will also stop running anyway! The reason why there are no decorations and probably cant move application windows is that your session-manager hasnt loaded a window manager. So you have to find out the sm and the wm to load... That is in (K)ubuntu but not in (L,X)ubuntu and some other very small (limited) desktops that dont use a 'real' sm. If you use unity you can have compiz with the CompizConf settings manager(ccsm) where you can choose the gnome or the unity environment... It has todo with the chosen profile(see preferebces knob) I think...

Frank
  • 11
1

Strangely, but I couldn't find simple solution as a logout command too.
But, here is the next quote on the Internet:

Alternatively, you can also use force logout parameter which kills all the running programs and even unsaved documents without warning. Therefore use it cautiously!

gnome-session-save --force-logout

But I could advice another method I could not try because of I use Budgie DM:

ps aux | grep gnome-session

Kill your gnome session by name:

killall gnome-session or similar. I did not try it, so unsure if it could help.

Also yossile suggests to use dbus-send command:

The following command is an alternative for the gnome-session-quit (logout) which should close the session cleanly (not killing the gdm):

dbus-send --session --type=method_call --print-reply --dest=org.gnome.SessionManager /org/gnome/SessionManager org.gnome.SessionManager.Logout uint32:1.

(it's one line)

Gryu
  • 7,559
  • 9
  • 33
  • 52
  • I found that killall does not work, but pkill gnome-session gave a clean log-out for my active user. – Gertlex Aug 28 '20 at 21:47