OESF Portables Forum

Everything Else => General Support and Discussion => Zaurus General Forums => Archived Forums => Software => Topic started by: mike_r on April 27, 2004, 03:26:07 pm

Title: Why doesn\'t the xmms GUI work on Sharp ROM?
Post by: mike_r on April 27, 2004, 03:26:07 pm
Hi,

I\'d dearly like to be able to use xmms-embedded v. 7 on my 5500 with the Sharp 3.13 ROM (actually the Cacko kernel but it\'s essentially 3.13). Version 5 does work, but is buggy, so I\'d like to give 7 a try. I\'ve installed it and all its dependencies and I\'ve done some homework. Here is what I know.

If I click on the xmms icon or run it from the command line, the program begins, but no GUI pops up; it appears to be hung. But, if I start a second terminal,  I can send it commands like \"xmms -p\" and \"xmms -f\" which tell the original xmms to play or fast forward a song, and these work! I can play mp3s and oggs, build a playlist (by hand) and step through it, etc.; I just don\'t get a pretty GUI.

Any ideas or tips? Has anyone tried compiling it specifically for Sharp ROM? I\'m assuming this is an opie vs. qte thing, but perhaps there is some trick to it?

Mike
Title: Why doesn\'t the xmms GUI work on Sharp ROM?
Post by: cmisip on April 27, 2004, 09:40:49 pm
I have run into this also.  Running as root I get the error \"Qt embedded directory is not owned by user 0\" and it quits. The only way i got it to run is by ssh into zaurus as root and running xmms.  Or by opening  a terminal on the Z and running as root \"ssh localhost\" and then xmms.  It seems like a permissions error somewhere but I am not sure where.
Title: Why doesn\'t the xmms GUI work on Sharp ROM?
Post by: mike_r on April 28, 2004, 12:59:52 pm
cmisip -

SWEET! I saw your comments on the shoutcast thread, and have been able to reproduce your results. The fact that it works as root means there is nothing fundamentally weird about the build or the opie/qte issue. So I have hope that an adequate amount of headbanging and permission twiddling will allow me to run it normally as zaurus.

BTW, the GUI glitches that I saw in v 5 don\'t seem to show up in v 7, so now I am even more eager to get v 7 running.

Since v 5 runs as zaurus, I\'ll try to do a permission check between the two versions and see if I can discover anything that way.

Mike
Title: Why doesn\'t the xmms GUI work on Sharp ROM?
Post by: tumnus on April 28, 2004, 03:57:22 pm
You could just hold your stylus down on its icon and tick the \'Run as root\' box. It probably tries to write/access config files under /home/root
Title: Why doesn\'t the xmms GUI work on Sharp ROM?
Post by: mike_r on April 28, 2004, 05:31:08 pm
Quote
You could just hold your stylus down on its icon and tick the \'Run as root\' box. It probably tries to write/access config files under /home/root

Nope - that isn\'t enough. Don\'t know why, but it is something deeper than that.

Mike
Title: Why doesn\'t the xmms GUI work on Sharp ROM?
Post by: cmisip on April 28, 2004, 06:52:28 pm
I found out that you dont have to do a \"ssh localhost\" at all.  Just do a \"export LOGNAME=root\" as user root and run xmms.  Getting closer.
Title: Why doesn\'t the xmms GUI work on Sharp ROM?
Post by: mike_r on April 29, 2004, 04:28:11 pm
Yes, I caught the \"export LOGNAME\" thing from the other thread.

I do have a new data point. I have a little script with the following:

#! /bin/sh
LOGNAME=root
sudo /home/QtPalmtop/bin/xmms

This works reliably when run from a command prompt as user zaurus. I\'ve tickled so many permissions, that I\'m not sure it is sufficient, but it does work. I now compare results when I run this script vs. when I run /home/QtPalmtop/bin/xmms directly (from the command prompt). They both dump the same information to the screen up through loading the playlist, but then the plain \"xmms\" command hangs when trying to start some timer. This is what I see:

