How to change the menu right click on the desktop from Ubuntu Mate 20.04?

Welcome to Ubuntu MATE community!

Really it is possible. I have a pleasure to increase my python experience.

Here is the link to special Caja-Python extension script which does what you want.

To install it use the following commands:

mkdir -p ~/.local/share/caja-python/extensions/
cd ~/.local/share/caja-python/extensions/
wget -c https://gist.githubusercontent.com/N0rbert/847c5466189eb653efec4ce222d6f71d/raw/d83851157eb12856eed5fcfb90dc40b91851a066/startlockscreencaja.py
caja -q

As the result you will have new item in the Caja dropdown menu:

startlockscreen

and clicking on it will execute mate-screensaver-command --lock command to lock the screen by MATE Screensaver. Note that this menu item is shown only on ~/Desktop folder.

I have tested it on Ubuntu MATE 20.04 LTS, 21.04 and even upcoming 21.10.

Technical details - the script is based on dejadup.py from deja-dup-caja deb-package and its Restore Missing Files... functions.

5 Likes