Beta Gmpc


Stuckie

Member
Joined
Apr 7, 2004
Messages
492
Age
38
Location
Tired, and sleeping in the basement...
Website
www.stuckieworld.net
That was fun.

This is a bit of a hacky thing as GMPC spits stuff all over /usr/share like most GNOME apps seem to do, I've noticed.
Also, MPD's server roots want it to keep tabs on /var as well.

This will do the following NAND writes once, and only once:
Symlink between ~/.gmpc and appdata/.gmpc
Symlink between /usr/lib/gmpc and appdata/usr/lib/gmpc
Symlink between /var/mpd and appdata

It will also perform an AUFS mount on appdata/etc and /etc every time you run it.. though I can possibly get away without doing this, and I can clean the script up a bit so it checks whether you've installed it or not, and doesn't bother you again.. for the moment, I just want to make sure this actually runs on other people's Pandoras.

Anyway, the ~3Mb PND is here for those interested: http://www.stuckiegamez.co.uk/apps/pandora/gmpc.pnd and includes FLAC support ( which doesn't seem to be installed on the NAND by default for some reason? )

If you've installed it from opkg and want to use this PND, you'll need to remove it, and ensure you've wiped the above folders that the script symlinks, else it might not work properly.

Oh and I've set MPD's media folder to be /media .. so hopefully anything you plug in - SD card or otherwise - will get picked up when you update MPD's database :)

This'll probably do till someone gets round to rebuilding from source ( I had a quick look at it, and it was complaining about glibc-2.6 for some reason.. but a quick look was literally all I did! )
 
yea I noticed.. still not wholly sure what folder structures are guaranteed with the PND system to be able to say "stick all logs in /path/to/appdata" so I'm doing a symlink from wherever the system's unloaded the PND to; which seems to be /mnt/pnd/gmpc where it mounts the PND as a loopback device and is thus read-only, and /mnt/utmp/gmpc where it does an AUFS with the appdata folder on the SD card.

If it's guaranteed that /mnt/utmp/<app title> is where the AUFS binds essentially get stored, I'll be happy to set it up for that in the next release ( which'll probably be tomorrow.. as the pop-up boxes are annoying me already! ) as that means it's only the /usr/share that's an issue, and that's generally a compile time flag as to where that tends to be, unfortunately.

NINJA SOMEGUY!
Ahem.

Yea that's an arse of an error as I spent a good few hours tracking it.. so here's what I did, to see if it's something I've cocked up, or not.
With GMPC running, open a Terminal.
cd /mnt/utmp/gmpc
LD_LIBRARY_PATH=./usr/lib ./usr/bin/mpd

If you get any errors here, these are the important ones! let me know what they are and I'll get on it :)
If you don't.. try connecting GMPC and seeing what happens.. let me know either way, please.. I could've just missed something out.
 
Stuckie said:
If it's guaranteed that /mnt/utmp/<app title> is where the AUFS binds essentially get stored, I'll be happy to set it up for that in the next release ( which'll probably be tomorrow.. as the pop-up boxes are annoying me already! ) as that means it's only the /usr/share that's an issue, and that's generally a compile time flag as to where that tends to be, unfortunately.
By reading /usr/pandora/scripts/pnd_run.sh, I'd say /mnt/utmp/$BASENAME is guaranteed :D (see lines #175 and #177)
BASENAME is it's -e parameter, which by default is taken from your <application id="VALUE"> in the PXML (as seen in the .desktop files generated)

Stuckie said:
cd /mnt/utmp/gmpc
LD_LIBRARY_PATH=./usr/lib ./usr/bin/mpd

I'ld go with a script like this one for the exec command :
Code:
#!/bin/sh

export HOME=$(pwd)
export LD_LIBRARY_PATH=$HOME/usr/lib:${LD_LIBRARY_PATH:-"/usr/lib"}
exec $HOME/usr/bin/mpd

I've yet to add the "export HOME" in my pnds :D but I'll. this is an easy fix for the fact that $HOME is on the NAND.
The "exec" allow bash to not fork to start mpd (leaving a process les on the system :D)

/me is going back to find why pnd_make don't like my squashfs-tools :(
 
Last edited by a moderator:
Fantastic, thanks for that :)
So much documentation everywhere it's hard to piece things together sometimes, but a quick forum post always has someone who's aware of it point you in the right direction!

It shall be updated tomorrow and I shall try clean it up a bit :)
Might have another go at GIMP as well while I'm at it!
 
