I would like to log myself off my xfce session when I attach to my machine remotely. It's because sometimes I leave a program or two running that holds locks on files that I'd like to work on from a brand new XFCE session that I just established remotely.
I'm familiar with
xfce4-session-logout. That only works if you are:
- logged-in interactively to xfce (you are looking at the GUI on your screen or your remote x11 session)
- and you launched on a terminal from within your XFCE session (that is now hosted by the above session)
What does not work is remotely SSH'ing to your machine from another location, then attempt to remotely log yourself off. No, that doesn't work.
xfce4-session-logout does nothing in this case. It displays errors.
$ ssh <my machine> <works fine...> $ xfce4-session-logout --logout xfce4-session: Received error while trying to log out (Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.).
At Work (Day Time):
- log into SDDM, starts an XFCE session,
- Open some files, do some work, save files, leave them open
- Go home
At Home (Evening):
- Use x2go to launch a graphical remote xfce session
- Attempt to open a locked file (darn, file is locked)
At this point, I could attempt to send signals to the programs that hold the files open (which works fine) Sometimes, I really just want to log out the other session and create a new one. That's what I'm asking about here.