This forum has been archived. All content is frozen. Please use KDE Discuss instead.

kio and service menus

Tags: None
(comma "," separated)
HmpfCBR
Registered Member
Posts
80
Karma
0
OS

kio and service menus

Tue Jan 31, 2012 12:56 am
Hi,

Is there any way that service menus can work on files from remote kio slaves, e.g. via sftp or fish, without the files being downloaded first? Take krename for example. If you open files via sftp from inside the program krename you can rename them directly. But if one uses the service menu that comes with it, the files are downloaded to the local machine.

I have obviously not tried all service menus out there, but with the ones I have it was always like this and a minimal service menu displays the local name in /var/tmp/kdechache-$USER/krun/ instead of the original remote name.

Code: Select all
[Desktop Entry]
Type=Service
ServiceTypes=KonqPopupMenu/Plugin
MimeType=application/octet-stream;
Actions=displayFilename;
Categories=Qt;KDE;

[Desktop Action displayFilename]
Name=display file name
Icon=video-television
Exec=kdialog --msgbox %u


From what I have read it seems that a *.desktop fiel needs the %u in the Exec key and the KDE in the Categories key (or alternatively a X-KDE-Protocols key explicitly specifying the supported protocols) for proper kio support.

So am I missing something or do service menus just not support kio?
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS

Re: kio and service menus

Wed Feb 01, 2012 11:51 pm
I suspect that Service Menus may be deliberately missing full KIO support as Service Menus are intended to integrate non-KDE application functionality (different to file associations) which often call out to external executables.

This may not be the case however - changes to KIO infrastructure may have inadvertently broken this functionality.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
HmpfCBR
Registered Member
Posts
80
Karma
0
OS

Re: kio and service menus

Thu Feb 02, 2012 10:58 am
I see, but if it is intentionally shouldn't examples on techbase use %f rather than %u then? Any idea whom to ask?

What I actually intend to create is not a KDE application. I want to start mplayer on a remote machine via ssh. The sftp string from KIO has all the necessary information (username, machine and file path) and the Dolphin interface is nice enough. So I thought using a service menu is a very convenient way to hand the string to a local small python parser which in the end executes the shell command for connection, display setting and mplayer call:

Code: Select all
ssh server -l user "export DISPLAY=:0.0 && mplayer -really-quiet -fs -rootwin 'filename'"
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS

Re: kio and service menus

Sun Feb 05, 2012 11:12 am
Hmm, indeed I would expect %u or %U to work. (%U is for being able to handle multiple files).

If you create a *.desktop file then associate it to a filetype does it work correctly?
Otherwise, can you try adding X-KDE-Protocols in anyway (probably best to put it in both sections) to see if that has an impact?


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
Vianney Stroebel
Registered Member
Posts
4
Karma
0
OS

Re: kio and service menus

Fri Mar 30, 2012 2:18 pm
I posted a new thread to address this issue as a bug from the point of view of the Freedesktop specs:

viewtopic.php?f=224&t=101073&p=218049#p218049

Vianney


Bookmarks



Who is online

Registered users: Bing [Bot], gfielding, Google [Bot], markhm, sethaaaa, Sogou [Bot], Yahoo [Bot]