OESF Portables Forum

Model Specific Forums => Sharp Zaurus => Zaurus - pdaXrom => Topic started by: tovarish on February 15, 2007, 05:49:45 am

Title: Zaurus Remote And Xmms Tip
Post by: tovarish on February 15, 2007, 05:49:45 am
All the posts that i have seen regarding using the ce1 remove with xmms involve keeping xmms in the foreground and remapping the remote keycodes to c,v,b,n etc.
What i found that if you bind the remote keys as follows in fluxbox for eg.

None XF86AudioPlay   :ExecCommand /usr/bin/xmms -t
None XF86AudioStop   :ExecCommand /usr/bin/xmms -s
None XF86AudioPrev   :ExecCommand /usr/bin/xmms -r
None XF86AudioNext   :ExecCommand /usr/bin/xmms -f

then xmms need not be in the foreground and you dont need to remap the remote keys in x. I am sure you can do this in other window managers too.
The advantage here is that if xmms is not running then it will be started by the remote key press.
The only disadvantage of this is that you cannot use the remote keys in any other application. They are bound to xmms. Maybe i will write a script that will send the remote button press to mplayer or xmms whichever is running and it will start one of the two depending on user preference.

The volume up and down keys are the only ones left and i am yet to find a mixer application that can increase or decrease volume from key presses. something like $MIXERAPP -increase and $MIXERAPP -decrease. mixmos is not capable of this

tovarish.
Title: Zaurus Remote And Xmms Tip
Post by: pelrun on February 15, 2007, 10:04:02 pm
In fact, that's exactly what the default pdaxrom setup does. It's definitely not an improvement, though, because it involves loading a new instance of xmms for every button press registered.

If autorepeat is on for those keys (likely) then holding down a remote button for too long ("too long" being about a second or so...) will cause your Z to spawn lots of xmms instances, it will run out of memory, and it will lock up hard.

I'm working on an app to handle the remote properly; it's currently matchbox only but I intend to make it wm-independent.
Title: Zaurus Remote And Xmms Tip
Post by: tovarish on February 16, 2007, 02:02:50 am
you can force xmms to load only one instance. Such and option is present in the xmms options.

tovarish
Title: Zaurus Remote And Xmms Tip
Post by: pelrun on February 16, 2007, 05:29:52 am
If only it was that easy. To implement that flag, the extra instance of XMMS has to be loaded into memory, start up (not bringing up a GUI, but still allocating a bunch of memory), detect the previous instance of XMMS and tell it any remote command passed on the commandline and then shut down.

When 20+ instances of xmms all get spawned simultaneously, this happens:

1) every instance of xmms tries to grab its (big) chunk of memory
2) the Z runs out of memory
3) every instance of xmms halts, waiting for more memory
4) NO instance of xmms ever gets far enough along to shut down and release what it's already grabbed
5) the Z gets stuck.

The only ways to avoid this are by disabling autorepeat on the keys bound to the XMMS controls, or to use a much more lightweight app to capture the keys and communicate with XMMS via it's control API's.
Title: Zaurus Remote And Xmms Tip
Post by: daniel3000 on February 16, 2007, 05:52:38 am
I vaguely remember there to be a  kind of  command-line based remote control for xmms somewhere in the feeds.
I may be wrong, though.
Can't find it right now.

daniel
Title: Zaurus Remote And Xmms Tip
Post by: zeigerpuppy on February 16, 2007, 08:33:07 am
this thread may be relevant
It talks about xmmsctrl

https://www.oesf.org/forums/index.php?showtopic=12195 (https://www.oesf.org/forums/index.php?showtopic=12195)

There is also an app floating around called xmms shell but have not seen this on the zaurus.

I noticed that the zaurus wakes to remote key presses (good),
 but is there a way to turn it off from the remote?