Up to $140 off-Lowest  Prices of 2024(Nov.21-Dec.2)

My Computer Tips

Home | About | Categories | All Tips & Tutorials

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

Views: 1,899

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.

#!/bin/bash
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.