Hi all, I guess I’m becoming lazy.
I’ve just written a right-click service menu for Dolphin to install a package in Arch Linux (you could edit it to work with every package manager).
[Desktop Entry] Type=Service Encoding=UTF-8 ServiceTypes=KonqPopupMenu/Plugin MimeType=application/x-xz-compressed-tar;application/x-compressed-tar; Icon=control-center2 Actions=InstallWithPacman; [Desktop Action InstallWithPacman] Name=Install package Icon=control-center2 Exec=kdesu konsole -e /bin/sh -c "pacman -U %U; read -p 'Press Enter to exit'"
Save that in $(kde4-config –localprefix)/share/kde4/services/ServiceMenus/ as
Now, open Dolphin and right-click on a tar.xz archive, you will get something like this:
As you see multiple files selection works too. The Konsole terminal will not close after the installation so you can read the pacman output, to fetch errors and post_install messages. ~~I added the message “done, you can close konsole” to know when pacman quit~~.
PS. I found useful to have an Install package as dependence service too ;)