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-07-11 21:12

Re: How To : Associate MPlayer, Transmission, and other apps as default handlers
 
Sash, Feedingit must not be able to handle parameters passed on the command line. This thread has some tips for sending parameters via dbus. Alternately, you can ask FeedingIt's developer to make the app accept command line parameters.

Sash 2010-07-11 23:47

Re: How To : Associate MPlayer, Transmission, and other apps as default handlers
 
Cheers anyway qole. I'll have a look through the thread for more info on sending parameters via dbus.

Slocan 2010-07-12 21:30

Re: How To : Associate MPlayer, Transmission, and other apps as default handlers
 
Like qole said, FeedingIt doesn't understand the command line parameter you are giving it. To add a feed, you can use this command line:
dbus-send --session /org/maemo/feedingit org.maemo.feedingit.AddFeed
'string:http://rss.example.com'
If that doesn't do what you want, please submit a feature request for FeedingIt.

qole 2010-07-12 22:22

Re: How To : Associate MPlayer, Transmission, and other apps as default handlers
 
Sash: You can add that dbus-send command to dbus-switchboard, in the Handlers window. Substitute %params% where Slocan has "http://rss.example.com" and it should work.

Sash 2010-07-12 23:40

Re: How To : Associate MPlayer, Transmission, and other apps as default handlers
 
I'm afraid it didn't work for me :( . I'll make a feature request for it though.

This is what I get in X-Term:
Code:

dbus-switchboard.py
dbus-switchboard started
--
-- dbus-switchboard: Received an RPC to mime_open.
-- dbus-switchboard: RPC had arguments ['http://feeds.digg.com/digg/popular.rss'].
-- dbus-switchboard: Interface is org.dbus.switchsvc
-- dbus-switchboard: user_data is <osso.context.Context object at 0x407bf030>
------
-- params : file://http://feeds.digg.com/digg/popular.rss
-- params2 : http://feeds.digg.com/digg/popular.rss
-- realparams : file://http://feeds.digg.com/digg/popular.rss
-- realparams2 : http://feeds.digg.com/digg/popular.rss
------
-- dbus-switchboard (runcmd) : /usr/bin/run-standalone.sh dbus-send --session /org/maemo/feedingit org.maemo.feedingit.AddFeed 'string:file://http://feeds.digg.com/digg/popular.rss' &


Slocan 2010-07-12 23:54

Re: How To : Associate MPlayer, Transmission, and other apps as default handlers
 
I apologize, it looks like the dbus-send command requires a couple more arguments (not exactly sure why though). Try with this:
dbus-send --print-reply --dest='org.maemo.feedingit' --session /org/maemo/feedingit org.maemo.feedingit.AddFeed 'string:%params%'
However, there shouldn't be the "file://" in front of the URL. Maybe with %params2% ?

qole 2010-07-13 00:13

Re: How To : Associate MPlayer, Transmission, and other apps as default handlers
 
Slocan's right, use %params2%

timwatt 2010-07-13 01:19

Re: How To : Associate MPlayer, Transmission, and other apps as default handlers
 
m-player on my n810 (with gui) could play gsm encoded .wav files.
i have tyred kMplayer and it cant play them.

So I was wondering with the command line MPlayer will play gsm encoded .wav files?

if so (i would like to test it) how do you open a wav file from the command line?

And if i want to set MPlayer as my dealt handler for .wav files from e-mail and file manager, is the how too distilled into a Wiki or do I have to read the 317 posts to find the info ;-)

thanks

Sash 2010-07-13 09:29

Re: How To : Associate MPlayer, Transmission, and other apps as default handlers
 
I've tried it again with the new code but unless I'm doing something wrong that doesn't work as well:

Code:

$ dbus-switchboard.py
dbus-switchboard started
--
-- dbus-switchboard: Received an RPC to mime_open.
-- dbus-switchboard: RPC had arguments ['http://feeds.digg.com/digg/popular.rss'].
-- dbus-switchboard: Interface is org.dbus.switchsvc
-- dbus-switchboard: user_data is <osso.context.Context object at 0x407bf030>
------
-- params : file://http://feeds.digg.com/digg/popular.rss
-- params2 : http://feeds.digg.com/digg/popular.rss
-- realparams : file://http://feeds.digg.com/digg/popular.rss
-- realparams2 : http://feeds.digg.com/digg/popular.rss
------
-- dbus-switchboard (runcmd) : /usr/bin/run-standalone.sh dbus-send --print-reply --dtest='org.maemo.feedingit' --session /org/maemo/feedingit org.maemo.feedingit.AddFeed 'string:http://feeds.digg.com/digg/popular.rss' &
Usage: dbus-send [--help] [--system | --session | --address=ADDRESS] [--dest=NAME] [--type=TYPE] [--print-reply=(literal)] [--reply-timeout=MSEC] <destination object path> <message name> [contents ...]


Big Phat Jan 2010-07-13 09:47

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

Originally Posted by Sash (Post 750069)
I've tried it again with the new code but unless I'm doing something wrong that doesn't work as well:

Code:

$ dbus-switchboard.py
dbus-switchboard started
--
-- dbus-switchboard: Received an RPC to mime_open.
-- dbus-switchboard: RPC had arguments ['http://feeds.digg.com/digg/popular.rss'].
-- dbus-switchboard: Interface is org.dbus.switchsvc
-- dbus-switchboard: user_data is <osso.context.Context object at 0x407bf030>
------
-- params : file://http://feeds.digg.com/digg/popular.rss
-- params2 : http://feeds.digg.com/digg/popular.rss
-- realparams : file://http://feeds.digg.com/digg/popular.rss
-- realparams2 : http://feeds.digg.com/digg/popular.rss
------
-- dbus-switchboard (runcmd) : /usr/bin/run-standalone.sh dbus-send --print-reply --dtest='org.maemo.feedingit' --session /org/maemo/feedingit org.maemo.feedingit.AddFeed 'string:http://feeds.digg.com/digg/popular.rss' &
Usage: dbus-send [--help] [--system | --session | --address=ADDRESS] [--dest=NAME] [--type=TYPE] [--print-reply=(literal)] [--reply-timeout=MSEC] <destination object path> <message name> [contents ...]


Typo alert - dtest should be dest.

I don't think you need to go through dbus-switchboard if feedingit has been set up to recieve params through dbus though - what happens if you just change your default rss reader to feedingit?

(EDIT) Looks like people more versed in how feedingit works have already commented so I guess that's not so easy...

Cheers,
Jan


All times are GMT. The time now is 16:19.

vBulletin® Version 3.8.8