Author Topic: Re-starting the x-server.  (Read 1432 times)

Offline utu

  • Newly Subscribed
  • *
  • Posts: 19
  • Karma: 0
  • New Forum User
    • View Profile
  • Peppermint version(s): 64-bit Peppermint 7 LiveUSB
Re-starting the x-server.
« on: July 26, 2016, 08:00:25 am »
Re-starting the x-server.

Sometimes the x-server gets all confused and needs to be reset.
Or maybe you've changed something like .bashrc and it needs to be reset
to make changes effective.

If x is not working right but you can still access a terminal in some form,
a simple command line will restart x for you. Speaking from Peppermint 7
experience, of course, with Systemd a part of your Linux system.

peppermint@peppermint ~ $ alias restartx
alias restartx='sudo systemctl restart lightdm.service'

Doing 'restartx' in a terminal is much less of a hassle than logging out
and logging back in without a full restart.

You can define 'restartx' in the current session, but it won't be there on re-boot
unless you also add it to your (hidden) ~.bashrc file.

If x is so hung-up that you can't access a terminal AND you can't even log out,
then using Ctrl-Alt-PrntScrn R E I S U B is preferable to using the power button
to shut-down, but that's another story; google REISUB for many accounts on this
other magic trick. 

Offline PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 26437
  • Karma: 65531
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 10
Re: Re-starting the x-server.
« Reply #1 on: July 26, 2016, 12:12:10 pm »
Or just see here for REISUB info,157.msg1083.html#msg1083

If X is frozen, how are you supposed to access a terminal ? .. You don't mention that ;)

Or do you mean a "console" .. eg. hit Ctrl+Alt+F3 to drop to a text console, login in text mode, then run your:
Code: [Select]
sudo systemctl restart lightdm.service(or your alias)

FYI, You can also still use the older:
Code: [Select]
sudo service lightdm restartWhich will equally apply to Peppermint 3, 5, 6, and 7 .. whereas (I think) the sysctl version only works in Peppermint 7 (since it's the only version that uses systemd)
« Last Edit: July 26, 2016, 12:16:32 pm by PCNetSpec »
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint