Thunar custom actions feedback window

General talk about packaging procedures and packages.
Post Reply
pevsner
Posts: 81
Joined: 12. Apr 2010, 16:08

Thunar custom actions feedback window

Post by pevsner »

Hi,
I have added a few custom actions in Thunar(xfce), what command should I use to show the actions output in a display window. Currently I have " gksu installpkg %f ", but can't tell whether all installed correctly.
Thanks in advance.
User avatar
gapan
Salix Wizard
Posts: 6349
Joined: 6. Jun 2009, 17:40

Re: Thunar custom actions feedback window

Post by gapan »

You'll have to create a script that checks if the installpkg command was successful or not and inform you using something like xdialog or zenity and run that script from the custom command. Something like:

Code: Select all

installpkg $1
if [ $? -eq 0 ]; then
zenity --info --text="Package installed"
else
zenity --error --text="Error installing package"
fi
haven't tested that at all, but it should work
Image
Image
pevsner
Posts: 81
Joined: 12. Apr 2010, 16:08

Re: Thunar custom actions feedback window

Post by pevsner »

Thank you Gapan.
In Thunar custom actions I added "gksu /home/mexxx/.config/Thunar/scripts/instpkginfo.sh %f", calling the script you suggested:
"#!/bin/bash
installpkg $1
if [ $? -eq 0 ]; then
zenity --info --text="Package installed"
else
zenity --error --text="Error installing package"
fi"

Up pops the "package installed" confirmation! yay.

I previously used Vectorlinux, which had their own Thunar custom actions built in, giving a little feedback on where the files had been installed to etc. (which would be nice to have). Unfortunately, now being a Salix convert, I removed my previous installs of VL so can't crib their actions. This gives a good indication that all went well.
Thx again.
User avatar
zAchAry
Posts: 804
Joined: 11. May 2010, 09:02
Location: Israel

Re: Thunar custom actions feedback window

Post by zAchAry »

@pevsner you can also make use of xterm http://www.salixos.org/forum/viewtopic. ... [code]gksu xterm -hold -e installpkg %F[/code]

Code: Select all

gksu xterm -hold -e upgradepkg --install-new %F
Image
Help to make Slackware easier Donate to Salix
pevsner
Posts: 81
Joined: 12. Apr 2010, 16:08

Re: Thunar custom actions feedback window

Post by pevsner »

@ zAchAry,
Thanks for that, it works well.
I switched to lxde but still use thunar, in preference to pcmanfm, because it has the custom actions, mouse-gestures and wheel-scroll icon sizing.
Post Reply