3

In recent versions of Ubuntu, if one of my kids had locked the screen instead of logging out of their account, I could run this command to restart X and get to the login screen:

sudo service lightdm restart

But in 17.10, this command now results in this error message:

Job for lightdm.service failed because the control process exited with error code.

What is the equivalent command in 17.10?

Stéphane
  • 2,536

1 Answers1

6

17.10 ditched lightdm and started using gdm

The equivalent to your command would be...

sudo service gdm restart

But ...

sudo pkill -9 -u {user}

would be correct for any Linux system. Users currently present can be shown with the w (/who) command.

But do be careful. I myself would get very angry if someone killed my session when I am not allowed to save my work in progress.

This would send a message to all systems:

notify-send "Ahum!"

It will disappear by itself.

zenity --info --text="Time to go to bed"

would show a popup that needs to be confirmed.

After that you can kill the session ;)

Rinzwind
  • 310,127