Stuckie said:
With GMPC running, open a Terminal.
cd /mnt/utmp/gmpc
LD_LIBRARY_PATH=./usr/lib ./usr/bin/mpd

Still the same error, yeah.
 
Last edited by a moderator:
Stuckie said:
hmm? what terminal output did running mpd give you?
GMPC is having issues connecting to MPD, so we need to run that manually ( as above ) to figure out why :)
It should spit out a bunch of stuff in the console when you run that, I need a copy/paste of it, please.

Wait... do I have to install MPD? I assumed it was part of the PND. :)
 
Last edited by a moderator:
Stuckie said:
It is part of the PND, that's why you need to open GMPC first ( so the PND mounts ), then call up a Terminal, cd /mnt/utmp/gmpc, and run MPD from there while GMPC is running ;)

I assumed it would run automatically. I make a lot of assumptions, huh?

Error loading shared library 'libflac.so.8' no such file or directory.
 
Last edited by a moderator:
It should, as it's setup to do so... but as you've got a connection error, I'm trying to figure out why :)
So, I'm getting you to start it manually incase I buggered it up, or if MPD has errors, as you'll only get the errors if you run it from a terminal where you can see the output.
Otherwise, it loads up in the background and you could be none the wiser as to what's gone wrong, though it is supposed to spit out a log file in your appdata folder, so you could see if it's spat something out there as well.

[edit]
Odd, libFLAC is definitely in there.
Make sure you run it as something like: LD_LIBRARY_PATH=/mnt/utmp/gmpc/usr/lib /mnt/utmp/gmpc/usr/bin/mpd ( should be able to run that from anywhere really, as long as GMPC is running. )
Otherwise it wont find it's libraries.
[/edit]
 
I have a corrupt MP3 on my card. The log says it was happily adding files till it came across it. I crashed Cmus trying to load that folder too. Quite why it became corrupted is a mystery! Perhaps I rebooted the machine while Mplayer wan running, I dunno.

Gonna attempt to remove the file and see what happens.

Make sure you run it as something like: LD_LIBRARY_PATH=/mnt/utmp/gmpc/usr/lib /mnt/utmp/gmpc/usr/bin/mpd ( should be able to run that from anywhere really, as long as GMPC is running. )
Otherwise it wont find it's libraries.

Nope. Still cannot find FLAC.
 
hmm.. that really makes no sense at all o_0
Let's make sure I did actually put it in there, then: ls /mnt/utmp/gmpc/usr/lib [edit] let's get the sodding path right, first ;) [/edit]
If it's not in there, I've buggered something up, if it is in there.. I'm at a loss.. doing a LD_LIBRARY_PATH call before the binary is a standard way of letting the application know where to find it's libraries.. that doesn't appear to be working for you 0_o
 
the problem I had connecting to localhost on my opkg install came from "the network cannot be reached", which makes me think it's a problem with the loopback interface
 
That sounds about right, I just got that error at work while trying to run it, as it'd not connected to a network.

Bit annoying that.. I'll have another fiddle and see what I can do.

[edit]
Yea, confirmed of sorts.

When connected to a network, this'll work.
If not, it has issues with localhost for some reason.. so the loopback device is buggered.

I'll clean the PND up soon, anyway.. still fiddling with Debian just now :)
[/edit]
 
Back
Top