AFAIK alias
is usually used to make 'shortcut' for long command. But what to do if I want to alias one command to another?
I need this because I replaced gnome-screensaver
with xscreensaver
, so the lock screen button does not work.
How to alias gnome-screensaver-command -l
to be resolved into xscreensaver-command -lock
?
It was easier than I thought. I had to create such shell script:
Saved it as
/usr/bin/gnome-screensaver-command
and added execute permission:Now, executing
gnome-screensaver-command -l
launchesxscreensaver-command -lock
and locks my screen.