Notices


Reply
Thread Tools
rebhana's Avatar
Posts: 579 | Thanked: 471 times | Joined on Jan 2010 @ Austria
#271
Originally Posted by qole View Post
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!
__________________
Need more apps for the N900? Check out Qole's Easy Debian and read the wiki!
My Easy Debian installation log
 
qole's Avatar
Moderator | Posts: 7,109 | Thanked: 8,820 times | Joined on Oct 2007 @ Vancouver, BC, Canada
#272
casper27: Your rtsp stream doesn't have a clear extension; it has a long set of (probably confidential ) 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.org --- twitter --- Easy Debian wiki page
Please don't send me a private message, post to the appropriate thread.
Thank you all for your donations!
 
qole's Avatar
Moderator | Posts: 7,109 | Thanked: 8,820 times | Joined on Oct 2007 @ Vancouver, BC, Canada
#273
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.org --- twitter --- Easy Debian wiki page
Please don't send me a private message, post to the appropriate thread.
Thank you all for your donations!
 

The Following User Says Thank You to qole For This Useful Post:
qole's Avatar
Moderator | Posts: 7,109 | Thanked: 8,820 times | Joined on Oct 2007 @ Vancouver, BC, Canada
#274
New version 1.2.18 fixes the protocol bug casper27 discovered.
__________________
qole.org --- twitter --- Easy Debian wiki page
Please don't send me a private message, post to the appropriate thread.
Thank you all for your donations!
 

The Following User Says Thank You to qole For This Useful Post:
Posts: 309 | Thanked: 456 times | Joined on Jan 2010
#275
Confirmed, rtsp streams from TVCatchup are working again with vlc - thank you!
 
Posts: 309 | Thanked: 456 times | Joined on Jan 2010
#276
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.
 

The Following User Says Thank You to [DarkGUNMAN] For This Useful Post:
rebhana's Avatar
Posts: 579 | Thanked: 471 times | Joined on Jan 2010 @ Austria
#277
Originally Posted by qole View Post
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 : 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 ! 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!
__________________
Need more apps for the N900? Check out Qole's Easy Debian and read the wiki!
My Easy Debian installation log

Last edited by rebhana; 2010-06-19 at 08:07.
 
casper27's Avatar
Posts: 844 | Thanked: 521 times | Joined on Jan 2009 @ UK southampton
#278
Originally Posted by [DarkGUNMAN] View Post
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's Avatar
Posts: 579 | Thanked: 471 times | Joined on Jan 2010 @ Austria
#279
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! 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? 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??
Attached Files
File Type: gz b1.dvi.gz (2.0 KB, 80 views)
__________________
Need more apps for the N900? Check out Qole's Easy Debian and read the wiki!
My Easy Debian installation log

Last edited by rebhana; 2010-06-19 at 08:56.
 
rebhana's Avatar
Posts: 579 | Thanked: 471 times | Joined on Jan 2010 @ Austria
#280
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?
__________________
Need more apps for the N900? Check out Qole's Easy Debian and read the wiki!
My Easy Debian installation log
 
Reply


 
Forum Jump


All times are GMT. The time now is 13:45.