![]() |
Re: How To : Associate MPlayer, Transmission, and other apps as default handlers
New version (1.2.13-3fremantle1) fixes the gnome dependency problem (thanks qwerty12 ! ) and repairs the softlink to /etc/gnome/defaults.list upon removal (thanks rebhana ! )
|
Re: How To : Associate MPlayer, Transmission, and other apps as default handlers
Quote:
Now to a new problem I've encountered: I believe in the previous version of dbus-switchboard, I could use microB to view my directories and when I clicked on an .odt file, it would open OO Writer immediately. For some reason that doesn't work any longer. Now it obviously tries to run something, because the screen goes black for a while with the little clock ticking away, but then it comes back with nothing. From file manager I can open OO Writer by selecting dbus-switchboard, but as I said, from microB it had done that by itself before. On the other hand, when I open files on the internet with a file extension recognized by dbus-switchboard, I get the option of opening them with it or saving it on the device, so that works. |
Re: How To : Associate MPlayer, Transmission, and other apps as default handlers
Quote:
Quote:
Quote:
Code:
dbus-switchboard.py |
Re: How To : Associate MPlayer, Transmission, and other apps as default handlers
Are you escaping the URI? Filenames recieved from the browser must be unescaped (the File Manager sends them "properly"). I was using a GLib function, but I bet Python offers such a function (you'll probably find it being used elsewhere in dbus switchboard).
|
Re: How To : Associate MPlayer, Transmission, and other apps as default handlers
UPDATE:
I think I see the problem: When a local file is clicked via the browser, I am feeding a bad filename to GnomeVFS. There are two // at the beginning of the file path... I think that is a straightforward fix... Thanks again, rebhana. |
Re: How To : Associate MPlayer, Transmission, and other apps as default handlers
I've opened the local file Anmeldung.doc with microB, which mimetype (from the libfile-mimeinfo-perl package that I installed in Easy Debian) recognizes correctly:
Code:
[user@deb-m5v3d: ~]mimetype Anmeldung.doc Code:
dbus-switchboard startedEDIT2: Wow, you two are fast! :eek: Can you tell me where to fix the script? |
Re: How To : Associate MPlayer, Transmission, and other apps as default handlers
I'll package up another version ASAP.
Why do they send such a strange parameter? ['//home/user/docname.doc'] The two slashes aren't part of any convention that I'm aware of... EDIT: Rebhana, do you want to give me your mimetype list extensions? |
Re: How To : Associate MPlayer, Transmission, and other apps as default handlers
1 Attachment(s)
Quote:
dbus-switch-apps.cfg: Code:
OpenOffice,cli,"debbie-sue ooffice ""%params%"""In dbus-switch-xref.cfg, you could actually map a lot more extensions to OpenOffice, but I haven't made a comprehensive list yet. |
Re: How To : Associate MPlayer, Transmission, and other apps as default handlers
1 Attachment(s)
I have extended my dbus-switch-xref.cfg such that it covers more completely the files that evince (native and E.D.) and ooffice can display, in case you are interested.
|
Re: How To : Associate MPlayer, Transmission, and other apps as default handlers
New version (1.2.14) uploaded to Extras-devel:
I am aware that the "old" config files are all reset to package defaults at each update. This is a fairly systemic problem, however, so I am going to address this in a later update. My "new" mimetype list doesn't get updated at all, so if you want the new list, you have two choices: either delete your current list before updating: Code:
rm -r /home/user/.mimetypesCode:
cp /usr/lib/dbus-switchboard/user-mimetypes.list /home/user/.mimetypes |
Re: How To : Associate MPlayer, Transmission, and other apps as default handlers
Yes, I've discovered the error in the xref list that keeps DBus-Switchboard-GUI from opening. Version 1.2.15 will fix that. Hold on for a few minutes...
|
Re: How To : Associate MPlayer, Transmission, and other apps as default handlers
Quote:
EDIT: In user-mimetypes.list, you should also have Code:
application/postscript=Evince Debian |
Re: How To : Associate MPlayer, Transmission, and other apps as default handlers
qole, I can now open local files with microB, but opening pdf or ps files from arxiv.org stopped working:
Code:
-- dbus-switchboard: Received an RPC to mime_open. |
Re: How To : Associate MPlayer, Transmission, and other apps as default handlers
Yes, it is the same error... xrefs file just has an extra blank line at the end, which causes the app to crash.
|
Re: How To : Associate MPlayer, Transmission, and other apps as default handlers
Quote:
So: great! Everything seems to work without that extra blank line! :cool: |
Re: How To : Associate MPlayer, Transmission, and other apps as default handlers
New version (1.2.15):
|
Re: How To : Associate MPlayer, Transmission, and other apps as default handlers
Hi Qole, thanks to you and rebhana for your efforts and getting understand the whole file extension/mime type shebang.
Tried the new version, glad to see that vlc is included by default as a handler, I'm sorry to say that rtsp association has stopped working I get a window as if it is launching a program, but no banner to say which program is being launched. Stays that way for about 10 seconds then returns to the task menu. |
Re: How To : Associate MPlayer, Transmission, and other apps as default handlers
Can this handle mailto: and other URIs? I'd like to use something other than modest for the email.
|
Re: How To : Associate MPlayer, Transmission, and other apps as default handlers
Quote:
More generally, how can I now tell microB that there is a handler available through dbus-switchboard? |
Re: How To : Associate MPlayer, Transmission, and other apps as default handlers
rebhana, can you give me a link to an application/postscript file on the web?
|
Re: How To : Associate MPlayer, Transmission, and other apps as default handlers
I have a fix for DarkGUNMAN: it turns out GnomeVFS chokes on non-files, so it can't determine the mimetype for things like rtsp: streams.
If anyone knows of a library that can handle non-file parameters, I'm interested! I'll see if I can also figure out rebhana's problem before pushing out a new version. |
Re: How To : Associate MPlayer, Transmission, and other apps as default handlers
Quote:
|
Re: How To : Associate MPlayer, Transmission, and other apps as default handlers
Quote:
|
Re: How To : Associate MPlayer, Transmission, and other apps as default handlers
OK, rebhana, it isn't anything broken with dbus-switchboard. You just have to add lines to the two mimetype files.
First, /usr/share/applications/defaults.list application/postscript=hildon-dbus-switchboard.desktop Next, /usr/share/applications/uri-action-defaults.list application-postscript=hildon-dbus-switchboard.desktop Note that it is application-postscript not application/postscript in the uri-action-defaults.list file. And no, don't ask me why. ;) I will add this type to my postinst script, might as well make it available for everyone. |
Re: How To : Associate MPlayer, Transmission, and other apps as default handlers
New version (1.2.16) in Extras-devel!
This fixes rtsp: streaming (and other protocols) by not checking the mimetype for parameters that have "://" in them (doesn't include "file://"). I've also added .sdp cross-referenced with VLC, and I've added application/postscript to the necessary files for rebhana. |
Re: How To : Associate MPlayer, Transmission, and other apps as default handlers
Interesting! Apparently this new version isn't overwriting the link to /etc/gnome/defaults.list anymore, and now the file is getting messed up.
I'm investigating... |
Re: How To : Associate MPlayer, Transmission, and other apps as default handlers
Quote:
Code:
# Catch-all on N900 |
Re: How To : Associate MPlayer, Transmission, and other apps as default handlers
And on top of that, I didn't do the application/postscript associations correctly! I did "dbus-switchboard.desktop" instead of "hildon-dbus-switchboard.desktop"... :( :(
|
Re: How To : Associate MPlayer, Transmission, and other apps as default handlers
New version (1.2.17) repairs /etc/gnome/defaults.list if required and then breaks the link to /usr/share/applications/default.list so that changes to the latter file will have no impact on the /etc/gnome file (since it isn't really used by hildon apps). Upon removal of dbus-switchboard, the changed file in .../applications is removed and the link to /etc/gnome is re-established.
I also fixed my embarrassing mistake with the application/postscript type. dbus-switchboard is properly invoked for this type now. |
Re: How To : Associate MPlayer, Transmission, and other apps as default handlers
Im getting this error when trying to open a rtsp stream both rstp and .sdp are associated to Vlc as default.
Code:
~ $ dbus-switchboard.pyGreat app by the way :) |
Re: How To : Associate MPlayer, Transmission, and other apps as default handlers
Quote:
Code:
application/postscript=Evince DebianDo I also understand correctly, that these manual entries are necessary for all instances where microB knows about the mimetype, and only when microB gets "unknown/unknown" dbus-switchboard looks up the mimetype itself, in which case user-mimetypes.list determines the handler defined in /usr/lib/dbus-switchboard/dbus-switch-apps.cfg. And dbus-switch-xref.cfg is finally used when dbus-switchboard cannot determine the mimetype without looking at file extensions? What a maze! |
Re: How To : Associate MPlayer, Transmission, and other apps as default handlers
casper27: Your rtsp stream doesn't have a clear extension; it has a long set of (probably confidential :eek:) parameters after the .sdp, including the login information and stream type.
Perhaps I should change the system to treat protocols differently; it shouldn't even bother with file extensions if it has a recognised protocol... EDIT: Huh, it actually does have that. I wonder why it isn't working... Debugging... |
Re: How To : Associate MPlayer, Transmission, and other apps as default handlers
rebhana: Don't add a type to the default.list files unless you click on the file in the browser and it shows the mime type for that file. But if it recognizes the mime type, then yes, you do have to list it in the two mime type files. And no, I don't know why the duplication.
I would actually like to "break" the mimetype recognition for MicroB, so it sends everything not listed in the defaults to dbus-switchboard. I don't know how to do that, however. At least, not yet.... ;) |
Re: How To : Associate MPlayer, Transmission, and other apps as default handlers
New version 1.2.18 fixes the protocol bug casper27 discovered.
|
Re: How To : Associate MPlayer, Transmission, and other apps as default handlers
Confirmed, rtsp streams from TVCatchup are working again with vlc - thank you!
|
Re: How To : Associate MPlayer, Transmission, and other apps as default handlers
YES!!!! I managed to beat vodafone..
I have managed to get the stream to open in VLC by tunnelling rtsp over http. I compared the address used by the iphone stream, saw that it is an HTTP connection using port 1935. I also read up on the vlc documentation and found that it could tunnel rtsp connections over http - therefore sidestepping the blanket ban imposed by vodafone. So.. Using the port and the tunnelling i tried the following command in dbus-switchboard: Code:
cvlc --play-and-exit --rtsp-http --rtsp-http-port=1935 --key-quit=q "%params2%"I can say for certain this plays back even better than before. |
Re: How To : Associate MPlayer, Transmission, and other apps as default handlers
Quote:
I actually have a perhaps more tricky problem to offer :rolleyes:: In dbus-switchboard I would like to have the option to choose between the standard pdf reader and evince also when it is dbus-switchboard that recognizes a pdf file. Evince is more capable, but also slower, so it is certainly nice to be able to switch back and forth. And when you finally bring dbus-switchboard to the masses, the osso_pdfviewer should probably even be the default since not everybody will have qwerty12's evince (it's still only in extras-devel!). But osso_pdfviewer is not in the list of handlers and I realized that I probably cannot so easily add osso_pdfviewer to it because osso_pdfviewer does not take parameters such as file names. I found some information on how the standard pdfviewer could be invoked explicity in this thread. One possiblity seems to be a script that invokes osso_pdfviewer through dbus, as discussed in the said thread, but this is somewhat of an eye-sore. Would you see a more elegant solution to handle osso_pdfviewer through dbus-switchboard? EDIT2: Solved :D! After a large number of trials and errors, I found that Code:
PDF Reader,cli,dbus-send --print-reply --dest=com.nokia.osso_pdfviewer /com/nokia/osso_pdfviewer com.nokia.osso_pdfviewer.mime_open string:%params% |
Re: How To : Associate MPlayer, Transmission, and other apps as default handlers
Quote:
|
Re: How To : Associate MPlayer, Transmission, and other apps as default handlers
1 Attachment(s)
Another problem:
In user-mimetypes.list we have mapped Code:
application/x-dvi=Evince DebianI even tried to enforce dbus-switchboard by entries Code:
application/x-dvi=hildon-dbus-switchboard.desktop Code:
update-mime-database /usr/share/mimeIndeed, the entry Code:
application/x-dvi=hildon-evince.desktopI guess I could manually modify the files of the evince package to no longer refer to x-dvi, but above all I would like to understand how I can actually use dbus-switchboard to determine which program handles what, even when several packages could do the same. I'm really lost in this mime maze! :confused: It's not that I need mime support for this file format so urgently - I used it to learn about mime and dbus-switchboard, but are now driven to the conclusion that this is totally beyond me.:( qole, I attach a (gzipped) sample dvi file, in case you want to reproduce all this. EDIT: Just noticed that /usr/share/applications/mimeinfo.cache had a time stamp from some 2 weeks ago. Just deleting the dvi related entries there solved the problem that all the other configurations didn't have any effect for that mime-type. I just wonder who is in charge of that cache as update-mime-database doesn't update it? :eek: This is like fighting a hydra! EDIT2: Turns out that that solved my problems only partially: Local dvi files now open with Evince Debian with microB, but when opened on the web, microB says "application/x-dvi" and still only offers to save, and not to open with dbus-switchboard, despite having made entries for that type in defaults.list and uri-action-defaults.list. I now also need to supply a line application/x-dvi=hildon-dbus-switchboard.desktop in /usr/share/applications/mimeinfo.cache. While it now works, this is completely nuts! What am I missing here? Why was that not necessary with application/postscript?? |
Re: How To : Associate MPlayer, Transmission, and other apps as default handlers
qole, why did you have to break the symlink between /usr/share/application/defaults.list and /etc/gnome/defaults.list? Wouldn't it be safer to have them remain identical?
|
| All times are GMT. The time now is 11:07. |
vBulletin® Version 3.8.8