Sample Header Ad - 728x90

Unix & Linux Stack Exchange

Q&A for users of Linux, FreeBSD and other Unix-like operating systems

Latest Questions

0 votes
1 answers
35 views
Transparent screensaver (screen lock), could be a xscreensaver program, any?
Web search found https://superuser.com/questions/363347/transparent-screensaver-for-linux, which dated 2011, recommends `xlock -mode blank -geometry 1x1`, I'm on Linux Mint based system and seems official repos do not have `xlock`, so I figure maybe it's outdated for modern Linux. What can I use now...
Web search found https://superuser.com/questions/363347/transparent-screensaver-for-linux , which dated 2011, recommends xlock -mode blank -geometry 1x1, I'm on Linux Mint based system and seems official repos do not have xlock, so I figure maybe it's outdated for modern Linux. What can I use now in place of the above? Or maybe a program for xscreesaverthat just does see-through of the screen. TIA
Alex Martian (1287 rep)
Jul 14, 2025, 12:09 PM • Last activity: Jul 14, 2025, 12:59 PM
7 votes
2 answers
3083 views
Unlock Gnome shell takes a long time
I lock my GNOME Shell 3.6.3.1 by Ctrl + Alt + L as usual but when I try to unlock it takes up to a minute before I get my desktop back. While waiting I get a black background and a mouse pointer. Any ideas what takes so long?
I lock my GNOME Shell 3.6.3.1 by Ctrl+Alt+L as usual but when I try to unlock it takes up to a minute before I get my desktop back. While waiting I get a black background and a mouse pointer. Any ideas what takes so long?
heldt (171 rep)
Sep 26, 2013, 06:53 AM • Last activity: Jul 10, 2025, 05:05 PM
0 votes
1 answers
175 views
How to lock screen from Konsole Terminal on KDE (CachyOS)?
I'm using CachyOS and would like to lock my screen from Konsole. I'm using KDE. Is this possible? If yes, then what's the command for it?
I'm using CachyOS and would like to lock my screen from Konsole. I'm using KDE. Is this possible? If yes, then what's the command for it?
Shaun Roselt (237 rep)
Jun 12, 2025, 07:55 AM • Last activity: Jun 12, 2025, 09:02 AM
2 votes
2 answers
4068 views
How to completely disable black screen and clock-page on CentOS 8 console (before login)?
I want my screen to stay EXACTLY the same after it's finished booting, forever, which means I NEVER want it to go black, and I NEVER want to see that clock overlay appearing over the top of my username selection login dialog (it's a VM - has no real monitor, so all this blanking and screen saving ga...
I want my screen to stay EXACTLY the same after it's finished booting, forever, which means I NEVER want it to go black, and I NEVER want to see that clock overlay appearing over the top of my username selection login dialog (it's a VM - has no real monitor, so all this blanking and screen saving garbage makes no sense). Basically - when something goes wrong, like a kernel problem, I can't see on the console what that was, since it's gone black and only shows up if a key is pressed, which (in the case of kernel issues) doesn't always still work. I've already included this on my boot line:
=0
I've tried this:-
set org.gnome.desktop.session idle-delay 0
I've even tried this:-
-rf  /usr/bin/xdg-screensaver /usr/lib/python3.6/site-packages/orca/scripts/apps/gnome-screensaver-dialog /usr/lib64/libxcb-screensaver* /usr/lib64/pkgconfig/xcb-screensaver* /usr/lib64/totem/plugins/screensaver /usr/libexec/gsd-screensaver-proxy
I'm in runlevel 5 - I'd prefer not to go back to 3 ( which consoleblank=0 works for ). Anyone got any clues? Basically - I never want to see this timewasting dumb idea again Annoying screen that will not die (or it's evil cousin - the near-totally black version [go mousey, you at least escaped the blackout!!]):- Only the mouse pointer survives this pure evil black
cnd (209 rep)
Dec 16, 2020, 06:52 AM • Last activity: Jun 7, 2025, 10:04 AM
6 votes
2 answers
3750 views
How to use Desktop Lock Screen and turn off XScreenSaver Login Screen?
I am running Linux Mint 17.1, Cinnamon Desktop, Compiz, and XScreenSaver. I want to be able to use the Desktop Lock Screen and turn off the XScreenSaver Lock Screen. Turning off the Lock Screen in the XScreenSaver GUI deactivates all Screen Locking.
I am running Linux Mint 17.1, Cinnamon Desktop, Compiz, and XScreenSaver. I want to be able to use the Desktop Lock Screen and turn off the XScreenSaver Lock Screen. Turning off the Lock Screen in the XScreenSaver GUI deactivates all Screen Locking.
T H Wright (71 rep)
Jul 18, 2015, 01:58 PM • Last activity: May 25, 2025, 08:06 AM
66 votes
20 answers
192284 views
Ubuntu 18.04 won't wake after screen lock and blank / suspend / sleep
I am trying to run Ubuntu 18.04 on a laptop with an AMD A12 processor and Radeon R7 graphics. I am having nothing but problems and am very discouraged with Ubuntu though I used 12.04 for years without such problems. I have two problems that are maddening, and I will post them separately. The problem...
I am trying to run Ubuntu 18.04 on a laptop with an AMD A12 processor and Radeon R7 graphics. I am having nothing but problems and am very discouraged with Ubuntu though I used 12.04 for years without such problems. I have two problems that are maddening, and I will post them separately. The problems happen only on Gnome and Ubuntu on Xorg and do not happen on Wayland. However, I am told that it's best not to run Gnome on Wayland. This problem is that the computer sometimes doesn't wake up from suspend. Well, I think it does wake up because the optical drive spins and the hard drive ticks away, but I cannot login because the lock screen is a hash of colors or a distorted background without a place to login. I cannot even Ctrl-Alt-F1 to get to a prompt. All input is frozen. I am wondering if Xorg is configured correctly. I am running the Oilaf video driver which works well under Wayland so I don't know if there is a problem with Xorg and that driver.
ubuntu_user7 (781 rep)
May 6, 2018, 06:14 AM • Last activity: May 13, 2025, 03:48 PM
0 votes
1 answers
407 views
Is it possible to change the default GNOME/Ubuntu lock screen function (the Lock icon in the Panel's System Menu)?
I want to change the default lock screen application to `i3lock`. I can invoke the `i3lock` application through the terminal easily enough. But I would like to be able to use the default GNOME/Ubuntu UI and select the lock icon from the System Menu (I think it's called that -- see the image below)....
I want to change the default lock screen application to i3lock. I can invoke the i3lock application through the terminal easily enough. But I would like to be able to use the default GNOME/Ubuntu UI and select the lock icon from the System Menu (I think it's called that -- see the image below). There is no option that I could find using dconf (I am using X11). Is it possible to change the default GNOME/Ubuntu lock screen function used by the Lock icon in the Panel's System Menu? enter image description here
The Roark (131 rep)
Sep 26, 2024, 07:25 PM • Last activity: May 7, 2025, 08:55 AM
0 votes
0 answers
44 views
Black Screen after dim/sleep
I am using Ubuntu-based KDE Neon and recently added a new user to my machine. Ever since I added the new user, whenever the machine goes to sleep - usually due to inactivity - the screen stays black, no matter what I do. The only thing that is visible is the cursor and it disappears when I press esc...
I am using Ubuntu-based KDE Neon and recently added a new user to my machine. Ever since I added the new user, whenever the machine goes to sleep - usually due to inactivity - the screen stays black, no matter what I do. The only thing that is visible is the cursor and it disappears when I press escape key and appears when I press anything else. This laptop has an AMD Ryzen 7 3700U with Radeon Vega Mobile Gfx. I do not dual boot and kernel is Linux 6.8.0-52-generic x86_64, the operating system is KDE Neon 6.2 with release 22.04 (jammy), and the laptop is an Asus VivoBook X512DA.
ape1r0n (1 rep)
Mar 22, 2025, 07:26 PM • Last activity: Mar 23, 2025, 12:12 PM
0 votes
0 answers
31 views
Does xautolock re-trigger slock if no activity occurs while slock is already active in DWM?
I am using DWM on Debian 12, and I have configured xautolock to automatically lock my screen using slock after a period of inactivity. Here is the command I am using: xautolock -time 9 -locker slock -notify 60 -notifier "notify-send 'Locking in 1 minute' 'The system will be locked in one minute!'" M...
I am using DWM on Debian 12, and I have configured xautolock to automatically lock my screen using slock after a period of inactivity. Here is the command I am using: xautolock -time 9 -locker slock -notify 60 -notifier "notify-send 'Locking in 1 minute' 'The system will be locked in one minute!'" My question is: **If xautolock triggers slock, and then while slock is active there is no activity, will xautolock attempt to start another instance of slock, effectively locking the screen twice?** I want to ensure that only a single instance of slock runs at any given time. If xautolock keeps **re-triggering** slock even when the screen is already locked, it could cause issues. ## What I have tried: ## 1. Checking man xautolock, but I didn't find explicit documentation on how it handles already active lockers. 2. Running ps aux | grep slock while slock is active, but I haven't tested whether a second instance could be started. 3. Considering using pgrep or pidof in the -locker command to prevent multiple instances, but I want to understand how xautolock behaves by default before implementing a workaround. Would xautolock attempt to lock the screen again while slock is already running, and if so, what would be the best way to prevent multiple instances? *Any insights or suggestions would be greatly appreciated!*
Fauzy Madani (1 rep)
Mar 23, 2025, 04:39 AM • Last activity: Mar 23, 2025, 04:40 AM
0 votes
1 answers
1809 views
What is the default "live session user" password for KDE Neon when installing via live USB?
I was busy installing KDE Neon when my laptop locked itself, and now I can't get back into the desktop to finish the installation. I'm stuck at the login screen for the "live session user". Whatever password or no password that I try, I get the "Unlocking failed" error: [![KDE Neon "live session use...
I was busy installing KDE Neon when my laptop locked itself, and now I can't get back into the desktop to finish the installation. I'm stuck at the login screen for the "live session user". Whatever password or no password that I try, I get the "Unlocking failed" error: KDE Neon I haven't entered or chosen any password yet, so you would think that there isn't any password, but it doesn't work. What is the default "live session user" password for KDE Neon? --- Edit: I have found a link to someone else having the same issue and the answer there is the following: > You have to ctrl alt F3, log in to user neon with blank password, and then set a non-blank password to unlock the screen at ctrl alt F1. However I'm a little confused. I pressed Ctrl+Alt+F3 and logged into neon with a blank password, but now what? How do I "set a non-blank password"? Pressing Ctrl+Alt+F1 just goes back to the login screen and I still can't log in. This is what I see after pressing Ctrl+Alt+F3 and logging in with the neon user: KDE Neon Konsole login
Shaun Roselt (237 rep)
Jan 1, 2025, 07:30 PM • Last activity: Feb 21, 2025, 11:06 AM
0 votes
1 answers
172 views
How to change lock screen to that of a different desktop environment?
This is an odd one, but is there a way to change my GNOME lock screen (not Debian's login screen, mind you) to i3WM's super minimalist circle lock screen? I love it but don't want to use i3 all the time just for the lock screen. Debian 12
This is an odd one, but is there a way to change my GNOME lock screen (not Debian's login screen, mind you) to i3WM's super minimalist circle lock screen? I love it but don't want to use i3 all the time just for the lock screen. Debian 12
Fl1pSyde (1 rep)
Feb 17, 2025, 10:12 PM • Last activity: Feb 17, 2025, 11:40 PM
1 votes
0 answers
243 views
How do I get xss-lock (?) to only lock the screen on sleep or from loginctl lock-sessions?
Currently I have my machine configured with xss-lock like so: exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock -i /home/wayne/bluetuith/me.png --nofork I needed this to enable udev to lock my screen when I pull my Yubikey out with this udev rule: ACTION=="remove", SUBSYSTEM=="usb", ENV{...
Currently I have my machine configured with xss-lock like so: exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock -i /home/wayne/bluetuith/me.png --nofork I needed this to enable udev to lock my screen when I pull my Yubikey out with this udev rule: ACTION=="remove", SUBSYSTEM=="usb", ENV{PRODUCT}=="1050/402/543", RUN+="/usr/bin/loginctl lock-sessions" However... it *also* locks my screen when the monitor blanks. Which I don't actually want. I tried with xset 0 0 (relevant output of xset q) Screen Saver: prefer blanking: yes allow exposures: yes timeout: 0 cycle: 0 (To be precise, I only tried with xset 0 before writing this so it's possible that 0 0 does it but I'm pretty sure not, since xset dpms force standby still locks the screen which I don't *think* that I want) How do I make it so that my screen locks *only* when: 1. I remove my Yubikey 2. I close my lid And not just when the screen goes dark/blank from DPMS? --- **Edit**: xss-lock --ignore-sleep *kindof* helps -- closing the window lid won't actually make it lock, but pulling the Yubikey out and: bindsym Control+$mod+l exec i3lock -i ~/bluetuith/me.png allows me to quickly lock it but... I haven't figured it how to lock it on lid close.
Wayne Werner (12123 rep)
Jan 24, 2025, 10:37 PM • Last activity: Jan 31, 2025, 03:33 AM
0 votes
2 answers
170 views
How to get monitor state?
I want to turn off the screen after 10 minutes of inactivity, and 1 minute later, **IF** the monitor is still off, then lock the screen. I know how to turn the screen off with `dbus`, how to lock screen, and how to get the screensaver state (i.e., if the screen is locked). But I do not know how to g...
I want to turn off the screen after 10 minutes of inactivity, and 1 minute later, **IF** the monitor is still off, then lock the screen. I know how to turn the screen off with dbus, how to lock screen, and how to get the screensaver state (i.e., if the screen is locked). But I do not know how to get the current monitor state ON/OFF. So I want for KDE to trigger this script after 10 minutes of inactivity: #!/bin/bash sleep 1 dbus-send --session --print-reply --dest=org.kde.kglobalaccel /component/org_kde_powerdevil org.kde.kglobalaccel.Component.invokeShortcut string:'Turn Off Screen' sleep 60 [[ ]] && dbus-send --session --print-reply --dest=org.freedesktop.ScreenSaver /ScreenSaver org.freedesktop.ScreenSaver.Lock So how to query for monitor state (preferably with dbus), namely, the `` condition in the above script? I used to do xset -q | grep -i 'monitor is off', but now I get an error: Server does not have the DPMS Extension.
Luis A. Florit (509 rep)
Jul 23, 2024, 03:23 AM • Last activity: Jan 10, 2025, 06:24 PM
0 votes
0 answers
30 views
Delayed systemd slock autolock
I've been playing with this autoslock.service file: ``` [Unit] Description=Lock the screen on suspend +Before=sleep.target [Service] User=garrett Environment=DISPLAY=:0 ExecStart=/usr/local/bin/slock [Install] WantedBy=sleep.target ``` It almost works. The problem is that there's a brief period when...
I've been playing with this autoslock.service file:
[Unit]
Description=Lock the screen on suspend
+Before=sleep.target

[Service]
User=garrett
Environment=DISPLAY=:0
ExecStart=/usr/local/bin/slock

[Install]
WantedBy=sleep.target
It almost works. The problem is that there's a brief period when the screen wakes up where it's contents are visible before slock is triggered. What do I need to do to fix it? I would think there'd be a way for slock to be invoked immediately prior to sleep instead of after waking up, but I haven't been able to crack it.
kmaximus (1 rep)
Jan 1, 2025, 10:25 PM
0 votes
0 answers
186 views
How to turn off the screen without stopping calculations on Linux Mint?
I have a distribution Linux Mint 20 Ulyana I wanted to keep my calculations (which last several hours, even several days) running while turning off the screen without stopping my PC. In other words, is it possible to turn off only the screen, like during a logout, while allowing the calculations to...
I have a distribution Linux Mint 20 Ulyana I wanted to keep my calculations (which last several hours, even several days) running while turning off the screen without stopping my PC. In other words, is it possible to turn off only the screen, like during a logout, while allowing the calculations to continue? Thus, only I, with my password, would be able to access the session. I tried screen, with **screen -n** command line but I am looking for another automatic solution if it is possible?
Hamza ALLAL (1 rep)
Nov 6, 2024, 08:04 PM • Last activity: Nov 6, 2024, 11:36 PM
2 votes
0 answers
569 views
GNOME Lock Screen From Command Line/Bash Script
I'm attempting to make a new top bar for my system (Pop OS 22.04) using [polybar](https://github.com/polybar/polybar). I have it all mostly working, and am attempting to make a power menu. I have the logout, power and restart buttons all working, but am struggling on the lock button. I have a label...
I'm attempting to make a new top bar for my system (Pop OS 22.04) using [polybar](https://github.com/polybar/polybar) . I have it all mostly working, and am attempting to make a power menu. I have the logout, power and restart buttons all working, but am struggling on the lock button. I have a label with the
-click
action set a bash script. I have confirmed that the script is getting executed as if I have script launch Firefox it does. The problem is that that I have not been able to find a working command. I have tried
-screensaver-command --lock
-screensaver lock
-send --type=method_call --dest=org.gnome.ScreenSaver/org/gnome/ScreenSaver org.gnome.ScreenSaver.Lock
They all work when run in the terminal, but not in a bash script. I think it may have somthing to do with polybar running them as root, so I tried running them as my user, but that did not solve it. Is there some command that locks the screen of a specified user/desktop environment? Thanks. Just comment if any more info is needed. All of the commands mentioned where taken from answers from [this](https://askubuntu.com/questions/7776/how-do-i-lock-the-desktop-screen-via-command-line) question.
Elijah Crum (21 rep)
Sep 26, 2024, 12:51 PM • Last activity: Sep 28, 2024, 06:02 PM
11 votes
4 answers
8964 views
Light Locker - Run script on screen lock/unlock
I'd like to run a script if the XFCE session is locked and unlocked. Is there a way that I can intercept this and perform certain actions when the desktop is locked or unlocked? I have found following solutions: for Gnome - https://unix.stackexchange.com/questions/28181/run-script-on-screen-lock-unl...
I'd like to run a script if the XFCE session is locked and unlocked. Is there a way that I can intercept this and perform certain actions when the desktop is locked or unlocked? I have found following solutions: for Gnome - https://unix.stackexchange.com/questions/28181/run-script-on-screen-lock-unlock for xscreensaver - https://unix.stackexchange.com/questions/29232/how-do-i-run-a-script-on-unlock But I'm using light-locker and no screen saver. I was trying to monitor DBUS but it doesn't seem the light-locker emits any signals. One option would be to modify xflock4 but that would help only with screen locking. Is there any way for light-locker?
jnovacho (327 rep)
May 14, 2015, 08:40 AM • Last activity: Aug 29, 2024, 09:27 PM
1 votes
0 answers
504 views
KDE lockscreen (kscreenlocker_greet) high CPU usage
After KDE plasma 6 update, my CPU usage increased significantly while on lockscreen. This caused the processor to reach high temperatures and lose electricity unnecessarily. Main processes that caused this were: ```bash Xorg --nolisten tcp [...] # ~ 60% CPU usage kwin_x11 --replace # ~ 40% CPU usage...
After KDE plasma 6 update, my CPU usage increased significantly while on lockscreen. This caused the processor to reach high temperatures and lose electricity unnecessarily. Main processes that caused this were:
Xorg --nolisten tcp [...]    # ~ 60% CPU usage
kwin_x11 --replace           # ~ 40% CPU usage
kwin_x11 --replace           # ~ 20% CPU usage
I suspect it has something to do with the multi monitor setup. **Solution:** To fix this you need to: 1. go to system settings > Display and Monitor > Compositor 2. Uncheck Enable on startup 3. Confirm 4. Reboot After that CPU usage on lockscreen goes back to normal.
Sikora (19 rep)
Aug 29, 2024, 12:56 AM • Last activity: Aug 29, 2024, 01:00 AM
3 votes
1 answers
229 views
How to keep a log about when screen has been locked/unlocked
I would like to keep track of the times when I locked/unlocked my computer. I'm running RHEL 6.6 with gnome 2. But maybe there is 'general' solution? Are there any commands, files or something which keeps track of this? Or could/should this be done with a script? If so, any pointers what I should be...
I would like to keep track of the times when I locked/unlocked my computer. I'm running RHEL 6.6 with gnome 2. But maybe there is 'general' solution? Are there any commands, files or something which keeps track of this? Or could/should this be done with a script? If so, any pointers what I should be looking into?
dingalapadum (141 rep)
Sep 1, 2015, 11:30 AM • Last activity: Aug 13, 2024, 05:24 PM
1 votes
0 answers
54 views
Distribution independent detection of screen lock event
I am writing an application which needs to pause whenever the screen is locked. Since the users of the application will be running different DM's (Gnome, Mate, Cinnamon, XFCE, Plasma etc.) I am looking for a DM independent way of detecting the screen lock event. Most of the solutions on SE (e.g. htt...
I am writing an application which needs to pause whenever the screen is locked. Since the users of the application will be running different DM's (Gnome, Mate, Cinnamon, XFCE, Plasma etc.) I am looking for a DM independent way of detecting the screen lock event. Most of the solutions on SE (e.g. https://askubuntu.com/questions/1229618/detect-that-the-system-is-locked#1229619) depend on polling the gnome-screensaver which will not work with other DM's Is a clean DM independent solution for detecting screen lock available? or do I have to check for and poll every locker application for every DM? PS: If possible I would also want my script to await instead of frequently polling for file/program.
vijayvithal (139 rep)
Aug 9, 2024, 04:24 AM • Last activity: Aug 9, 2024, 05:42 AM
Showing page 1 of 20 total questions