Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Alternative to xscreensaver for Xfce
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
alogim
Tux's lil' helper
Tux's lil' helper


Joined: 21 Aug 2015
Posts: 127

PostPosted: Tue Mar 26, 2019 9:24 am    Post subject: [SOLVED] Alternative to xscreensaver for Xfce Reply with quote

I use SLiM as display manager and Xfce as Desktop Environment. I love both. What I hate, though, is the appearance of xscreensaver: font and layout are both really basic and they do not merge with the rest of my system.

Is there any way to use SLiM also when the screen is locked? It would be extremely nice. I tried installing lightdm and light-locker, however I ended up with a system that, when the screen is locked, asks the password two times, once for lightdm and once for xscreensaver. :?:

Thank you in advance for any help you can provide. EDIT: this here is my 100th post, nice. :D
_________________
Desktop: i5-3570k - 2x4 GB - Sapphire HD 7950 Dual-X - 500 GB WD Caviar Black - Dell SE2717H 27"
Laptop: HP EliteBook 850 G5 - i7-8550U - 1x16GB - Intel UHD 620 - 512 GB Samsung NVMe SSD
Phone: OnePlus 5T - SD835 - 8 GB - Adreno 540 - 128 GB


Last edited by alogim on Tue Mar 26, 2019 11:51 am; edited 1 time in total
Back to top
View user's profile Send private message
fedeliallalinea
Bodhisattva
Bodhisattva


Joined: 08 Mar 2003
Posts: 22308
Location: here

PostPosted: Tue Mar 26, 2019 9:30 am    Post subject: Reply with quote

I don't know slim very well, but try to look this section in archwiki
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
alogim
Tux's lil' helper
Tux's lil' helper


Joined: 21 Aug 2015
Posts: 127

PostPosted: Tue Mar 26, 2019 9:40 am    Post subject: Reply with quote

I feel so stupid now. Anyway, thank you very much! I think this should be added to the Wiki, there is just a line mentioning it
Quote:

Enable the pam USE flag for x11-misc/slim if the slimlock command is needed for locking the screen.
I added it to /usr/bin/xflock4, is that the correct approach?
Code:

# Lock by xscreensaver, gnome-screensaver or light-locker, if a respective
# daemon is running
for lock_cmd in \
    "slimlock" \ # I added this line
    "xscreensaver-command -lock" \
    "gnome-screensaver-command --lock" \
    "light-locker-command --lock"
do
    $lock_cmd >/dev/null 2>&1 && exit
done

# else run another access locking utility, if installed
for lock_cmd in \
  "xlock -mode blank" \
  "slock" \
  "alock -bg blank -auth pam"
  do
    set -- $lock_cmd
    if command -v -- $1 >/dev/null 2>&1; then
        $lock_cmd >/dev/null 2>&1 &
        # turn off display backlight:
        xset dpms force off
        exit
    fi
done

# else access locking failed
exit 1
EDIT: This works only when I manually lock the screen, such as by pressing Ctrl + Alt + L. If I close the lid of my laptop and then reopen it, I get a black screen.
_________________
Desktop: i5-3570k - 2x4 GB - Sapphire HD 7950 Dual-X - 500 GB WD Caviar Black - Dell SE2717H 27"
Laptop: HP EliteBook 850 G5 - i7-8550U - 1x16GB - Intel UHD 620 - 512 GB Samsung NVMe SSD
Phone: OnePlus 5T - SD835 - 8 GB - Adreno 540 - 128 GB
Back to top
View user's profile Send private message
alogim
Tux's lil' helper
Tux's lil' helper


Joined: 21 Aug 2015
Posts: 127

PostPosted: Tue Mar 26, 2019 12:04 pm    Post subject: Reply with quote

Here is as I managed to solve this problem:
  • Instruct Portage to install xfce-base/xfce4-session without support to x11-misc/xscreensaver

    • Go to /etc/portage/package.use:
      Code:
      cd /etc/portage/package.use

    • Create a new file called xfce4-session:
      Code:
      sudo $EDITOR /etc/portage/package.use/xfce4-session

    • Put the following string of text inside it:
      Code:
      xfce-base/xfce4-session -xscreensaver

    • Re-emerge xfce-base/xfce4-session:
      Code:
      sudo emerge -av xfce-base/xfce4-session


  • Uninstall xfce-extra/xfce4-screensaver:
    Code:
    sudo emerge -cav xfce-extra/xfce4-screensaver x11-misc/xscreensaver

  • Edit /usr/bin/xflock4:
    Code:
    sudo $EDITOR /usr/bin/xflock4

  • Change
    Code:

    for lock_cmd in \
        "xscreensaver-command -lock" \
        "gnome-screensaver-command --lock" \
        "light-locker-command --lock"
    do
        $lock_cmd >/dev/null 2>&1 && exit
    done
    to
    Code:

    for lock_cmd in \
        "slimlock" \
        "xscreensaver-command -lock" \
        "gnome-screensaver-command --lock" \
        "light-locker-command --lock"
    do
        $lock_cmd >/dev/null 2>&1 && exit
    done

  • Tick Lock screen when system is going to sleep under the System tab in Xfce Power Manager Settings.

_________________
Desktop: i5-3570k - 2x4 GB - Sapphire HD 7950 Dual-X - 500 GB WD Caviar Black - Dell SE2717H 27"
Laptop: HP EliteBook 850 G5 - i7-8550U - 1x16GB - Intel UHD 620 - 512 GB Samsung NVMe SSD
Phone: OnePlus 5T - SD835 - 8 GB - Adreno 540 - 128 GB
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum