![]() Registered Member ![]()
|
Hello everyone.
I want to extract multi-part .rar files. Ark cannot manage this. So each time I want to extract a multi-part .rar file I have to open a terminal, get to the directory and run the command "unrar -e ". I want to make this command appear when I right-click a .rar file, so that I do the entire procedure faster. I don't want to use other archiving tools either, because I want to keep KDE4 clean from gnome components and such (in other words I only want to use KDE4 programs and command-line tools). My distro is Kubuntu Intrepid Ibex. So, how do I add the command (it's called service menu, I think :-S ??)
Last edited by ytsestef on Thu Nov 13, 2008 11:18 pm, edited 1 time in total.
|
![]() Administrator ![]()
|
Go to ~/.kde4/share/kde4/services/ServiceMenus
There should be some examples already. Just add a new .desktop file with the right content. |
![]() Registered Member ![]()
|
Thanks for your quick reply! The directory you mention doesn't exist, however the following does exist: ~/.kde/share/kde4/services/ServiceMenus Would it be the same? I guess it has to do with the kubuntu... Secondly, this directory is empty, so I don't know what to include in the new .desktop file. |
![]() Administrator ![]()
|
Ok, sry, then you are using intrepid. Yes, the directory is right. I can give you an example file, it's a desktop file for modifying a file with root privileges:
So you basically see 2 sections. In the first section you need to modify the mimetype to something like this:
Then give "action" an appropriate name and make sure that the name of the second section corresponds to that. Now the "names" in the second section are selfexplanatory ![]() And the last one, exec, should be like you mentioned:
Now name that file to .desktop Not tested, but hope that helps.
Last edited by neverendingo on Sat Nov 01, 2008 2:19 pm, edited 1 time in total.
|
![]() Registered Member ![]()
|
hey thanks, you're the man!
|
![]() Administrator ![]()
|
If this thread is solved, please add [SOLVED] to the start of the subject.
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
![]() KDE Developer ![]()
|
[quote='neverendingo' pid='13188' dateline='1225548939']
Ok, sry, then you are using intrepid. Yes, the directory is right. Just as a note: the correct path or paths (KDE can search a list of paths for any if its resources) can easily be determined on the command line using the kde4-config tool (or kde-config on KDE3). In this case (service menus) % kde4-config --path services KDE infrastructure and applications use relative paths to such resource paths for almost all the file access (unless it is some user provided file) Cheers, _
anda_skoa, proud to be a member of KDE forums since 2008-Oct.
|
![]() Registered Member ![]()
|
already some examples in /usr/share/kde4/services/ServiceMenus (coming with kubuntu 11.04 natty)
tested & working. I will integrate wipe in right click actions menu in dolphin --> I will use wipe -rf as command. create a file named wipe.desktop as user paste into following lines and save then copy to /usr/share/kde4/services/ServiceMenus using dolphin as root (kdesudo -c dolphin) (mimetype: inode/directory) : wipe.desktop owned by root now content is: [Desktop Entry] Type=Service X-KDE-ServiceTypes=KonqPopupMenu/Plugin,inode/directory,all/allfiles Actions=Wipe; X-KDE-AuthorizeAction=shell_access [Desktop Action Wipe] Name=Wipe Icon=utilities-terminal Exec=wipe -rf %F X-Ubuntu-Gettext-Domain=desktop_kdebase |
![]() Registered Member ![]()
|
Kubuntu 12.04 x64 | KDE SC 4.8
Nvidia 8800 GTS | Core2Duo E6600 | 4 GB RAM |
![]() Registered Member ![]()
|
Hy i try add new menu with part of succes
it work but when folder have spaces dont work i have like that action [Desktop Action mea_cubicTOerect] Exec=~/.kde/share/kde4/services/ServiceMenus/grek/grekScrips.sh cubicTOerect "%F" Name=cubic2equirectangular MimeType=image/.*; Icon=story-editor in ~/.kde/share/kde4/services/ServiceMenus/grek/grekScrips.sh # i have this : $fileurl='/home/grek/cubi aaaac1/1_0000.tif /home/grek/cubi aaaac1/1_0001.tif /home/grek/cubi aaaac1/1_0002.tif' #$fileurl is from dolphin right click actions [Desktop Entry] with Exec=~/.kde/share/kde4/services/ServiceMenus/grek/grekScrips.sh cubicTOerect "%F" #i need add comma between files - they is space separated - is not posiible to change it ? for fileone in $fileurl do InputFileNameList=$InputFileNameList,$fileone done ------- and i have file1 /home/grek/cubi file2 aaaac1/1_0000.tif i need of corse file1 /home/grek/cubi aaaac1/1_0000.tif file2 /home/grek/cubi aaaac1/1_0001.tif |
![]() Administrator ![]()
|
Would it be possible for you to post the whole grekScrips.sh file (using [code] tags or a entry on the KDE Pastebin at paste.kde.org)
For spaces, your script likely needs adjusting (KDE programatically passes arguments such as directories around, so spaces, etc cannot be interpreted by a shell).
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
![]() Registered Member ![]()
|
Here is the function I've defined in /etc/bash.bashrc and the reason I'm here, which is to integrate it into the right-click menu when (and only when) the file is an ISO:
Notes: - I've already changed the first sudo line to kdesudo which invokes the graphical password box - it was originally sudo. - The second sudo cannot be changed to kdesudo because it throws an error "-o is not a valid option", yet it does not alter functionality in terminal; I dont know about once this is converted into the exec portion of a .desktop file (prefered filename: miso.desktop) - Line #! /bin/bash is present because this function was originally a script stored in its own file. - Script needs condensed to a run-on (single line) as I'm assuming the exec portion of a .desktop file must be. Please correct any of my assumptions, and if you are feeling gracious today, provide a snippet to copy/paste into my miso.desktop file. Mostly I'm confused with MimeType; it seems that is the portion which defines what sort of file this appears for while not appearing for other files and I've not located a (good) guide. Thanks! Hope others find ways to make this useful also! |
![]() Administrator ![]()
|
In terms of determining the appropriate mimetype, I suggest running the following command against a ISO file you have. This will return the mimetype you need to add to the *.desktop file.
For the command to execute, KDE needs a fully executable script - it has no understanding of bash functions. It will invoke the necessary interpreter as declared by the shebang line however.
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
![]() Registered Member ![]()
|
Did the directory in where to put the
I have KDE 5 (on Ubuntu 17.10) and this is what worked for me. Also this topic is the first to show up on Google. Also, is there no kde5-config? And why do I have kde4-config? It's misleading ![]() |
![]() Registered Member ![]()
|
There is no 'KDE 5'. There are: - KDE Frameworks 5 - Plasma 5 - KDE Applications (year.month.bug_fix_release_number) There is
You have the 'kde4-config' because you have a mixed KDE4 / KF5 system. Same kind of: - Service Menus Missing - viewtopic.php?f=223&t=128621 - Kubuntu forums: https://www.kubuntuforums.net/showthrea ... post367207 |
Registered users: Bing [Bot], Google [Bot], rockscient, Yahoo [Bot]