Choose style:

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

0 Members and 1 Guest are viewing this topic.

Offline utu

  • nOOb
  • *
  • 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, 11: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: 25661
  • Karma: 2819
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 8R, 9, and 9R
Re: Re-starting the x-server.
« Reply #1 on: July 26, 2016, 03:12:10 pm »
Or just see here for REISUB info
https://forum.peppermintos.com/index.php/topic,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 restart
Which 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, 03:16:32 pm by PCNetSpec »
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec