Category: Caja File Manager

Added: 12th of November 2021

Viewed: 1,318 times

Caja file manager scripts. Creating and executing bash scripts from the right click context menu

Looking through the hidden folders in my home directory on Caja file manager, I decided to look in the following folder .config/caja and noticed a scripts folder. This immediately pointed to some sort of launcher for executing bash scripts

Every so often I need to look back at some of the commands I have entered in the terminal, so I created a bash script below that opens the .bash_history file in the terminal. I then saved the file as bash_history in the scripts folder.

mate-terminal -- bash -c "cd; clear; cat .bash_history; bash"

After making the file executable chmod +x, I returned to the Desktop and looked through the menus to see if there was somewhere I could execute the script.

Right clicking the mouse on the desktop to show the context menu, revealed a new entry named scripts, from here I was able to launch the bash_history script.

I can see this coming in handy for all sorts of operations, for example creating a bash script to quickly back up my .thunderbird folder or updating my system and so on.