LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Redirect an app resource folder from system /usr/share to /home/user/[app]/usr/share (https://www.linuxquestions.org/questions/linux-software-2/redirect-an-app-resource-folder-from-system-usr-share-to-home-user-%5Bapp%5D-usr-share-4175459116/)

minyor 04-22-2013 06:59 AM

Redirect an app resource folder from system /usr/share to /home/user/[app]/usr/share
 
Hi all! I new on this forum and have a question.

I'd like to have ability to install a new version of any application (gimp, inskape, codeblocks, whatever..) on GNU/Linux system for testing purpose alongside with old stable one (installed by package manager) without a need to uninstall it first.

(If assuming that I have no problems with libraries dependencies).
I know that I can simple unpack '*.deb' or '*.rpm' file/files into some directory, say /home/user/appl and then create simple starting shell script wich will add binary path (/home/user/appl/usr/bin) and shared objects path (/home/user/appl/usr/lib) into the environment variables: 'PATH' and 'LD_LIBRARY_PATH' correspondingly.

But how can I specify a program resources (/home/user/appl/usr/share) path?

I had searched the environment variable for this in the google but found nothing so far. Without specifying it, new version of an application do load resources for old version of app. and thus not works properly.

I read that if you compile a program from source code, and if I understand it correctly, you can specify program's whole local 'root' directory (like: /opt/a/usr, /opt/a/usr/bin, /opt/a/usr/share, ...) using 'make --prefix=/opt/a'. If so, can I somehow change that '--prefix' to already compiled executable binary file so it would load resources not from '/usr/share' but from '/home/user/appl/usr/share'?

If either of this is not an options then can you please help and give me some other better options if any to achieve my goal. Thanks.

I use Ubuntu 12.10 64bit system.

evo2 04-23-2013 12:00 AM

Hi,

if you don't what to recompile, the easiest approach might be to use a chroot. Variations on the following search might be of use:

https://duckduckgo.com/?q=linux+use+...+test+software

Evo2.

minyor 04-23-2013 06:44 AM

Quote:

Originally Posted by evo2 (Post 4936945)
Hi,

if you don't what to recompile, the easiest approach might be to use a chroot. Variations on the following search might be of use:

https://duckduckgo.com/?q=linux+use+...+test+software

Evo2.

Hi. Thank you for your respond.
I actually always thought about chroot as a command that used only for
booting process of the linux system, i.e. on earlier stages of booting kernel or something..

But now I'll give it a more close look and try to investigate.
Thanks for the link, it seem good place to start.


All times are GMT -5. The time now is 03:26 PM.