managing programs that install into several folders

Post here if you are a new Porteus member and you're looking for some help.
jec
Ronin
Ronin
Posts: 1
Joined: 31 Jan 2020, 08:05
Distribution: opensuse/porteus

managing programs that install into several folders

Post#1 by jec » 31 Jan 2020, 08:35

I run Porteus from the usb with the aim of having my useful software available in several different laptops. I have installed through a script that tipically would create folders in /usr/local and /home directories. Trying to keep the system tidy I installed it instead in my /mnt/sdc2/porteus folder, alongside the changes, modules and optional folders but allowed binaries to be installed in /usr/local/bin fearing some problems with PATH. When I boot Porteus in the laptop where I commonly run it, it works with no problem, but when I boot the usb from a different laptop all the modules and changes are applied but cannot run the program. It is probably due to the fact that in that other laptop the porteus folder with /changes and /modules is mounted in a differente device, /sdb2.

Why is it happening? Should I have installed it in /home, perhaps? Also, it would be nice to be able to create a module out of it, but how do you create modules from programs installed in several folders?

Thanks a lot in advance

User avatar
Ed_P
Contributor
Contributor
Posts: 8360
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

managing programs that install into several folders

Post#2 by Ed_P » 31 Jan 2020, 22:09

Hello jec, welcome to the forum. Let me see if I can answer your questions.
jec wrote:
31 Jan 2020, 08:35
Why is it happening?
jec wrote:
31 Jan 2020, 08:35
It is probably due to the fact that in that other laptop the porteus folder with /changes and /modules is mounted in a differente device, /sdb2.
Yup. And the programs you installed have specific references to /mnt/sdc2/.
jec wrote:
31 Jan 2020, 08:35
Should I have installed it in /home, perhaps?
That would probably work because references to /home will changed when the device's address changes.

There is a thing called Magic Folders which might work for you but I've never tried it so I don't know for sure.
jec wrote:
31 Jan 2020, 08:35
it would be nice to be able to create a module out of it, but how do you create modules from programs installed in several folders?
That part is easy, I just don't think it will solve your device address problem.

Code: Select all

cp -a --parents    /var/run/NetworkManager/*                      /tmp/mod/
cp -a --parents    /var/lib/dhcpcd/*                              /tmp/mod/
cp -a --parents    /etc/hosts                                     /tmp/mod/

dir2xzm  /tmp/mod /tmp/$MOD.xzm 
Note none of the input folders is outside the Porteus system's folders and thus have no device addresses.

Another option would be to make the programs you install modules from their original download files which is the whole concept Porteus is build around.


This may or may not help: Undo / Unpair Magic Folders [solved]
Last edited by Ed_P on 31 Jan 2020, 22:23, edited 1 time in total.
Reason: Added a link to a thread about magic folders.
Ed

Post Reply