My Computer Tips

My Computer tips has over 290 tutorials and tips.

Valid CSS!

Categories

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

ID: 292

Category: Caja File Manager

Added: 12th of November 2021

Updated On: Tutorial updated and rechecked on 25th of August 2025

Views: 2,424

Related Tips & Tutorials

Create a simple bash script in Ubuntu and Ubuntu based distributions

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.

#!/usr/bin/bash
mate-terminal -- bash -c "
cd;
clear;
cat .bash_history;
bash"

Caja Folder

Scripts Folder

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.

Right click context menu, scripts


Output

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.