XFCE Screensaver: lock screen on system startup?

Hi everyone

I have FreeBSD 11.2-RELEASE + XFCE(4.12) + xscreensaver(5.43). Problem is that I need to lock the screen right after XFCE launch.
I tried to use xflock4 for that purpose and inserted this program to XFCE's startup but it does not work.
But, it works separately when I ran it from console.
Any ideas how to fix this ? Thank you guys.
 
try a work around, create a new shell file, in that file, add the
Code:
startxfce
xflock4 &

# in xfce desktop file
Exec=/location of that script
that's if your GUI login and not startx . if startx then do the two lines in your .xinitrc file.
not tested.. and second thought, might try switching them around because startxfce first then xlock is not gotten to until logged out.

Tested this for slim login
Code:
[userx@FreeBSD64 ~]$ cat xfcelockme
#!/usr/bin/env bash

xflock4 &
startxfce4

in the desktop file
Code:
[userx@FreeBSD64 ~]$ cat /usr/local/share/xsessions/xfce.desktop
[Desktop Entry]
Version=1.0
Name=Xfce Session
Comment=Use this session to run Xfce as your desktop environment
Exec=/home/userx/xfcelockme
#Exec=startxfce4
Icon=
Type=Application
DesktopNames=XFCE
it locked me out, and I could see my desktop just not access it until after I entered my password.
 
Back
Top