Quantcast
Channel: Active questions tagged 22.04 - Ask Ubuntu
Viewing all articles
Browse latest Browse all 4549

Autologin and automatic screen lock methods not working (Ubuntu 22.04.3)

$
0
0

I can't seem to get what is described in this thread to work... I even tried entering the command into the terminal, but all I get is command not found.

I have also tried the startup applications method as described in the same thread, but that only results in an error occurring upon boot along with ubuntu wanting to send a report on it.

The lock button up to the right functions as intended though, so I'm guessing things have changed since the referred to post was made. Does anyone here happen to know how to solve this issue?


Update: Did as instructed by one of the subcomments and installed gnome-screensaver (and it still doesn't work).


Update 2: Uninstalled gnome-screensaver since xdg is apparently what handles the lock screen by default. xdg-screensaver lock works from terminal, but not from startup applications.


Update 3: Made a folder called .startup in "/home/insertusername/", and then ran I made a file called AutoLock.sh w. the contents of that being the following (ignore the empty rows in between each row):

!/bin/bash

xdg-screensaver lock

I then ran "chmod +x AutoLock.sh && chmod -w Autolock.sh". I followed that up by then adding the path for .sh-file into my .desktop file (lockscreen.desktop) within "/home/insertusername/.config/autostart/", and the contents of that is:

[Desktop Entry]

Type=Application

Name=AutoLock

Exec=/home/glacier/.startup/autostart.sh

X-GNOME-Autostart-enabled=false

Doesn't work.


Update 4: Tried adding sleep 1 into the bash script as instructed, making it look like:

#!/bin/bash

sleep 1

xdg-screensaver lock

Doesn't work either.


What am I doing wrong?


Viewing all articles
Browse latest Browse all 4549

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>