Disable lock screen for ubuntu 20.04

I’m using ubuntu 20.04 virtual machine for test purpose, the default idle time is 300 seconds and lock screen is enabled , it’s a little bit annoy to unlock the screen frequently . We can use command gsettings to disable lock screen or we can change the idle time longer

Disable Lock screen for Gnome

j@ubuntu:~$ gsettings get org.gnome.desktop.lockdown disable-lock-screen
false
j@ubuntu:~$ gsettings set org.gnome.desktop.lockdown disable-lock-screen true

we can see by default “disable-lock-screen” is “false” , so we can just change it to true to disable lock screen

Change gnome session idle delay time

j@ubuntu:~$ gsettings get org.gnome.desktop.session idle-delay
uint32 300
j@ubuntu:~$ gsettings set org.gnome.desktop.session idle-delay 3600
j@ubuntu:~$

Above command changed gnome session idle delay time from 5 minutes to 1 hour.

Disable automatic screen lock in Ubuntu 18.04

By default Ubuntu will lock your desktop automatically after screen blank off, below steps will show you how to disable it.

Method 1 : Via GUI

1.On your top left of your screen , click the Activities button , then search “privacy” and open it

2.On the right part ,click the “screen lock” , then you can disable the automatic screen lock

Methond 2 : Via commands

1.Open a terminal, run below command to check the status of automatic screen lock , true means enabled ,false means disabled

gsettings get org.gnome.desktop.screensaver lock-enabled

2.Then you can use below command to disable it

gsettings set org.gnome.desktop.screensaver lock-enabled false

3.In case of you want to enable it again , you can run below command

gsettings set org.gnome.desktop.screensaver lock-enabled true

Remove or Hide Trash Icon in Ubuntu

By default Ubuntu has Trash icon showed on desktop , if we want to remove this icon we need install third party tool like Gnome-Tweak-Tool

sudo apt install gnome-tweak-tool

Then we can run below command in terminal to remove Trash icon

gsettings set org.gnome.nautilus.desktop trash-icon-visible false

Now if you wan to check your Trash , you still can access it via file browser.

If you want to get the Trash icon back to your desktop , you can run below command in your terminal

gsettings set org.gnome.nautilus.desktop trash-icon-visible true