You are not logged in.
I try to run a bash script via custom actions.
The script runs fine in terminal but in Thunar nothing happens.
Already checked in Settings Editor thunar/misc-exec-shell-scripts-by-default is set to true.
Linux Mint 22 XFCE
What else can I do to persuade Thunar to run a script ?
Last edited by FrankBKK (2024-10-14 16:01:07)
Offline
Thunar Custom actions needs to be able to find the script to run it - look at ~/.xsession-errors in case an error message is being posted.
Can you post back the contents of this script plus its location and your $PATH? Also the Custom Action properties as you have set them.
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
after I played around some more I found a hint when monitoring active processes and finally got it to work.
I had to change the Thunar Custom Action Property Command to
/usr/bin/xfce4-terminal -x /home/user/scripts/copyTBData.sh
Previously I just added the script path+file (e.g. /home/user/scripts/copyTBData.sh)
which did not work.
Works fine now, but I have no clue to why I have to call the terminal explicitly.
Maybe someone can help explain ?
Offline
What does the script do? Can you post a copy of it?
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
What does the script do? Can you post a copy of it?
Sure thing, it's a simple script to copy a Thunderbird profile from a NTFS partition to the local drive
#!/bin/bash
#
# copy Thunderbird email data from share to local Linux home folder
# last edited: 2024-10-11 FW
#
# Source directory
source_dir="/media/user/server/Thunderbird/"
# Destination directory
dest_dir="/home/user/Thunderbird"
# Exclude the specified folder and all subfolders and files
exclude_folder="Archive"
# Create the destination directory if it doesn't exist
mkdir -p "$dest_dir"
# Use rsync to copy only newer files, excluding the specified folder and its contents
rsync -av --exclude="prefs.js" --exclude="$exclude_folder/" --update "$source_dir" "$dest_dir"
# keep the terminal window open, dont close it
bash
Offline
I see. It's because you want to keep the window open. Those prior commands should run in the background and complete, but if you want to see the output, then yes - you will need to open a terminal window.
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
I see. It's because you want to keep the window open. Those prior commands should run in the background and complete, but if you want to see the output, then yes - you will need to open a terminal window.
I C - then we can close that - thanks for the info.
Offline
[ Generated in 0.009 seconds, 7 queries executed - Memory usage: 547.89 KiB (Peak: 548.73 KiB) ]