Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Thu 27 Aug 2015, 15:37
All times are UTC - 4
 Forum index » House Training » HOWTO ( Solutions )
Share Programs and Data WITHIN Your MultiPup Computer -v
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [8 Posts]  
Author Message
davids45


Joined: 26 Nov 2006
Posts: 731
Location: Chatswood, NSW

PostPosted: Sat 23 May 2015, 03:28    Post subject:  Share Programs and Data WITHIN Your MultiPup Computer -v
Subject description: Share data, run programs from a data partition, reducing the size for new Pup partitions.
 

I've done a 'boy-look' through some of the How To forum threads and didn't find any on this possibility or process, so …...

For those who like to try different Pups, and can't shake themselves free of the Windows' "must install to take over a complete partition/drive" reflex, here is a beginners' How To on sharing data and programs/packages between a few or many Full Puppies on a single computer.

The target of this 'How To' for multiPuppers is to keep each Puppy partition very small and, by symlinks or by pinboard drags-and-drops, use your same programs and data whichever Pup you decide to run.

The method requires a separate 'data partition' on the hard-drive which is mounted when any Pup boots. The data partition ideally should be as big as possible.

A data partition can of course hold the normal 'data stuff' such as photos, music, videos, documents, etc., but also have Puppy operational files and profiles for sharing to all these Full Pups. Frugals too can share, data and programs when an sfs is not preferred.

Running Programs
1) Many packages can be run from **Expanded Pets on the data partition. Good for those big packages that now don't require separate installation in every Pup.
Drag the executable file from the data partition to each Pup's pinboard/desktop.
For example, LibreOffice calc can be run from its expanded pet directory,
/mnt/sda5/libreoffice-4.2.4/opt/libreoffice4.2/program/scalc by dragging to a Pup's pinboard - then click the new scalc pinboard/desktop icon to run it.

2) Symlink (absolute link) all or some of the expanded Pet files from the data partition to the same path location in each Pup.
From the Pet's /usr/bin, drag between two Rox windows to the new Pup's /usr/bin. Choose 'Symlink Absolute' (- not 'Copy' or 'Move') when dropping
For a Menu entry, sym link from /usr/share/applications/xxx.desktop of the Pet directory to the Pup /usr/share/applications/.
All the Pet files or directories can be manually sym-linked in the extreme situation where special files are needed and the package won't run entirely from the data partition.
Seamonkey can be run in a Seamonkey-less Pup by symlinking a seamonkey bin on the data partition (/usr/bin/seamonkey/seamonkey) to the Pup's /usr/bin/ location. The full seamonkey directory at /usr/lib/seamonkey/ on the data partition can be linked to /usr/lib/ on the Pup by a Rox-to-Rox window mouse-drag.
Wine may also work from being sym-linked from a data directory to each required directory on a Pup – some wine directories are hidden so take care to link all the wine directories.
Library files for running packages (e.g. in /usr/lib/ ) can use symlinks from a libraries directory on the data partition.

3) Program Data
Many programs create profiles or data that can be shared if the data or profile is running from the data partition.
Osmo sets up a /root/.osmo directory to store data. Copy your main .osmo directory to the data partition then link this back to the Pup's root/.osmo (now delete the original one in the Pup). Link new Pup osmos to this.
Firefox uses a profile via /root/mozilla/firefox/xxx.default. Copy this default directory to the data partition then link back to /root/.mozilla/firefox/ and edit as text the .ini file to open the symlink.
Seamonkey email can be stored on the data partition by opening the Preferences or Settings option in Mail and setting this to a directory on the data partition.
LibreOffice – in Options, set the Paths defaults defaults and templates to directories on the data partition.

Downloads by browsers, or other programs that do downloads for you, can be directed to a Downloads directory from their Preferences menu.

Fonts (/usr/share/Fonts) can also be replaced by links to a directory of fonts on the data partition.

Caches and Temp files can also be directed to use suitable data partition directories by looking in most programs' Preferences or similar.
Using the same Profile for your browser can help with odd things like installing printers – Cups will recall your original settings for your printers so adding printers to a new Pup is a bit easier.

Once you have set up your present/main/preferred Pup to run off the data partition, as much as you like, doing the same for other Pups should see the same data being available whichever Pup you start up.

Backing up regularly of your data on its data partition is now easier and more practical.

