This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Understanding why it matters where amarok is run from

Tags: None
(comma "," separated)
User avatar
Bernd
Registered Member
Posts
19
Karma
0
OK I have Amarok building and debugging in QtCreator. Big plus. Still in need of a mentor and will lurk on irc and approach listed developers one by one as I can if I have to, but here is today's question.

The way I've configured it QtCreator by builds amarok to $HOME/kde/build/amarok/src then copies the amarok binary to $HOME/kde/bin.

Cool.

If I run the amarok binary in $HOME/kde/build/amarok/src it throws an error:
The amarok database reported the following errors:
The configured database plugin could not be loaded.
In most cases you will need to resolve these errors before Amarok will run properly.

and the Test Connection button on the Configure Database dialog is disabled.

If I run the amarok binary in $HOME/kde/bin (identical binary) it works fine.

Now I have set it up to use an external MySQL database clearly.

Something is awry and I have a gut feel that it's along these lines. The amarok binary finds that I have an external database configured somewhere (todo, figure out how it knows that) but then tries to load a plugin which it can't find in one case but can in the other - i.e. may have a relative path?

I'll throw fish to any performing seal, um developer paying attention, who helps me out here ;-).

Regards,

Bernd.
User avatar
Bernd
Registered Member
Posts
19
Karma
0
I may have found why!

it has to do with the environment variables:

# Environment for Amarok development (and generally KDE stuff I'd say)
export PATH=$HOME/kde/bin:$PATH
export KDEDIR=$HOME/kde
export KDEDIRS=$KDEDIR

Neither Nemo nor QtCreator had them. The CLI did and I could run amarok from the CLI from either directory which was the first clue that set me on that hunt.

Now I just have to find out how to give Cinammon those vars but I understand if they ar ein $HOME/.xsesssionrc that'll work next time I log in. Fingers crossed.
User avatar
Bernd
Registered Member
Posts
19
Karma
0
Done. Indeed, setting:

Code: Select all
# Environment for Amarok development (and generally KDE stuff I'd say)
export PATH=$HOME/kde/bin:$PATH
export KDEDIR=$HOME/kde
export KDEDIRS=$KDEDIR


in $HOME/.xsessionrc and then logging out and in, and all is in order. Cinnamon, Nemo, QtCreator all inherit those variables and amarok binary runs in either director from Nemo or inside of QtCreator. Solved.
leolist
Registered Member
Posts
47
Karma
0
Hi,
Trying to figure out where the amarok config file is kept and your post seems to sort of fit in.

I'm trying to run two versions of amarok from the same account. Thought this would be pretty straight forward by having two scripts; example of one as follows
Code: Select all
# set paths back to original
export PATH=/home/llist/bin:/home/llist/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
export LD_LIBRARY_PATH=
export XDG_DATA_DIRS=/usr/share/ubuntu:/usr/local/share/:/usr/share/:/var/lib/snapd/desktop
#set new paths
export PATH=$HOME/kdedev/bin:$PATH
export LD_LIBRARY_PATH=$HOME/kdedev/lib:$LD_LIBRARY_PATH
source $HOME/kdedev/env/myenv.sh


myenv.sh is as follows
Code: Select all
export KDEDIR=$HOME/kdedev
export KDEDIRS=$KDEDIR
export XDG_DATA_DIRS=$HOME/kdedev/share:$XDG_DATA_DIRS


Turns out that the confiuration of the first implementation of amarok, which uses mysql also shows up when I invoke the second implementation, which doesn't/shouldn't

Thanks


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]