![]() |
Re: How To : Associate MPlayer, Transmission, and other apps as default handlers
How about some weird association with scripts? http://userscripts.org/scripts/show/42944
There's one for almost every video site. Then there's the rtsp that are coded/locked to their own flash player (or something like this). |
Re: How To : Associate MPlayer, Transmission, and other apps as default handlers
qole: thanks, this is assume!
I am trying to play an audio/x-wav file using mplayer. after the last update I now see Open with dbus switchboard. However , when I click this I get the error: No Handler configured for this type In Handlers I see a line : Mplayer /usr/bin/mplayer -quiet "%realparams%" in URIs I see the line: audio-x-wav hildon-dbis-switchboard-desktop In Defaults I see audio/x-wav hildon-dbis-switchboard-desktop so what am I missing? |
Re: How To : Associate MPlayer, Transmission, and other apps as default handlers
OK, I've fixed the GUI again. Now it doesn't mangle the URI defaults file. I'll upload a new version later today...
|
Re: How To : Associate MPlayer, Transmission, and other apps as default handlers
Just to get educated where can I see your updated sources?
|
Re: How To : Associate MPlayer, Transmission, and other apps as default handlers
niv: you have to also change the setting in XRefs to
.wav MPlayer (or replace ".wav" with whatever the file extension is) Don't forget to save! EDIT: as I've said before, this is python, so it isn't compiled. The .deb IS the source file. |
Re: How To : Associate MPlayer, Transmission, and other apps as default handlers
HA. Figured it out! If you are trying to get rtsp streaming working with dbus-switchboard, please wait for 1.2.12 because that's where I finally figure out that I had to add an rtsp line to the dbus-switchboard.desktop file!
With this version, you just change the rtsp line in the URIs tab and dbus-switchboard will take over. Then you have to figure out how to get it to play in the media player of your choice. |
Re: How To : Associate MPlayer, Transmission, and other apps as default handlers
Nice work :). I was comparing the desktop files for dbus-switchboard and mediaplayer, I see which line you meant (x-osso-uri-open). Tried adding it myself but i must have been missing something.
Thank you |
Re: How To : Associate MPlayer, Transmission, and other apps as default handlers
Working like a charm!
I got VLC working with rtsp streams by doing the following: Created a Handler for VLC Player with the command: vlc "%params2%" Created an X-Ref for .sdp extension, associated with VLC Player Changed URI entry for rtsp to hildon-dbus-switchboard.desktop Now watching BBC1 via TV Catchup without any sync issues! :) |
Re: How To : Associate MPlayer, Transmission, and other apps as default handlers
Quote:
Also big thanks to qole for making this possible. |
Re: How To : Associate MPlayer, Transmission, and other apps as default handlers
Any luck with megavideo, youtube?
And how about mPlayer? |
Re: How To : Associate MPlayer, Transmission, and other apps as default handlers
Quote:
but the issue still persist even with current update. I read that this is python, but hoped to see your changes in a git, to see how you solved the latest issues, so I can learn more. but when I install this package from deb on my N800 - it works fine |
Re: How To : Associate MPlayer, Transmission, and other apps as default handlers
niv:
I haven't put this in a git repository because this code really isn't mine. I've hacked a few pieces of it to fix bugs and Maemo 5 OS changes, but it is mainly the same package. Does your filename end in .wav because it needs to have that extension to work... Are you having these problems on an N900 or an N800? |
Re: How To : Associate MPlayer, Transmission, and other apps as default handlers
1. yes my filename does end with .wav
2. given the same dbus-switchboard It doesnt work on the N900 but does on the N800 |
Re: How To : Associate MPlayer, Transmission, and other apps as default handlers
Quote:
From the browser, it immediately launched OO Writer when clicking on an odt file, but when I did so for the first time, at one point during the long wait for OO, mypaint opened on top of it, and I swear I haven't even touched the phone while it was doing that. I have to see whether this is reproducible, since so far it's a one-timer. |
Re: How To : Associate MPlayer, Transmission, and other apps as default handlers
Perhaps it's of interest how many mistakes I made before successfully adding OO Calc as a handler for .ods files :o Unless there are some good ways of improving the GUI, there definitely needs to be a howto in wiki.maemo.org eventually!
First, new entries to XRef did not show up at all, because I was typing in the handler manually instead of choosing from the drop-down menu. Don't know how many times I tried before working that out. Then, in entering the file extension, it was not clear whether I needed to type in [ods] or [.ods] or ods or .ods, so I tried first simply ods. Such a faulty entry in XRef could however not be deleted, although it disappeared when closing and reopening the GUI without saving. Well, I finally made it, and it immediately worked, without having had to reboot (as I had expected from the notice that popped up during installation). :) EDIT: A more minor detail: the icon for the GUI is almost completely invisible in the Maemo menu. Only while pressing on it do I briefly see a greyish wormlike thing. |
Re: How To : Associate MPlayer, Transmission, and other apps as default handlers
Since I've managed to add .ods and .odp handling, I now want to do something more useful for myself (I'm not really using OO much), namely to add support for e.g. postscript files. I would like to have them handled by Easy Debian's evince, because the Maemo version is not capable of that and more excitingly I could immediately print them out from evince on network printers via CUPS.
Evince in Easy Debian can handle the following mime types Code:
application/pdf |
Re: How To : Associate MPlayer, Transmission, and other apps as default handlers
niv:
I got .wav files to associate with dbus switchboard by changing both audio/wav and audio/x-wav in the defaults. I think you may have missed the first one... |
Re: How To : Associate MPlayer, Transmission, and other apps as default handlers
rebhana:
You have to add non-existant types to /usr/share/applications/defaults.list manually. And yes, I am aware that the GUI, not written by me, could use some serious work. I would like to try making a new GUI in qt as part of my self-training. But I don't know if or when I'll get the time to do that. So probably the best thing for now is to start documenting all the quirks and tricks of this GUI, and if I get an opportunity, I'll write a new GUI. |
Re: How To : Associate MPlayer, Transmission, and other apps as default handlers
I have encountered a (for me) more serious problem with dbus-switchboard:
On the archive for scientific preprints, I had no difficulty reading pdf files either with the osso-pdf-viewer or evince by opening for example this paper by Stephen Hawking, http://arxiv.org/pdf/0710.2029, in the browser. Even though this does not have a file extension pdf, it is recognized as a pdf file and handled accordingly. But with dbus-switchboard installed, it no longer opens the osso-pdf-viewer or evince, because it's no longer recognized as pdf. It instead offers dbus-switchboard as a catch-all application, but that apparently works on file extensions only. So I de-installed dbus-switchboard, and this now works again. Would you have an idea of how to make that also possible with dbus-switchboard or would that require a completely different setup not based on file extensions? Btw, I noticed that the deinstallation is not restoring everything to the previous state. Before, /usr/share/applications/defaults.list was a symlink to /etc/gnome/defaults.list, and now they are separate with different contents. That doesn't seem to have any effects as far as I see, though. |
Re: How To : Associate MPlayer, Transmission, and other apps as default handlers
dbus-switchboard currently only handles files with file extensions.
The simple solution here is to download files and add extensions, then use the file manager to open the files with dbus-switchboard. The more complex, but far better, solution is to figure out how to pass the detected mime type to dbus-switchboard and use that to determine the handler, rather than the file extension. Does anyone know how to pass the mime type to dbus-switchboard? |
Re: How To : Associate MPlayer, Transmission, and other apps as default handlers
Quote:
Quote:
Code:
Exec=evince |
Re: How To : Associate MPlayer, Transmission, and other apps as default handlers
Quote:
I don't think you are passed the mimetype, but you are passed the full path which is enough to figure out the MIME type in your program (I think GnomeVFS has functions for this). |
Re: How To : Associate MPlayer, Transmission, and other apps as default handlers
I had only inspected dpkg -L evince, not evince-common, so I missed
/usr/share/dbus-1/services/evince.service Code:
[D-BUS Service]Btw, the Maemo port of evince is great - I'm just sorely missing postscript support. |
Re: How To : Associate MPlayer, Transmission, and other apps as default handlers
Apologies if I'm misunderstanding you. I don't use Easy Debian so I'm unfamilar with its workings, but I believe you'd have to go through DBus Switchboard and get it to run Easy Debian Evince as the script wouldn't know of recieving arguments via D-Bus, which is part of how "associations" work in Maemo. Wow, reading that, I realise I bring nothing new... again, apologies.
Quote:
I should get to get to updating it though and making some interface changes. I think moving the contents list to a HildonTouchSelector would be nice... |
Re: How To : Associate MPlayer, Transmission, and other apps as default handlers
Quote:
Dbus-switchboard is in fact working for the Easy Debian applications. Only trouble is that it depends on explicit file types. |
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:
from gnome import gnomevfs print "%s" % gnomevfs.get_mime_type("/home/user/MyDocs/treeview-tutorial.pdf") Python also has a standard mimetypes module if an external dependency is not your thing. (Sorry it's not got CODE tags around it, but my JS is disabled in Tear and the symbol input fails to come up if the clipboard is populated) |
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:
Back to the problem, an interim solution could be make dbus-switchboard ask for a manual xref when it can't find a known extension. |
Re: How To : Associate MPlayer, Transmission, and other apps as default handlers
I find it interesting that Maemo pretends to use the /etc/gnome/defaults.list file but it doesn't really, it still uses the /usr/share/applications/defaults.list ...
I find it interesting, too, that I copy the original file to a safe location, and then copy it back in my postrm file. But how is it that the file that my postrm script copies back upon removal of dbus-switchboard is different than the file it was supposedly linked to? |
Re: How To : Associate MPlayer, Transmission, and other apps as default handlers
OK, qwerty12's gnomevfs suggestion prints the correct mimetype for both a local PDF with no extension and Dr. Hawking's paper on the web.
So now to fundamentally rewrite dbus-switchboard to use mime types instead of extensions :) EDIT: I installed python-gnome2 and just did "import gnomevfs" |
Re: How To : Associate MPlayer, Transmission, and other apps as default handlers
Quote:
EDIT: After having studied the postinst, postrm, and dswitch-ini.sh scripts, I also don't understand how the symlink could have been broken by installing and deinstalling dbus-switchboard.:confused: |
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
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 :)). If people express any interest in this approach, I could rewrite the app to use the mimetypes as the primary method, and then it could try file extensions as the backup. It's been good programming experience, anyway. |
Re: How To : Associate MPlayer, Transmission, and other apps as default handlers
I cannot install it because of a conflict with "gnome-python" dependency.
|
Re: How To : Associate MPlayer, Transmission, and other apps as default handlers
New update conflicts with gnome/python and is unnstallable.
|
Re: How To : Associate MPlayer, Transmission, and other apps as default handlers
I'm uploading a new version due to a postinst error...
Should I switch to gnome-python as my dependency? python-gnome2 seemed so much cleaner to use... Can anyone tell me what package uses gnome-python? |
Re: How To : Associate MPlayer, Transmission, and other apps as default handlers
Quote:
Quote:
Sth. like: Quote:
Quote:
|
Re: How To : Associate MPlayer, Transmission, and other apps as default handlers
fmms uses gnome-python.
|
Re: How To : Associate MPlayer, Transmission, and other apps as default handlers
I'll try qwerty12's suggestion to use either of the two packages.
And DaSilva is right, who cares about what other apps use gnome-python!? No man dare interfere with the mighty fmms! |
| All times are GMT. The time now is 11:07. |
vBulletin® Version 3.8.8