![]() |
Re: How To : Associate MPlayer, Transmission, and other apps as default handlers
Quote:
I do think that I have things working, with direct modification of the both defaults.list files. I've got a PM in to pipeline to have him test it out, and put it into his .deb with the install scripts. Hopefully it will work... and his tablet won't start on fire as soon as he runs it... |
Re: How To : Associate MPlayer, Transmission, and other apps as default handlers
Hey thanks for the code and ideas... I did manage to run the new interface and it looks great. I do have some 'first thoughts' on this but it will probably take me a few days to get around to look over what you've already done (so some may not be relevant) :
DBus from python : Yes, as i understand it (hvacengi), in mlbviewer you are launching dbus normally which will go through defaults.list. If we are to intercept a mime type we cant use that method because it will come back to us... thats where dbus-send comes into play. Unfortunately, its a bit hackish (sometimes it launches app and sometimes it needs app loaded and it may behave differently if its a single instance program like media player or if it allows multiple windows like microb. About sudoers : My first though was separate registration into separate .py file whose sole purpose is to update the defaults.list, but now that i see your gui i think it might be better to sudo the entire dbus-switchboard-gui python file and run the whole program as root... thats less of a hole than leaving capability to copy arbitratry file and overwrite defaults.list as 'user'... less important because its a tablet, but probably more acceptable to long time linux users. Sudo on the gui at least the user sees what hes about to do rather than it getting overwritten as a blip in someone elses ui-less script to cp that file. At first, I got an error because i did not have a '/usr/share/applications/uri-action-defaults.list~' file... but you should not use the ~files since they are created when i call my '/usr/bin/dswitch-ini.sh' script from my .deb postinstall (and i dont change the uri-actions file so no backup (hence the error). This looks great... thanks for the work... i'll look over the code over the next few days and try to stress test it. Update : now that i think about it your probably parsing the ~file to see the hildon default? If so we can package together an unused defaults.list (with all maemo apps as defaults) for reference and hide it in /usr/lib/dbus-switchboard for you to use intead of ~ files since my current implementation of those ~ files is not reliable enough to use anymore (useless if you install/upgrade more than once on any given os flash) |
Re: How To : Associate MPlayer, Transmission, and other apps as default handlers
Quote:
Quote:
I'm going to have to take a second look at the dbus mime calls. It looked like the dbus services received a method call of "mime_open" from the internal maemo mime handler. Since switchboard gets called instead of that dbus method, I thought that switchboard could instead place the osso.rpc call directly to the service. I only looked at it long enough to get my audio/video running though, I could have been way off base. I really wish there was documentation that came with all of the services, it sure would be easier to wrap my head around (If some one does know of said documentation, I'd love to be directed to it!) Thanks for taking a look at it, I'm sure you're going to have fun ironing out various bugs. I do apologize, I forgot to mention that I fixed my implementation of tracking if the file was saved, and did not implement your new version that did the same (thanks to me forgetting to update to 1.2.2 before editing.) Thanks for all the hard work! |
Re: How To : Associate MPlayer, Transmission, and other apps as default handlers
Thanks both of you... This is going to be kick-@ss.
|
Re: How To : Associate MPlayer, Transmission, and other apps as default handlers
I have added hvacengi's new GUI program into a version 1.23 easy edition (in first post).
It works great, and i can toggle types between native hildon apps and dbus-switchboard now... so for mp3, i can intercept for xmms or disable default for normal Media Player... without rebooting. So no longer need to edit any files. You may need to reboot after install... if the menu link doesn't start the program, then reboot. If you use personal-menu or personal-launcher, you will need to delete and re-add the shortcut since startup has changed. Thanks hvacengi for all your work on making this GUI simple enough for casual use and users. :D It will allow me to try many more combinations of file types and handlers now. |
Re: How To : Associate MPlayer, Transmission, and other apps as default handlers
Just noticed that dbus-switchboard seems to struggle with differing-case file extensions, e.g. .pdf / .PDF
Any chance of a fix? (No hurry, I've just renamed the offending file) :) |
Re: How To : Associate MPlayer, Transmission, and other apps as default handlers
I've been playing with dbus switchboard for the last few days, trying to get it to work in every situation. It looks like I'm going to have to release a new version of Easy Debian (to fix a few bugs revealed by this), but when I do, you'll be able to click on a Word document in an e-mail attachment and have it open in OpenOffice Writer.
pipeline, please add .jar and .jnlp as filetypes, and I'll keep messing about to get Easy Debian passing parameters properly, so that (debbie java -jar "%params%") will work to open Java applets, and (debbie javaws "%params%") will open Java Web Start applets. A workaround for the problems with parameters that the "debbie" script is having is to replace "debbie" in the Easy Debian handlers with "sudo debian hilda" ... this works as expected. |
Re: How To : Associate MPlayer, Transmission, and other apps as default handlers
Thanks guys... i'll fix the case-sensitivity and add debian java handlers and xrefs.
I'll probably release this weekend with those changes, so make any other simple suggestions now and i'll add those as well. I think i'll also move the xref and handler configuration files to /usr/lib/dbus-switchboard and lock down as root... the gui will still have permission to edit the files but user can't update, only read. |
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
Um, yeah, about that. Two things:
1. grandcentral/mobile just doesn't work to stream those mp3s to the tablet. I get an error from GC, 400 bad request, no matter what I do. They play if you save them first... 2. xmms handler should be: [code] /bin/sh -c "LC_MESSAGES=C LANG=C /usr/bin/xmmsctrl launch main 0 equalizer 0 play_list 0 main 1 %params%" [code] |
All times are GMT. The time now is 15:54. |
vBulletin® Version 3.8.8