Can I use a sync application in home directory?

Booting, installing, newbie
Post Reply
Message
Author
geo_c
Posts: 115
Joined: Mon 15 Nov 2010, 04:38

Can I use a sync application in home directory?

#1 Post by geo_c »

Is it possible to use a sync application like syncthing to sync the home directory, or at least the pupsave directory on linux partitions, to essentially run the same OS on different machines. Perhaps the machines could not be actively running simultaneously. Or perhaps they could. Let's say I was on one machine, and the pupsave was writtten to by another machine in the sync directory, would that be pure madness?

Or just a big crash?

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#2 Post by disciple »

Some software can't run multiple instances in different X sessions in the same user account. Browsers come to mind.
Syncing your home directory at bootup/shutdown would be slightly different, but I think you'd run into the odd problem if you tried to run on several machines at the same time.
Do you know a good gtkdialog program? Please post a link here

Classic Puppy quotes

ROOT FOREVER
GTK2 FOREVER

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#3 Post by disciple »

Would rdp or x11vnc suit your use case? Perhaps Xpra?
Do you know a good gtkdialog program? Please post a link here

Classic Puppy quotes

ROOT FOREVER
GTK2 FOREVER

User avatar
6502coder
Posts: 677
Joined: Mon 23 Mar 2009, 18:07
Location: Western United States

#4 Post by 6502coder »

WHOA! Before offering advice to the OP, can we first ask, WHAT IS HIS ACTUAL OBJECTIVE? It's not clear to me at all.
Is it possible to use a sync application like syncthing to sync the home directory, or at least the pupsave directory on linux partitions, to essentially run the same OS on different machines. Perhaps the machines could not be actively running simultaneously. [emphasis mine]
If I take the man at his word, this is obviously infeasible...isn't it?

1. He's contemplating sync'ing a pupsave onto different machines. How on earth can one and the same pupsave file/folder be expected to work on different machines, unless those machines have exactly the same hardware?

2. "Perhaps the machines could not be actively running simultaneously..." Uh, only "perhaps"? That means he's NOT RULING OUT the possibility of running simultaneously! That in turn suggests that when he says "sync" -- and note he did not simply say "copy" -- what he has in mind is a continuous, real-time multi-way synchronization where any pupsave file/folder changes on one machine are propagated instantly to all the other machines.

Isn't this obvious madness? What am I missing??

geo_c
Posts: 115
Joined: Mon 15 Nov 2010, 04:38

Am I talking about Network Boot?

#5 Post by geo_c »

Yeah, the operating system is operating hardware, so the two systems are different. But I can still just copy a savefile to another device. It's all a little beyond my comprehension. I just need a mainframe I guess!

Am I talking about Network Boot? I've never used it, so am in the dark.

User avatar
Mike Walsh
Posts: 6351
Joined: Sat 28 Jun 2014, 12:42
Location: King's Lynn, UK.

#6 Post by Mike Walsh »

Mm. I guess, in theory at least, it could work - but I'm not so sure as Syncthing would be the application I'd choose.

On several occasions, I've copied an entire Puppy install - save-file/folder & all - from one machine to another, re-run Grub4DOS, and it's fired up without issue. This is, I would guess, all due to the fact that the kernel always auto-detects its operating environment at boot; that's a built-in part of its standard routines.

Certainly, I can see how you could do this on the same machine. You'd keep the pup-save in a remote location, sym-linked into, and always accessible by, each Pup that's going to use it. Of course, on any given machine, you can only run one OS at any given point in time (unless you're talking about a VM, or a chroot 'jail', but they're 'special' cases, not used by your average individual.....and to the best of my knowledge, a chroot 'jail' never creates a save-file/folder anyway.)

It's a totally logical assumption that the pup-save can only be in use by one machine at any given time.

Syncthing's issue is that it's active all the time.....and that's why it's not suitable for use in this situation. It would make far more sense, for sharing between different machines, to 'sync' the pup-save in question manually, between those machines, at a time when neither of the Pups in question will be using it.