Quote
...
Added /usr/mnt.rom/card/Documents/audio/ogg/12_Storms_In_Africa_II.ogg
Playlist loaded
pl set pos flushing
SONGSPLAYED=0
                   ------    this is where it hangs; if I use the script, I then see the following
Creating timer object
Making connections
Starting timer
Initializing done
Starting playing
Setting oss_p_p
...

So I guess there is some timer somewhere that \"zaurus\" isn\'t allowed to touch, but \"root\" is. It doesn\'t seem to be something in /dev (I\'ve changed all the permissions), maybe something in the kernel that qt accesses?

I\'ll keep slogging.

Mike
Title: Why doesn\'t the xmms GUI work on Sharp ROM?
Post by: cmisip on April 29, 2004, 11:04:04 pm
I too tried a bunch of things but couldn\'t get user zaurus to run with the gui.  I\'m ok with running it as root I just want to be able to run it from the zaurus menu.  How do you map a menu entry to an app or script?
Title: Why doesn\'t the xmms GUI work on Sharp ROM?
Post by: cmisip on April 30, 2004, 11:48:30 pm
Ok I figured it out. Runs from the menu now.
Title: Why doesn\'t the xmms GUI work on Sharp ROM?
Post by: mike_r on May 01, 2004, 01:44:07 am
Arf. I was just going to proudly announce that I got it all figured out, but you beat me to it by 2 hours :-) The key for me was learning to use \"#! /bin/bash --login\" in my shell script: then the Apps icon started working (as user zaurus). I\'ll post my full set of notes on Monday. Maybe if others are interested, we can craft a HOWTO?

Thanks for your insights, cmisip. I\'m off to enjoy a few tunes :-)

Mike
Title: Why doesn\'t the xmms GUI work on Sharp ROM?
Post by: cmisip on May 01, 2004, 04:23:25 am
I already have it up on http://cmisip.home.insightbb.com/index.htm (http://cmisip.home.insightbb.com/index.htm)
If you wish to add anything, let me know.  Thanks for your insights as well.


Currently listening to some classical music via shoutcast xmms.  
Title: Why doesn\'t the xmms GUI work on Sharp ROM?
Post by: xamindar on May 04, 2004, 02:27:44 am
Hey I just did your howto cmisip.  Thanks for your great instructions I now have xmms working!  I had to do a few little extra things to get it working for me so I\'ll say them hear in case anyone else is installing xmms from scratch.

1.  I had to make the directory /usr/local/qt-embedded/lib/fonts before symlinking it.
2.  Run \'ldconfig\' after it\'s all installed but before I started it so xmms would see libxmms.so.1 and probably other libs.
3.  and \'chmod +x xmmsplay.sh\' or a similar command so the script will be executable

These are simple things but they might not be obvious to the newbie.  Hope it helps anyone using cmisip\'s howto.
Now it all works for me so far.  Except there is no taskbar icon for xmms which makes it a pain to get back if it loses focus.

Anyone know how to get it to have a taskbar icon?  Is it something to do with the way it is started?  The script, root?

Thanks again cmisip and mike_r for figuring this out.
Title: Why doesn\'t the xmms GUI work on Sharp ROM?
Post by: orthogonal on May 04, 2004, 06:29:33 pm
Can someone explain why it\'s necessary to run xmms as root?
Title: Why doesn\'t the xmms GUI work on Sharp ROM?
Post by: orthogonal on May 04, 2004, 08:08:11 pm
How do I set a start up directory for xmms? /home/zaurus isn\'t a great place to syartup (mostly because so many programs throw crap into /home/zaurus for lack of any batter idea)

If a .xmms/xmms.m3u exists, xmms will load it on startup and write the current playlsit to it on exit. It will overwrite even if the file is -w; how can I make this file ro -- I\'d like to load teh same playlist regardless of what playist existed at last exit.

