Search code examples
linuxubuntudebianlinux-mint

Is it possible to assign a second "/" directory, as you would other environment variables such as PATH, LD_LIBRARY_PATH, etc?


I'm using Linux Mint for this example.

As an example, I've extracted geany and geany-common into a folder using dpkg-deb. I attempt to run it:

cd ~/Packages/geany/usr/bin
./geany

I'm given the error:

(geany:9716): Geany-ERROR **: 07:02:33.815: Cannot create user-interface: Failed to open file “/usr/share/geany/geany.glade”: No such file or directory

The program is looking for the (hardcoded?) location /usr/share/geany, which I don't have because I unpacked a .deb file. Obviously using a package installer/building from source/directly copying the files would fix this, but that's not what I'm trying to do.

Is it possible assign a second "/" to ~/Packages/geany/ so when Geany runs, it assumes that both "/" and "~/Packages/geany/" are the root of the filesystem and finds the files it needs?


Solution

  • One way is to do an overlay mount via OverlayFS (tutorial). I'm not sure if you can overlay / itself, but you can probably overlay /usr & friends.

    Another thing to try, without adding a second root directory, is to dockerize geany.