I don't see that this is something that could be automated, unfortunately. Just my two-penn'orth, FWIW.

{Edit:- Perhaps it might be possible to write a script to run rsync on the pup-save at shutdown, and to put a line to call that script into /etc/rc.d/rc.shutdown.....immediately before executing 'wmpoweroff'? It would make shutdown take a very long time, however.....and this kinda thing's getting way out of my personal comfort zone, anyway. :lol:)

Just a thought.....I see where disciple's coming from. I'm 'blue-skying', here, and simply throwing ideas out.


Mike. :wink:

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#7 Post by disciple »

You haven't clarified why you want to do this.

If you are trying to avoid maintaining multiple configuration files for all your software, then I'd suggest you look into some of the solutions people use to e.g. store them in a git repository. Or search to see if there is already a solution specifically for running multiple machines from the same home directory (it seems like the sort of problem that someone will have tried to solve already, but the solution is likely to be so niche that almost nobody will have heard of it).

If you want to share browser history, bookmarks etc between machines then there are mainstream solutions for that.

If you want to share documents and files between machines and you don't just want to keep them on a single server, you should probably be looking at things like Dropbox. And if you really need simultaneous editing you should be using tools specifically designed for that.
6502coder wrote:1. He's contemplating sync'ing a pupsave onto different machines. How on earth can one and the same pupsave file/folder be expected to work on different machines, unless those machines have exactly the same hardware?
Haven't people been running Puppy off usb sticks and multisession CD/DVD, switching between different machines for many many years?
2. "Perhaps the machines could not be actively running simultaneously..." Uh, only "perhaps"? That means he's NOT RULING OUT the possibility of running simultaneously! That in turn suggests that when he says "sync" -- and note he did not simply say "copy" -- what he has in mind is a continuous, real-time multi-way synchronization where any pupsave file/folder changes on one machine are propagated instantly to all the other machines.

Isn't this obvious madness? What am I missing??
People do essentially this with "roaming profiles" in a well known other "operating system". Syncing the user profile, not the entire operating system, so I guess errors would be slightly less noticeable. I've done it quite a bit there, and when I was in engineering school I would boot the machines there into Ubuntu or whatever the Linux option was; it's likely I logged in to that on more than one machine at a time too.
I assume you lose data doing it in either Windows or Linux - I don't recall any major disasters, but I was probably very careful not to do things that I would lose.
Do you know a good gtkdialog program? Please post a link here

Classic Puppy quotes

ROOT FOREVER
GTK2 FOREVER

geo_c
Posts: 115
Joined: Mon 15 Nov 2010, 04:38

#8 Post by geo_c »

Actually guys, it's a much simpler reason. I get tired of maintaining so many pupsave files. I'm getting spoiled by puppy. Just being able to backup an entire system with data into one neat package is not enough for me. I've been copying save files to replicate systems for sometime, and sometimes with mixed results. For instance, if I fine tune a puppy system on an ext partition, I can copy it into a frugal ntfs savefile by expanding that savefile unmounting it and boot ram mode, or another puppy system, delete all the files in the pupsave, then copy the ext pupsave directory straight into the empty 3fs.

It works. So the kernel sets the hardware configuration when it boots, Regardless of where it was last time. The pupsave is all the "user" files. I'm not a coder, or IT person or anything like that, I'm a musician, and I get some whacky ideas. I'm guessing that multiple kernels could not be mounted to the same 3fs, but if it might be possible to share the same savefile, as long as only one device has access to it at a given time.

User avatar
rufwoof
Posts: 3690
Joined: Mon 24 Feb 2014, 17:47

#9 Post by rufwoof »

I tend to keep OS/system separate from user/data i.e. not include any data within puppy saves, data is all on another partition/elsewhere and backed up/restored separately.

Save's to me are just a means to update/change the OS/system. Typically I strive to keep that clean so mostly just boot, use and don't save at session end. But if things are to be changed, then I boot, apply the changes and then save. That way keeps things relatively clean, so you're booting the same 'clean' OS repeatedly.

When data is separated out like that then you can access it from different OS's/puppy versions, even if they're running at the same time.
[size=75]( ͡° ͜ʖ ͡°) :wq[/size]
[url=http://murga-linux.com/puppy/viewtopic.php?p=1028256#1028256][size=75]Fatdog multi-session usb[/url][/size]
[size=75][url=https://hashbang.sh]echo url|sed -e 's/^/(c/' -e 's/$/ hashbang.sh)/'|sh[/url][/size]

User avatar
mikeslr
Posts: 3890
Joined: Mon 16 Jun 2008, 21:20
Location: 500 seconds from Sol

#10 Post by mikeslr »

I basically agree with rufwoof: keep datafiles outside of any SaveFile/Folder. The purpose of a SaveFile/Folder is to preserve changes which --without datafiles-- will only consist of application settings/configurations and the applications you install. I include among my definition of settings/configurations which SFS is to be automatically loaded on bootup; and which 'External Programs' and AppImages are to have menu entries and, thus, be 'immediately' available on bootup.

Datafiles can be opened from anywhere as long as the partition they're on is mounted.

Except for applications built against python, almost all applications can be employed in SFS format and the number of SFSes a Puppy can now load simultaneously is virtually unlimited. With the same exception, many applications can be run as 'External Programs'. Portable Web-browsers are ready-made examples. But you can create your own. Decompress (e.g. UExtract) a pet and move its containing folder to a convenient location. All such External Programs can then be opened by merely calling their binary or binary wrapper. A menu pet can be created for convenience.

Not every Puppy can use the same application, or the same version of an application. My experience is that many 'External Programs' can be used by different Puppies, but each Puppy may require its own version of dependencies such as Qt libraries. Those get installed 'to that Puppy's SaveFile/Folder'. Actually I only use SaveFiles.

Because my datafiles are external, and my added applications are SFSes, AppImages and 'External Programs' my SaveFile are small*, and almost instantly updated if changes are made. Because I don't have to spend time 'stripping SaveFiles' of their settings, configurations and unique applications in order to employ the stripped SaveFile with another Puppy, the amount of time I have to spend maintaining and using multiple Puppies is less than that you incur by doing so.

----
* While fleshing out a new Puppy its SaveFile may become "large". Eventually, when I'm satisfied with a Puppy, I'll remaster using either shinobar's RemasterX, http://www.murga-linux.com/puppy/viewto ... 345#780345 or nic007's nicOS-Remaster-Suite, http://murga-linux.com/puppy/viewtopic. ... 89#1001289. Both of those applications are superior to the builtin remaster application in that all user input is done at the beginning so you don't have to stick around, and read and follow instructions during the remaster process. nic007's suite has a particularly good component which will (essentially) merely unpack both the Puppy_Version.SFS and the SaveFile and combine them into a new Puppy_Version.SFS. It only takes a couple of minutes. Shinobar's is better if your objective is to use the Remaster on a different computer while preserving "First Run Settings" as the initial GUI to appear when booting into the Remaster the first time. [When updating Slacko 5.7.1 to Slacko 5.7.2CE, I initially used Shinobar's to create an interim Remaster but then switched to nic007's in order to update 20+ applications from their builtin versions to the latest available versions].

geo_c
Posts: 115
Joined: Mon 15 Nov 2010, 04:38

#11 Post by geo_c »

damn.

I used syncthing and shared folders in the root directory. I liked the idea, because I have 9 instances of puppies available, The data is sync'd, the desktop and apps are sync'd because they were copied from another puppy initially. If I gum up one on a specific machine, I can go back and grab an earlier copy from another machine.

Seemed like a good idea, but honestly, I've been schooled, and your right, I just need to figure out how to sync the data, outside the root directory, and I think it's as simple as putting the sync folders in the /home directory, that way it doesn't matter what the drive name is.

geo_c
Posts: 115
Joined: Mon 15 Nov 2010, 04:38

#12 Post by geo_c »

and I did a remaster of Puppy Studio back in the day, when it was still called Puppy Studio. Pretty cool, new systems booted up with my name on it!

Post Reply