0

I'm running Ubuntu 17.10 on an HP Revolve 810, and I'm having some trouble with getting the machine to go into Suspend when the lid is closed. I've tried doing some digging, found a command that supposedly worked on 17.04, which was this:

sudo apt install gksu && gksudo gedit /etc/systemd/logind.conf

The only thing I get from this is an error that says:

Failed to run gedit '/etc/systemd/logind.conf' as user root.

Unable to copy the user's Xauthorization file.

I'm still new to the inner workings of Ubuntu, so I'm not quite sure where to go from here. Any help is appreciated.

Reaper
  • 1
  • 1
  • 2

2 Answers2

0

These instructions will only work if you are using systemd. Contact your distribution for more information. You need to have Tweaks installed on your computer to change this setting.

If you do not want the computer to suspend when you close the lid, you can change the setting for that behavior. Be very careful if you change this setting. Some laptops can overheat if they are left running with the lid closed, especially if they are in a confined place like a backpack.

  1. Open the Activities overview and start typing Tweaks.
  2. Click Tweaks to open the application.
  3. Click the Power tab.
  4. Switch Don’t suspend on lid close to ON.
  5. Close the Tweaks window.

But if you want to run your command as root then try this .

  • 1
    doesn't do it for me - installed tweaks and "suspend on lid closure" is on but nothing happens, just the screen backlight switches off and then back on when i open the lid. Tried to toggle it and no difference. Used to work fine with 17.04 – ustulation Jan 12 '18 at 12:20
0

Running graphical applications as root is blocked by default in Ubuntu 17.10 as a security measure. To open the file as root with gedit first run

xhost si:localuser:root

and then you can open your file with gksudo gedit /etc/systemd/login.conf