**Expanding a Pet
This is the reverse of making a .pet with the console script dir2pet. The desired pet2dir doesn't exist so a program to reverse (de-compress) the pet to its own directory retaining the paths for all the files is needed.
Muppy-Filer will expand a xxx.pet to a directory of its own.
(http://www.murga-linux.com/puppy/viewtopic.php?t=32575 – needs some extra files as mentioned in the thread; other file managers may do the same expansion)
Copy or Move this expanded-pet directory to a readily found directory on the data partition – e.g. /mnt/sda5/PuppyArchive/Expanded_Pets

Before going overboard with this method (next section), try it with just one new Pup or on a test partition to see if it suits your way of using the computer, as well as checking that it actually works as described.

Setting Up Your Hard-drive(s) - maximize minimum-Pup-sized partitions

Assuming an empty hard-drive is to be set up for Puppies

A Full Puppy (other than the latest Quirky) needs about 1GB of drive space to install into and operate. The following are some possible scenarios. Tweak to taste.

Only Full Pups:
Allowing 3GB per Full Pup, use GParted from a Pup LiveCD to format the hard-drive into 13 3GB partitions (ext2/3/4), one linux-swap partition of about 500MB, and format the remaining space into one hopefully large data partition (ext2/3/4).

Mixed Pups (Fulls and Frugals):
If you want to also run Frugal Pups, make 12x3GB partitions for (twelve) Fulls, one 500MB linux swap, one 30GB partition for Frugals (should easily hold about 30 Frugal Pups, and the remaining space format for your sharing data partition.
With so many Pups possible on one computer, you could use a separate grub menu.lst for all the Frugals, keep just the Fulls on the main menu.lst

Only Frugals
One 30GB partition (for the Frugals and sfs packages), a linux-swap of about 500MB, and the remainder as your data partition. Just one partition is quite acceptable for the Frugals-only set-up but a separate data partition may still be easier for data back-up - backing up a Pup itself is of limited value given its rapid re-installation in case of a Pup failure.

Existing formatted hard-drive
If there are existing partitions you wish to keep (e.g. Windows), then if you wish, compact or resize those existing partitions with a Live-Pup GParted (will be a very slow process)
Then, in the free space, create as many 3GB Full Pup partitions as you can or want, but leaving at least 50GB+(?) as your new data partition. Scale this to suit your available hard-drive if it is smaller than say, 100GB.
If you already have a data partition, expand this to include the empty space once the small Full Pup partitions are created.

Partitioning Rules
The normal maximum number of partitions per hard drive is 16 but one partition number is lost as it becomes your 'extended partition' and has the remaining 13 possible partitions ('logical') inside it.
So fully packed, a drive will have 3 primary partitions and 12 logical partitions sitting inside one extended partition. Away from Windows, what goes where doesn't seem to matter.


Mounting Your Data Partition at Boot
Some Pups have programs or scripts to already offer this.
Otherwise, into each new Pup's /root/Startup directory, copy a script that mounts the data drive so it is accessible almost immediately.
For example, with 2 hard drives each having data partitions, e.g. sda5 and sdb3, I copy this script file (I call it 'mount_at_boot') from my Puppy Archive directory on one of my data partitions into a new Pup's Startup directory (Full & Frugal all need this):

Quote:
#!/bin/sh
mount /dev/sda5 /mnt/sda5
mount /dev/sdb3 /mnt/sdb3


Edit my 'sda5' to match your partition identifier, and the 'sdb3' if you have another drive's data partition to play with, or just delete that line. Make this file/script executable via its properties and copy it for re-use to your data partition, as well as to each /root/Startup.

To minimize catastrophes, I suggest you could start with just two or three different Full Pups on 3GB partitions, use one to explore your program and data links, and only once happy with this first one, extend the links etc to your other Full Pups, and Frugals, if you get keen.


Summary
What Data for sharing from a Data partition?
Browser Cache - set from Preferences in the Browser
Downloads - set from Preferences in the Browser
Browser Profile - set from /root/.mozilla
Mail - set from email Preferences in the Browser
Temp files - set from Preferences/Options in all possible packages to a Temp directory
My Documents, etc - set from Preferences in office-type packages
Photos, videos, music, etc - each type in its own directory
Miscellaneous - all of none of the above that you would like to access or save from every Pup on your computer.

To readily access any data frequently used or wanted, simply drag that data partition directory icon (e.g. with Rox) onto each Pup's pinboard. For example, 'Downloads' 'Puppy Archive' 'My Documents'.
If the data partition is not mounted, an exclamation mark icon will show this un-mounted condition. Hovering over this icon will often show the right icon if the issue was just a timing mismatch during booting.

Running Packages/programs from the Data Partition
Expand Pets or SFS to a data partition directory retaining their path structure
Make-your-own from working directories (e.g. wine) copied to the data partition
Drag to the pinboard program bin files – many will run this way
Symlink files to one or all equivalent directories

If nothing from all this works for you, just do regular Pet installations. Three GB is still enough for a Full Pup with quite a few Pets.

Example pinboard images
The Gparted image is of my main desktop's sda drive showing its partition structure and sizes, how much is used and free, and so on. My sdb (second) hard-drive is much the same but with different Full Pups.

The Multiple Rox-boxes image indicates, via the wobbly lines, how
- a program can run commonly from sda5 by dragging its executable (in this example, LibreOffice Calc) to the pinboard. There are exceptions with some Pups and some programs to this simple method.
- a program can be run by a symlink from sda5 (here, Seamonkey to /usr/bin)
- a profile be shared by a symlink (again, Seamonkey .default to /root/.mozilla/seamonkey/)

The third image has the various data directories within the sda5 data partition I have set up to suit my sharing desires across the Pups. Keeping some within a /PuppyArchive directory can be helpful at times.

David S.
gparted_sda.jpg
Description 
jpg

 Download 
Filename  gparted_sda.jpg 
Filesize  144.07 KB 
Downloaded  170 Time(s) 
slacko56_sda5_progs.jpg
Description 
jpg

 Download 
Filename  slacko56_sda5_progs.jpg 
Filesize  193.47 KB 
Downloaded  78 Time(s) 
sda5_exampled.jpg
 Description   
 Filesize   148.49 KB
 Viewed   321 Time(s)

sda5_exampled.jpg

Back to top
View user's profile Send private message 
stemsee

Joined: 27 Jun 2013
Posts: 1298
Location: In The Way

PostPosted: Mon 25 May 2015, 03:31    Post subject:  

Maybe a simple srcipt to scan /mnt/Data/./././ for either .desktop files or executables in 'path' /bin,/sbin,/usr/bin,/usr/sbin,/usr/local/././ etc might save the manual linking and also be easily reversible in case of the need to remaster (or you'll have lots of unemployed yellow triangles hanging around your desktop! lol).

But yeah the idea has potential.
Back to top
View user's profile Send private message MSN Messenger 
mikeb


Joined: 23 Nov 2006
Posts: 11071

PostPosted: Mon 25 May 2015, 08:27    Post subject:  

all sounds a bit hairy really... seems more like you need a way to save /root that all can load instead....or a shared save folder just for /root using the union rather than a pile of links and scripts. Indeed you could insert a save folder on the fly. (or image file)

Otherwise you can choose a save file at boot... hardware settings do resolve in the main and if its the same hardware it should not matter anyway.

just thinking of ways you could use with existing puppy structure.

mike
Back to top
View user's profile Send private message 
tallboy


Joined: 21 Sep 2010
Posts: 510
Location: Oslo, Norway

PostPosted: Mon 25 May 2015, 10:11    Post subject:  

Why not just run from a live CD, which gives you access to all partitions, but leaves Windoze untouched?

tallboy

_________________
True freedom is a live Puppy on a multisession CD/DVD.
Back to top
View user's profile Send private message 
stemsee

Joined: 27 Jun 2013
Posts: 1298
Location: In The Way

PostPosted: Tue 26 May 2015, 02:44    Post subject:  

Mikeb's idea of choosing save folder at boot seems to be the best solution. Any pup you boot could load the 'common' savefile. So the initrd init script would need to have code added to recognize and load a second 'common' savefile not specified in DISTRO_SPECS . Similar idea to my utilities which loaded a second savefile and copied contents to present savefile on the fly.
Back to top
View user's profile Send private message MSN Messenger 
mikeb


Joined: 23 Nov 2006
Posts: 11071

PostPosted: Tue 26 May 2015, 05:26    Post subject:  

I pointed gyro here as he is looking at inserting folders on the fly to the union...seems like it might just be useful here.

mike
Back to top
View user's profile Send private message 
gyro

Joined: 28 Oct 2008
Posts: 792
Location: Brisbane, Australia

PostPosted: Mon 01 Jun 2015, 03:46    Post subject:  

I don't get why you would want to load a 'common savefile' on the fly.
Surely it would be better to do it during 'init' as an 'adrv' or 'ydrv', modifying the 'init' code to support a simple directory if necessary.

Re: this thread:
I've always used only frugal installs, and stored 'shared apps' in sub-directories of "/mnt/home/apps" which get symbolic linked into "/opt".
But the principle is the same; you use a directory in a Linux partition that gets mounted at the same mount point in every puppy.

gyro
Back to top
View user's profile Send private message 
mikeb


Joined: 23 Nov 2006
Posts: 11071

PostPosted: Mon 01 Jun 2015, 05:45    Post subject:  

I get the feeling many do not like playing with the initrd.... and i suppose a mod in the main system is easy to add as a pet.

Just seems to me using the union in some way avoids some of the other more hairy schemes that abound.
I used to do it myself but started to go crosseyed. Plus having a dozen or so apps in sfs files is no problem including sharing those...which only leaves configs . On one machine I share thunderbird profile windows and linux... but that's it really ...as it happens 2 of main systems have had save folders for 5 years now so that makes quite a difference.

Plan B...multiboot less... we have one default linux and windows... the rest is for me to experiment with Very Happy Surely one system should fulfil all your needs after all.

mike
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [8 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » HOWTO ( Solutions )
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.2646s ][ Queries: 12 (0.0135s) ][ GZIP on ]