Thnaks.
Title: Why doesn\'t the xmms GUI work on Sharp ROM?
Post by: orthogonal on May 05, 2004, 03:28:09 pm
when I was using xmms 0.5 (I guess it\'s actually called 0.00005), I assigned xmms to the \"email\" button, so that pressing the email button started xmms if it wasn\'t already started, and switched to it if it was. Following the directions in cmisip\'s tutorial, I\'ve gotten xmms 0.00007 running, but with the email button assigned to xmms, pressing the button either does nothing or runs xmms without the gui window. The icon will start xmms, but it won\'t switch to an already running instance.

Any idea how to fix this, and parenthetically, why does everything about the zaurus have to be some incredibly difficult?
Title: Why doesn\'t the xmms GUI work on Sharp ROM?
Post by: xamindar on May 05, 2004, 04:45:50 pm
Qtopia doesn\'t seem to even be aware that xmms is there when it is running, ie. it doesn\'t have an icon in the taskbar nor is it listed in the task list applet.

Assigning a button to it doesn\'t do any good because it will not run without the script you had to make for it.

Can anyone offer any suggestions as to why these things are so?
Title: Why doesn\'t the xmms GUI work on Sharp ROM?
Post by: xamindar on May 05, 2004, 06:00:30 pm
Well, disregard my last post I guess.
I reformated my zaurus last night because of some card mounting issues and reinstalled everything from scratch, just finished installing xmms and the icon shows up now.  Everything works like normal with xmms now.  There must have been something messy in my system before that messed it up.  You could have at least told me that yours worked, thanks a lot guys.
Title: Why doesn\'t the xmms GUI work on Sharp ROM?
Post by: cmisip on May 05, 2004, 06:32:03 pm
xmms run the way stated in the tutorial actually reads the xmms.m3u from the /home/root/.xmms directory.  The /home/zaurus/.xmms/xmms.m3u is untouched.  You can probably just create a script to overwrite the /home/root/.xmms/xmms.m3u file with the copy from /home/zaurus/.xmms. each time xmms exits.  

Xmms needs to be run as root and the LOGNAME varilable set to root or else you will not get a gui.  Have you made sure that the email link satisfies this?
Title: Why doesn\'t the xmms GUI work on Sharp ROM?
Post by: xamindar on May 05, 2004, 08:25:08 pm
Ok, will somebody please help me out here, this is driving me insane.

The taskbar icon is now gone again.  It doesn\'t show up at all even though I get an xmms gui.  What could have happened?  It worked when I first installed it, I haven\'t changed anything.

Xmms gives this in the konsole while starting up:
-----------------------OSS INIT
Internal bps 176400
STEP 2048
bs: 3,176400
Allocating memory soon! 529200 bytes
Allocating memory! 529200 bytes
OK! prebuf: 40b6e008 5292
SONGSPLAYED in open = 0
Processing Qtopia gui for XMMS 3.1.2
QPE init started
Opened !
Read
Read
Read
Read
Read
Read
Read
Read
Read
Read
Misc init started
Creating FileBrowser object
QPixmap::convertFromImage: Cannot convert a null image xmms
QPixmap::convertFromImage: Cannot convert a null image xmms
QPixmap::convertFromImage: Cannot convert a null image xmms

Processing MAD MPEG Decoder plugin 0.1.0
Proceddes
Processing MikMod Player 1.2.7
Proceddes
Processing MPlayer plugin1.2.7
Proceddes
Processing Ogg Vorbis Player 1.2.7
Proceddes
Processing Reference FLAC Player v1.1.0
Proceddes
Processing SHN Player 2.2.5
Proceddes
Processing Wave Player 1.2.7
Proceddes
Processing xmms-sid SIDPlay plugin 1.0.0
Proceddes
Plugins ok
Playlist loaded soon
Playlist loaded
Creating timer object
Making connections
Starting timer
Initializing done      


Is this error (the one in bold) something to do with the problem.
What could be causing it not to get a taskbar icon?  Permissions?

Somebody please help.
Title: Why doesn\'t the xmms GUI work on Sharp ROM?
Post by: orthogonal on May 05, 2004, 10:03:43 pm
xamindar,

I had the same problem: the gui appeared but the icon did not.  I\'m not sure why I had the problem, but I have a few suggestions:

1) make sure that xmms is not running by doing a ps -e | grep xmms, and killing the instance with the lowest pid if it exists. Note that running a single instance of xmms will cause six separate processes to be created.

