Dear visitor, welcome to KDE-Forum.org.
If this is your first visit here, please read the Help. It explains in detail how this page works.
To use all features of this page, you should consider registering.
Please use the registration form, to register here or read more information about the registration process.
If you are already registered, please login here.
Konq Servicemenu
I am trying to make a service menu that will extract a tar.bz2 file but i can't seem to get it to work.
[Desktop Entry]
ServiceTypes=all/all
Actions=InstallWolfpkg
[Desktop Action InstallWolfpkg]
Name=Install
Icon=access
Exec=/bin/bash -c "tar --xvjf *"
The entry is in the menu but when i right click on the package and select Install nothing happens?
Any help would be nice.
Thanks.
I know this isn't an answer to your question, but don't you already have a service menu for extracting tar.bz2 files? If you have ark installed, and most everyone does, you should have a item in the context menu "Extract ->" then it'll give you three options of where to extract the file to ("Extract Here", "Extract to <filename>/", and "Extract to...").
You've probably already seen this article, but if not this might help...
http://developer.kde.org/documentation/t…rvicemenus.html
Cheers.
Yes i seen that site that is were i learned how to make servicemenus.
Ark doesn't really help me out see at this minute i am just trying to figure out how to extract a tar.bz2 package useing just tar and doing it from the servicemenu after i figure out how to do that the next step is to figure out how to cd to the extracted dir and run a script.
Thanks for your reply
Ill keep looking and wishing for a saloution.
Sorry if I'm a little off base here, but this script should do most of what you're talking about...
|
Source code
|
1
2
3
4
5
6
7
|
[Desktop Entry]
ServiceTypes=application/x-tbz
Actions=openAndRun
[Desktop Action openAndRun]
Name=Extract And Run Script
Exec=/bin/sh -c "tar xjf %U -C %d && %d/hello.pl"
|
It will extract the archive into it's directory, and then run a script called hello.pl.
Hope this helps.
I think you can get rid of the /bin/sh or /bin/bash
tar is an executable itself
and better use %f (or %F if you really want to work on lists of files) instead of %U, as this would tell KDE that tar can handle URLs, which I am pretty sure it can't.
Cheers,
_
Qt/KDE Developer
Debian User