You are not logged in.
Hello,
I created a desktop entry in folder /home/user/.local/share/applications/clamscan.desktop with the following text:
[Desktop Entry]
Name=Clamscan Terminal
GenericName=virus scanner
Comment=scan in terminal
Exec=xfce4-terminal -e 'bash -c "clamscan %F;read -rsn1;echo"'
Terminal=false
Type=Application
Keywords=virus;scanner;
Icon=clamtk
Categories=Utility;
StartupNotify=false
Path=
I am using the "bash -c" line to keep the terminal window open after clamscan completes. However, "bash -c" cannot read directory and filenames with spaces. For example, if %F points to "\home\user\Desktop\directory 1\file", when I right click "file" and open with "Clamscan Terminal" in Thunar, nothing happens. Is there as was to pass the selected file to Exec with escaped spaces? Alternatively, is there a way to Exec xfce4-terminal and keep it open after the scan so that I can read the output?
Last edited by TCx (2019-04-24 22:53:28)
Offline
Hello and welcome.
I don't understand why you are using a desktop file and the Open in functionality for this. It sounds like a Thunar Custom Action may be a better option (assuming you only use this in Thunar).
Create a thunar custom action like this:
- Name = Virus scan
- Description = Scan for viruses
- Command = xfce4-terminal -T "Scanning for viruses, please wait..." -H -e "clamscan %F"
- Appearance tab = select all file types
Alternatively, is there a way to Exec xfce4-terminal and keep it open after the scan so that I can read the output?
Use the -H parameter. See above.
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
Thanks. -H works!
Offline
[ Generated in 0.011 seconds, 7 queries executed - Memory usage: 520.12 KiB (Peak: 520.96 KiB) ]