2) xmms creates a \"lock file\" semaphore in /tmp, one for each user\'s instance of xmms. if it sees the lock file, xmms won\'t run (possibly only if allow multiple instances if the config file is false). Delete the semaphore with:
rm /tmp/xmms*

3) or you can do what I did first, and uninstall and re-install xmms

the messages you highlighted appear every time xmms is run, even when run successfully, and so I think have no bearing on the problem.

Finally, while xmms .00005 is somewhat buggy -- my main complaint is that it will hang itself of the system if the network goes down -- .00007 has no apparent additional features; I\'m strongly considering going back to .00005. If there are good reasons to stick with .00007 despite it being a pain, please let me know.
Title: Why doesn\'t the xmms GUI work on Sharp ROM?
Post by: orthogonal on May 05, 2004, 10:05:48 pm
Quote
xmms run the way stated in the tutorial actually reads the xmms.m3u from the /home/root/.xmms directory.  


Sorry, I\'d symlinked both /home/root/.xmms and /home/zaurus/.xmms to the default /.xmms in /opt.
Title: Why doesn\'t the xmms GUI work on Sharp ROM?
Post by: xamindar on May 06, 2004, 04:05:38 am
Thank you orthogonal for your suggestions.  I even reinstalled xmms and then the icon worked a couple of times, I the rebooted and no more task icon.  I don\'t get it.

What\'s the point of the fonts being symlinked to /usr/local/qt-embedded/lib/fonts like it says in the tutorial?  I just removed it for kicks and xmms still starts up and works (still no icon though).
Title: Why doesn\'t the xmms GUI work on Sharp ROM?
Post by: orthogonal on May 06, 2004, 04:35:24 am
Quote
Thank you orthogonal for your suggestions.  I even reinstalled xmms and then the icon worked a couple of times, I the rebooted and no more task icon.  I don\'t get it.

What\'s the point of the fonts being symlinked to /usr/local/qt-embedded/lib/fonts like it says in the tutorial?  I just removed it for kicks and xmms still starts up and works (still no icon though).


As to the fonts, the xmms config file allows specifying the playlist and the \"currently playing\" font. Presumably it expects to find fonts in the directory cmisip indicated.

As to the icon, I don\'t really have an answer, and intended to revert to xmms .0005. Both versions are very sensitive to the existence of, and file permissions of, files and directories in /tmp, notably qt-embedded and the xmms-username.0 semaphore file.

Also, xmms will attempt to allocate way too much memory (50MB or something) if it can\'t read a user-specific config file, in /home/username/.xmms.

Frankly, and as a programer myself, I don\'t wish to be ungrateful, but xmms-embedded seems not to work well with Qtopia -- although, admittedly, the xmms-embedded web site does make this clear.
Title: Why doesn\'t the xmms GUI work on Sharp ROM?
Post by: xamindar on May 17, 2004, 05:15:28 am
Well I figured out what was making the icon fail to show up on the taskbar.  When I edited the xmms.desktop file to execute the script instead of the xmms binary the icon would then fail to show up in the taskbar.

Simple fix:  have two xmms.desktop files.  I moved the original to my Settings tab where it would be out of the way then put a copy of it in my Applications tab and edited the copy to use the script.  
So I have two xmms.desktop files, one that executes the binary (which doesn\'t work but is needed for the taskbar icon to show) and the other that executes the script like the howto says and starts xmms!  (both do not need to be called xmms.desktop, you can change the file names for example if you want them both in one tab)

What a simple solution to the only reason xmms was not perfect for me, and now it is!  I hope this helps others who have had this problem.  It seems qtopia needs to be able to associate a taskbar item with running programs by using the .desktop file.

Good luck!