Results 1 to 2 of 2

Thread: Command only has effect when ran from terminal.

  1. #1
    Join Date
    Oct 2013
    Beans
    33

    Unhappy Command only has effect when ran from terminal.

    I'm on Xubuntu 15.04. I'm trying to run command: xss-lock -- xscreensaver-command -lock & so that my screen will lock after being suspended in Xubuntu using xscreensaver. For some reason, without running this command, Xubuntu will only lock the screen after suspension via the suspend button, but not by shutting the laptop lid like it's configured to. In the Arch wiki where I got this command (it applies equally to Ubuntu since they'd be both using systemd, xfce, and X.org in this scenario, I think) it says to run this command from the X session autostart script. I've tried running this command from xinitrc, rc.local, xfce4's xinitrc, and on session autostart. It will ONLY take effect if I run it from inside a terminal after everything else has started. Why is this? How can I get it to run automatically when X.org starts? Thanks to anyone who would help!

  2. #2
    Join Date
    Jun 2005
    Location
    Toronto, Canada
    Beans
    Hidden!
    Distro
    Xubuntu 16.04 Xenial Xerus

    Re: Command only has effect when ran from terminal.

    It won't work in xinitrc, rc.local or xfce4's xinitrc because the command requires a valid X display and one doesn't exist at those points during the login process. However, it should work in the session startup (Settings Manager >> Session and startup >> Application autostart). When you have it in the application autostart, is it running after you log in?
    Code:
    pgrep -a xss-lock
    If so, try going to xscreensaver's settings and on the Advanced tab, uncheck the "Fade to black when unblanking" option.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •