maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   How To : Associate MPlayer, Transmission, and other apps as default handlers (https://talk.maemo.org/showthread.php?t=17757)

qole 2010-06-15 22:53

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 ! )

rebhana 2010-06-16 17:23

Re: How To : Associate MPlayer, Transmission, and other apps as default handlers
 
Quote:

Originally Posted by qole (Post 716656)
New version in Extras-devel (1.2.13) has rudimentary, hackish support for mimetypes. If your file doesn't have a recognised file extension, it will try to match the file to a recognised mimetype.

I have added a new file,

/home/user/.mimetypes/user-mimetypes.list

which you must edit by hand. Find the mimetype in the incredibly long list (taken from my desktop Ubuntu defaults.list) and change the "none" to the name of the handler (from the Handlers list in the GUI).

I have defined one mimetype as an example, application/pdf=Evince to show you how to do it (and to keep the invaluable rebhana as my betatester :)).

Great! I can now read my physics papers directly from the browser also with dbus-switchboard installed, so I'm back in as a betatester! :) And I can now use the Easy Debian version of evince for those formats not supported by native evince, namely postscript files! So I've gained something already! :D For this I had to extend the "incredibly long" user-mimetypes.list file even more, so in time I'll feed back my version of it!

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.

qole 2010-06-16 17:32

Re: How To : Associate MPlayer, Transmission, and other apps as default handlers
 
Quote:

Originally Posted by rebhana (Post 717854)
....so I'm back in as a betatester! :)

Hoorah!

Quote:

Originally Posted by rebhana (Post 717854)
For this I had to extend the "incredibly long" user-mimetypes.list file even more, so in time I'll feed back my version of it!

Great. Let's make this list as comprehensive as possible.

Quote:

Originally Posted by rebhana (Post 717854)
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.

I bet it is a parameter format problem. Could you open a terminal and enter:
Code:

dbus-switchboard.py
Then try to open a local file via the browser (the way that doesn't work currently). Paste the output of dbus-switchboard.py here so I can see more details.

qwerty12 2010-06-16 17:37

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).

qole 2010-06-16 17:40

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.

rebhana 2010-06-16 17:43

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
Anmeldung.doc: application/msword

dbus-switchboard.py says:
Code:

dbus-switchboard started
--
-- dbus-switchboard: Received an RPC to mime_open.
-- dbus-switchboard: RPC had arguments ['//home/user/Anmeldung.doc'].
-- dbus-switchboard: Interface is org.dbus.switchsvc
-- dbus-switchboard: user_data is <osso.context.Context object at 0x1e5ff0>
_rpc_callback_handler: Exception occurred during callback execution.
Traceback (most recent call last):
  File "rpc.pyx", line 16, in osso.rpc._rpc_callback_handler (osso/rpc.c:1473)
  File "/usr/bin/dbus-switchboard.py", line 76, in callback_func
    docmimetype = gnomevfs.get_mime_type(params2)
RuntimeError: there was an error reading the file

EDIT: I should also say that I've chosen OO Writer as the handler for doc files, not the default antiword->pdf. Is there actually antiword for fremantle?

EDIT2: Wow, you two are fast! :eek: Can you tell me where to fix the script?

qole 2010-06-16 17:52

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?

rebhana 2010-06-16 18:27

Re: How To : Associate MPlayer, Transmission, and other apps as default handlers
 
1 Attachment(s)
Quote:

Originally Posted by qole (Post 717896)
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?

Here is my user-mimetype list file, where I have introduced two handlers not (yet) in dbus-switchboard, but which I'd suggest to include:
dbus-switch-apps.cfg:
Code:

OpenOffice,cli,"debbie-sue ooffice ""%params%"""
DEvince,cli,"debbie-sue evince ""%params%"""

Regarding OO, I think you don't have to distinguish between the different OO components, ooffice anyway opens with the one applicable. And in addition to Evince, I've introduced DEvince as the Easy Debian version, which can handle a lot more file formats. But I kept native evince for pdf and djvu.

In dbus-switch-xref.cfg, you could actually map a lot more extensions to OpenOffice, but I haven't made a comprehensive list yet.

rebhana 2010-06-16 19:32

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.

qole 2010-06-16 19:58

Re: How To : Associate MPlayer, Transmission, and other apps as default handlers
 
New version (1.2.14) uploaded to Extras-devel:
  • Worked around the local-files-in-browser-have-extra-leading-slash problem; now you can click on local files in the browser and they will be properly handled by dbus-switchboard.
  • rebhana's extra mime types added to user-mimetypes.list (but not his extra associations to OpenOffice, yet).
  • "Evince Debian", "OpenOffice" and "VLC" added to handler list
  • Antiword removed as default XRef for .doc, replaced with OpenOffice
  • rtsp: protocol added to XRefs
  • GUI icon improved: added a white border around the ... whatever it is. (side note: I did this in Debian GIMP on-device :) )
  • "unknown/unknown" added to Maemo defaults.list because that seems to be the catch-all for Maemo 5. Now unknown types (like rebhana's .gz file attachments for example!) can be opened by dbus switchboard instead of just downloaded. This is good, even if you don't have a dbus-switchboard handler, because dbus-switchboard now tells you the real mimetype and file extension so you can associate it.

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/.mimetypes
...or, after updating, you have to do the following:

Code:

cp /usr/lib/dbus-switchboard/user-mimetypes.list /home/user/.mimetypes
And rebhana: Now that I have "real" mimetype support, I'm hoping to make the old-style xref file a secondary resource, only used in the cases where files of the same mimetype can be opened by different handlers depending on extension.

qole 2010-06-16 20:14

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...

rebhana 2010-06-16 20:23

Re: How To : Associate MPlayer, Transmission, and other apps as default handlers
 
Quote:

Originally Posted by qole (Post 718123)
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...

Perhaps you can then also include my xrefs compilation?

EDIT: In user-mimetypes.list, you should also have
Code:

application/postscript=Evince Debian

rebhana 2010-06-16 20:50

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.
-- dbus-switchboard: RPC had arguments ['/var/tmp/0912.5383'].
-- dbus-switchboard: Interface is org.dbus.switchsvc
-- dbus-switchboard: user_data is <osso.context.Context object at 0x1e5ff0>
------
-- params : file:///var/tmp/0912.5383
-- params2 : /var/tmp/0912.5383
-- realparams : file:///var/tmp/0912.5383
-- realparams2 : /var/tmp/0912.5383
------
-- params2 mimetype is:  application/pdf
------
_rpc_callback_handler: Exception occurred during callback execution.
Traceback (most recent call last):
  File "rpc.pyx", line 16, in osso.rpc._rpc_callback_handler (osso/rpc.c:1473)
  File "/usr/bin/dbus-switchboard.py", line 104, in callback_func
    if rowxref[2] != "" and realparams.startswith(rowxref[2]):
IndexError: list index out of range

Is this the same error preventing the GUI from opening?

qole 2010-06-16 21:18

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.

rebhana 2010-06-16 21:47

Re: How To : Associate MPlayer, Transmission, and other apps as default handlers
 
Quote:

Originally Posted by qole (Post 718254)
Yes, it is the same error... xrefs file just has an extra blank line at the end, which causes the app to crash.

I'd never have found such an error!
So: great! Everything seems to work without that extra blank line! :cool:

qole 2010-06-16 22:09

Re: How To : Associate MPlayer, Transmission, and other apps as default handlers
 
New version (1.2.15):
  • Fixes critical blank line bug that breaks GUI and service
  • Fixes unknown/unknown mime type: Adding it at the end of the file didn't work, it must come before dbus-switchboard custom types.
  • Adds rebhana's extra XRefs

[DarkGUNMAN] 2010-06-17 07:04

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.

ruskie 2010-06-17 12:04

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.

rebhana 2010-06-17 12:12

Re: How To : Associate MPlayer, Transmission, and other apps as default handlers
 
Quote:

Originally Posted by qole (Post 718369)
New version (1.2.15):

There are still a few things that don't open with microB although they are covered by xrefs and user-mimetype.list. If I try to open an uncompressed postscript file (application/postscript) from the web, microB only offers to save it and doesn't offer dbus-switchboard. Correspondingly, when it's a local postscript file, it just doesn't do anything with it but just says that this type is not supported.

More generally, how can I now tell microB that there is a handler available through dbus-switchboard?

qole 2010-06-17 16:29

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?

qole 2010-06-17 16:44

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.

qwerty12 2010-06-17 16:50

Re: How To : Associate MPlayer, Transmission, and other apps as default handlers
 
Quote:

Originally Posted by qole (Post 719453)
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 I read this properly, I don't think you have much of a choice but to use GnomeVFS for local files. Certainly, I've never seen MIME-type definitions installed elsewhere on Maemo. For remote files, though, no idea, sorry.

rebhana 2010-06-17 17:02

Re: How To : Associate MPlayer, Transmission, and other apps as default handlers
 
Quote:

Originally Posted by qole (Post 719423)
rebhana, can you give me a link to an application/postscript file on the web?

http://people.sc.fsu.edu/~burkardt/data/ps/ps.html

qole 2010-06-17 17:11

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.

qole 2010-06-17 17:41

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.

qole 2010-06-17 17:45

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...

rebhana 2010-06-17 17:58

Re: How To : Associate MPlayer, Transmission, and other apps as default handlers
 
Quote:

Originally Posted by qole (Post 719530)
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...

Also the last two versions didn't overwrite the link for me. Looking at defaults.list, I notice that (with version 1.2.15) I have repetitive entries: 2 blocks headed each by "# DBus-Switchboard default associations" , then
Code:

# Catch-all on N900
unknown/unknown=hildon-dbus-switchboard.desktop

followed by another block headed by "# DBus-Switchboard default associations".

qole 2010-06-17 18:16

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"... :( :(

qole 2010-06-17 18:43

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.

casper27 2010-06-17 19:26

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.py
dbus-switchboard started
--
-- dbus-switchboard: Received an RPC to mime_open.
-- dbus-switchboard: RPC had arguments ['rtsp://84.234.23.214/iphone/iphone_bbctwo.sdp?userID=25061&accessKey=12768015724o6x78v2ysiencq0zwtxu&sdp=iphone_bbctwo.sdp&device=mobile'].
-- dbus-switchboard: Interface is org.dbus.switchsvc
-- dbus-switchboard: user_data is <osso.context.Context object at 0x407bf030>
------
-- params : file://rtsp://84.234.23.214/iphone/iphone_bbctwo.sdp?userID=25061&accessKey=12768015724o6x78v2ysiencq0zwtxu&sdp=iphone_bbctwo.sdp&device=mobile
-- params2 : rtsp://84.234.23.214/iphone/iphone_bbctwo.sdp?userID=25061&accessKey=12768015724o6x78v2ysiencq0zwtxu&sdp=iphone_bbctwo.sdp&device=mobile
-- realparams : file://rtsp://84.234.23.214/iphone/iphone_bbctwo.sdp?userID=25061&accessKey=12768015724o6x78v2ysiencq0zwtxu&sdp=iphone_bbctwo.sdp&device=mobile
-- realparams2 : rtsp://84.234.23.214/iphone/iphone_bbctwo.sdp?userID=25061&accessKey=12768015724o6x78v2ysiencq0zwtxu&sdp=iphone_bbctwo.sdp&device=mobile
------
no handler found
**Load Mime XRef**
@ /home/user/.mimetypes/user-mimetypes.list

Any ideas?
Great app by the way :)

rebhana 2010-06-17 20:33

Re: How To : Associate MPlayer, Transmission, and other apps as default handlers
 
Quote:

Originally Posted by qole (Post 719477)
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.

If I understand correctly, I should do the same for all the mimetypes that are mapped to Evince_Debian in user-mimetypes.list, to wit
Code:

application/postscript=Evince Debian
application/x-bzpdf=Evince Debian
application/x-gzpdf=Evince Debian
application/x-bzpostscript=Evince Debian
application/x-gzpostscript=Evince Debian
application/x-dvi=Evince Debian
application/x-bzdvi=Evince Debian
application/x-gzdvi=Evince Debian
image/x-eps=Evince Debian
image/x-bzeps=Evince Debian
image/x-gzeps=Evince Debian

with all "Evince Debian" changed to hildon-dbus-switchboard.desktop in corresponding entries in /usr/share/applications/defaults.list, and similarly for the uri-action-defaults.list (why this duplication btw?)?

Do 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!

qole 2010-06-17 21:52

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...

qole 2010-06-17 21:58

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.... ;)

qole 2010-06-18 04:05

Re: How To : Associate MPlayer, Transmission, and other apps as default handlers
 
New version 1.2.18 fixes the protocol bug casper27 discovered.

[DarkGUNMAN] 2010-06-18 06:50

