How to launch custom scripts from right click menu on caja

2018-06-17 09:06:38

In order to create a script to launch it from mouse right click menu on caja you have to create a bash script and put it on : 
Where you have to replace user with your username
After that make the script executable with:
sudo chmod +x

A useful script is this one that compress the selected folder and then delete it keeping only the compressed one.
Use it at your own risk

string=$(echo $CAJA_SCRIPT_SELECTED_URIS | tr "%20" " " ) #replace %20 with double space
string=$(echo $string | tr " " " " ) #replace double space with single space
#echo "$string" >> a
file_path=$(echo "$string" | grep -oP "^$prefix\K.*") #remove file:// from filename
current_file=$(basename "$file_path") #get the name after the last slash
#echo "$file_path" >> a
#echo "$current_path" >> a
zip -r -j "$current_file" "$current_file" && rm -rf "$current_file" #compress the file and delete the original

Method tested on debian 9 with Mate and Caja filemanager.

Compress all the folders in a directory with rar on Linux

2018-05-07 19:54:41

To compress all the folders in a directory on the current path (only the folders)
Open a bash terminal , move to the wanted path with cd , then type:

for dir in */
 base=$(basename "$dir")
 rar a "${base}" "$dir"
 echo $base >> "log"
 rm -rf "$base"

Press enter.
Each folder will be replaced with a rar file with the same name and the same files the folders had.
Try this on some test folders before using it on the final folders..

Stability Problem and boot fail with linux on amd1090t

2014-02-03 19:41:56

Once installed Debian Wheezy 7.3 on my pc , an Amd phenom 2 x6 1090t mounted on a asrock 890gx extreme 3  i discovered
that at the boot time 1 time every 10 my pc gave me a error .
It writes : rcu_sched detected stalls on CPUs/tasks:
All i can do then is to reboot it with the physical button.
Sometimes after the boot my pc freezed and i have to reboot again with the physical button .
Finnaly i discover how to solve my problems.
I installed the driver  amd64-microcode from the repositories and now my system is stable and never fail a boot.
amd64-microcode is a linux driver for amd processor.
So in order to install the it open a terminal and execute those commands:

sudo apt-get update

sudo apt-get install amd64-microcode 

You have also to make this if you don'tuse hdmi audio and have an ati vga
sudo nano /etc/modprobe.d/user-blacklist.conf

Insert this in the file 
 blacklist snd_hda_codec_hdmi

That'is it  if i help you please let me a comment.

     next >