Re: How To : Associate MPlayer, Transmission, and other apps as default handlers
 
Confirmed, rtsp streams from TVCatchup are working again with vlc - thank you!

[DarkGUNMAN] 2010-06-18 08:09

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%"
This tells vlc to quit if it cannot connect, otherwise it stays running in the background doing nothing, tells it to use the Q key to quit (same as mplayer), and tells it to tunnel rtsp over http port 1935

I can say for certain this plays back even better than before.

rebhana 2010-06-18 16:59

Re: How To : Associate MPlayer, Transmission, and other apps as default handlers
 
Quote:

Originally Posted by qole (Post 719876)
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.... ;)

I'm going to test that further, but I found that are a couple of mimetypes that MicroB detects and which therefore should be included in the defaults.lists. I'll post a list when I've checked the types of relevance to Evince_Debian and OpenOffice. Regarding OO, at the moment only the MS doc format can be opened, and not the open formats odt, ods, odp, because microB does recognize them as application/vnd.oasis.opendocument.text etc.

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%
in dbus-switch-apps.cfg gives what I was asking for!

casper27 2010-06-18 18:23

Re: How To : Associate MPlayer, Transmission, and other apps as default handlers
 
Quote:

Originally Posted by [DarkGUNMAN] (Post 720205)
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%"
This tells vlc to quit if it cannot connect, otherwise it stays running in the background doing nothing, tells it to use the Q key to quit (same as mplayer), and tells it to tunnel rtsp over http port 1935

I can say for certain this plays back even better than before.

Brilliant is all I have to say. Really works well Thanks man and thanks to qole and the others for putting so much time in made my week :)

rebhana 2010-06-18 21:05

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 Debian
application/x-bzdvi=Evince Debian
application/x-gzdvi=Evince Debian

and xrefs also maps .dvi to Evince Debian. However, dvi files (device independent LATEX output) are invariably opened by native evince, which unfortunately cannot handle them although it has dvi files under its mimetype declarations.

I even tried to enforce dbus-switchboard by entries
Code:

application/x-dvi=hildon-dbus-switchboard.desktop 
application-x-dvi=hildon-dbus-switchboard.desktop

in defaults.list and uri-action-defaults.list, respectively. But to no avail, despite running
Code:

update-mime-database /usr/share/mime
and rebooting.

Indeed, the entry
Code:

application/x-dvi=hildon-evince.desktop
in /usr/share/applications/mimeinfo.cache remains and only evince gets started.

I 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??

rebhana 2010-06-19 09:17

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