Question about Portable Apps (Puppy Linux)

Fanboi

Well-Known Member
Joined
Apr 16, 2021
Messages
676
Reaction score
596
Credits
8,694
Context:
Technically speaking, yes; AppImages DO "run from anywhere". You can locate them anywhere in the system, click on them to launch and they will - generally speaking - just work. But even here, there's a "file-spec".....because without exception, they unpack themselves into, and run from /tmp for the duration. And /tmp is still a fixed, immutable location....

And they still create their .config files in fixed, 'expected' locations. You move an AppImage from one distro to another, and it will create a fresh set of .config files.....and even if you never use that AppImage in that distro ever again, those .config files remain behind.....just in case.

So you end up duplicating the same files, over & over again, ad nauseam. And THIS was the rationale behind my creation of Puppy's 'portable' apps; the app - AND its .config files - remain within a single, self-contained directory. You can move the portable app from one Puppy to another.......and the .config files move with it, since the launch script is written to set the self-contained directory AS the user's $HOME directory.

No more duplication.....and no need to have to set everything up again.


Mike. ;)

So I did have a glance at Puppy forums, I couldn't find info on the "how", just listing and request for more "portable apps" (Linux, not Windows). Wikipedia only lists Windows portable apps, so I assume this a newish/smaller project like AM. I was just curious about the way that was implemented. I mean in terms of outside the scope of config files, eg apps making use of var, tmp etc., dependencies, and obviously content created. I presume you'd need the package management to be isolated (like Whatsdesk and how it updates itself). So just curious, do these portables mimic a filesystem and ship with dependencies, etc.? Just curious as I'm always curious about how something new I stumble on works (which is why I voided the warranty on almost every appliance we bought as a kid).
 


So just curious, do these portables mimic a filesystem and ship with dependencies, etc.?
AppImages ship with everything they need to run - they also do not need root privileges The key idea of the AppImage format is one app = one file. In other words, each AppImage has no dependencies other than what is included in the targeted base operating system
 
Hi Fanboi

I have quite a few Appimages that work on one OS and do not work on another. When run in a terminal the error is always missing dependencies, usually of the "lib" kind.

Vektor
 
Hi everyone, thanks for the input, but I'm not asking about AppImages, I'm asking about Puppy's "Portable Apps" that Mike Walsh posted about in another thread...


Hi Fanboi

I have quite a few Appimages that work on one OS and do not work on another. When run in a terminal the error is always missing dependencies, usually of the "lib" kind.

Vektor
Yes this can happen because even if all the dependencies are packaged correctly, there may be larger dependencies missing. I mean you're not going to package all X11 into your AppImage, you'll assume that since it's a GUI app, then-- Assumption's the mother of all fu ahem derps because something may change in X11 and create an issue (okay X11 is a bad example, but I'm making a point). You cannot package every dependency's dependencies' dependencies (toungue twister). There'll always be fringe cases, especially if the AppImage is a new version run on an older machine. It's not a silver bullet, but it more or less works. I've had 2 AppImage issues in the last few years since I started braving them. I'm pleasantly surprised more haven't broken. It's largely up to the people packing them and the upstream devs. Sometimes you're lucky and they're both the same people. Since PCSX2 started packaging their own AppImages instead of leaving it to the Linux community, the emulator's been easily 5x better performance (I use AppImages because I have always had issues with PCSX2 on Debian. It works fine on Arch. I think it is Debian was still on the 1.4 version which was way behind. Then was with 10. I believe 1.6 is now on Debian 12, but I can get 2.0 directly from the devs. And it's packed with features). Overrall, I like them. I'll always prefer the version in my repo because 99% of the time it's more stable with better performance. However, if there's an issue or I cannot find the software in my distro, the AppImage is way better than adding repositories or trusting random .debs.
 
@Fanboi :-

Hoo. Well....

Puppy's 'Portable-Apps' came about partly by accident, but mostly because I'd always wanted to emulate what PortableApps.com had been producing for Windows for a long time.

For my very last annual re-install of Windows XP, prior to EOL in 2014, I'd recently discovered Portable Apps.com, and thought it sounded like a very, very neat solution......especially given that each PortableApp contained its own 'mini-registry', and didn't write to the main registry at all. Which - being the case - meant that the things really were truly portable, and could even be run from a flash drive if so desired.

Accordingly, that last re-install got stocked entirely with PortableApps; I didn't 'install' a single app in the normal way at all. And you know what? That last few months, Win XP ran the smoothest & most glitch-free I'd ever known it to. It was almost unrecognisable as Windows....

When I made the switch to Linux in May 2014 - I began with Ubuntu - I wanted to try and copy that same behaviour if it was at all possible. I knew it might be a while before I could begin to investigate the concept; after all, I had a whole new type of OS to get used to. I got a 'push' from Canonical around October that year; as part of their ongoing kernel customization, they decided to drop support for the ATI graphics chip in the old clunker I was using at that time. Graphical freeze-ups became the order of the day.....which I very soon got fed up with. An acquaintance on the Ubuntu Forums suggested I take a look at Puppy; philb666's 'take' on 14.04 'Trusty Tahr' had just been released - 'Tahrpup' - so I decided to investigate.

Everything worked literally OOTB. I was impressed with this, given that most distros I'd tried needed quite a bit of 'tweaking' to work with my ancient hardware. Puppy always used bog-standard kernels direct from kernel.org.....and lo and behold, there was nowt wrong with my graphics chip at all. This was my first introduction to Mark Shuttleworth's mindset; that of wanting to make Ubuntu a direct competitor to Windows.....and support ONLY modern hardware. Which ran counter to the general principles of Linux, from what I understood; that of keeping old hardware productive and still useful.

Strange bloke.

~~~~~~~~~~~~~~~~
I fell in love with Puppy then and there. Both of my elderly 'puters were behaving themselves beautifully; within 48 hrs, Ubuntu was but a distant memory.....and Windows had been given the bum's rush when I switched the previous year. I went in 'cold turkey', y'see; wiped it out of my life, and dived head-first into the depths of the Linux ocean. And it wasn't as hard as I'd been led to believe!

Fast forward about 4-5 years. I'd half-heartedly toyed with the portable app concept on and off, but it was on the back burner at that stage. I knew my scripting and general Linux skills still needed to improve, so I bided my time. I was having a lot of fun, anyway; with Windows, you kinda got blind-sided by the drudgery of keeping the thing functional, and lost sight of the fact that computing COULD be fun. Puppy brought that sharply back into focus.

Mid-2018, one of our more active community members, the dev behind the 'DebianDogs', published on the forum a 'portable' version of Firefox. I was intrigued by this, and it awakened my old interest with a vengeance. I stripped the package down, and studied what Fred had done....and did some research. Turns out the script he'd used was a modification of one that had been floating around the web for a long time, originally developed back during the final days of NetScape Navigator, as it was in the throes of morphing into early Firefox.

I experimented with one of my own. Puppy has used the Pale Moon browser for a long time, essentially a FF 'cloned' fork from around FF v27/8, although with its own Goanna 'engine'. I tried a 'portable' build of this......and after a couple of false starts, soon had it working nicely. Yay! Progress.....

This was soon followed by a portable build of Thunderbird; again, working sweetly. I was very heartened by this success, and turned my attention to the Chromium-based browsers.....a Linux 'portable' Google Chrome was my ultimate aim here, though it was to take a while before it materialized.

These took a bit more figuring out, partly due to the need for a suite of required dependencies, plus the need to modify the launch 'wrapper-script' that fired them up. Eventually, I got the first attempt to work very nicely - with some help & assistance from Fred - a 'portable' build of Opera. Whoo!

I'd got the bit between my teeth now, and there was no stopping me. In short order, I had portable builds of Iron, Brave, Slimjet, and even one of M$ Edge! Eventually, the long-awaited Chrome-portable became a reality. Yes!

~~~~~~~~~~~~~~~~~~~~~​

I've always been a fan of AppImages. The one thing I didn't like about them was that for every OS you ran 'em in - even if only once - you got another bunch of config files hanging around. You soon ended up with serious over-duplication, along with the need to have to set the things up again from scratch every time. Why not create those config files just the once, and package them up, along with the AppImage itself, so that you could switch between OSs, launch the thing again, and simply carry straight on with whatever you might be in the middle of doing? To my way of thinking, this made FAR more sense.

So that's what I did. A whole string of AppImage-based 'portables' followed, many of which keep up-to-date with their own built-in updaters. Fred developed a bunch of scripts which allowed us to build our own AppImages, tailored to work, OOTB, with Puppy's slightly oddball way of doing things. Essentially, an AppImage is a squash file-system image......and Puppy has used what are called SFS packages since the very early days, over 20 years ago. This, I understood very well, and could work with.

~~~~~~~~~~~~~~~~~~~~~​

The reason why 'portable' apps are such a good fit for Puppy is simple. Every Puppy uses what's called either a 'save-file' (older Puppies) or a 'save-folder' (newer Puppies). This is a self-contained readable/writable file which contains all changes/personalizations/customizations, and is loaded into RAM when Puppy boots. Most of us try to keep this as small as possible, and many use SFS packages for all their apps, which load or unload, 'on-the-fly', as and when needed.

Many Puppians tend to run multiple Puppies. She's rather addictive in that way. By carefully building the portables to contain any necessary deps (called by LD_LIBRARY_PATH; I had help with these from battleshooter, an amazing lass who is, unfortunately, no longer with us), it's perfectly possible to 'share' a single portable application between multiple Pups, by running it from a location outside the 'kennels'....merely sym-linking the LAUNCH script into /usr/bin, so you can fire-up the linked app, running it from within its self-contained directory. I include scripts which will add or remove a Menu entry. This way, you have the option to run the portable directly from its launcher, OR to run it from a traditional Menu entry.

You have to understand one thing. These are built specifically to work with Puppy's way of doing stuff. She runs AS root all the time.....so these wouldn't work with mainstream distros, which use the 'sudo' mechanism, and expect everyone to run as JUST a 'user'. No admin rights.....except via the 'sudo' mechanism.

Modification would be possible, I guess......but since I run Puppies exclusively, I have very little inclination to even attempt this.......it simply wouldn't benefit me personally. My 'modus operandi' has always been thus; I initially build something for my own use. IF it proves to work as well as I would hope it to, then - and ONLY then - am I happy to 'share'.

I also build various small scripted utilities and other stuff which makes use of existing stuff already within the system. These also get packaged as 'portables'; it's rare that I package stuff any other way these days....

~~~~~~~~~~~~~~~~~~~~~~~~​

The 'portable' app-system for Puppy has been very much a collaborative effort. Many community members have provided input, or made useful & sensible suggestions, many of which have been incorporated into later revisions. I won't take credit for the work of others; only for the packaging & publishing of the things, which currently number somewhere between 150 and 200. I lost track of the tally some time ago....

It's very much an 'in-house' project....just for the Puppy community. That's why you won't find it mentioned anywhere else......and why I've never bothered publishing the mechanics of how they work. Most of our members could figure that out in 2 minutes flat, since they make use of several totally unique Puppy concepts...

(shrug...)


Mike. ;)
 
Last edited:
Though, vis a vis AppImages it (config files within their FS) did occur to me, but many people on mainstream distros will put AppImages in in /usr/local/bin (which is technically wrong, they go in /opt/<package>/<AppImage file> and link to /usr/local/bin (although they are supposed to be per-user, so really, .local/lib/ and .local/bin/ (and .local/share for icons, "applications")) so I saw the caveat of storing configs in the mounted AppImage's FS. That's why I'm curious. It sounds like Puppy is very very different, almost its own OS that just happens to use GNU and Linux. When I have time, I'll definitely play around in a VM, though as a purist, I can't see it as a daily driver (I don't even like sudo as it pretty much breaks security, a'la sudo su, passwd, now I have root -- which is why I agree with you that Ubuntu does things in a weird and sometime counter-intuitive way as it used ot, don't know if it still does, not have a proper root user, and you had to password hack it, or go with the spec of editing sudoers). With my home directory, I started using .local more, but the problem was it depended on a filesystem which was still a large net to cast. But from what you've said, a lot would depend on a system that plays better with abstractions and modularity, So this Puppy solution sounds interesting. It's definitely worth looking into. I do like the idea of a LAUNCH script. I have a few applications that I've created startups scripts for, like Firefox (always private, always randomize the window size -- a compliment to NoScript to help mitigate fingerprinting). I may borrow the idea of having my launch scripts in a single LAUNCH script. It never occured to me but it makes just so much sense!!! I mean you can automate app-wide configs, you can use multiple package versions without chromium2.sh, chromiumincog.sh, etc., which is messy compared to a hypothetical launch chromium -version N.xx or launch chromium no-incognito (default is cognito), or, heck launch browser chromium vs launch browser all and so forth. Heck I'm getting ideas of having prifixes as I'm typing launch vscode --prefix=private -- I suppose with Puppy being root, it's easier to run different things as different users, and deploy prefixes like that.

Your journey sounds interesting. I too started off experimenting with Linux, adopted it for some things, and then decided randomly one day to just wipe my Win7 partition and jump it. Honestly, going in cold-turky, or with very little knowledge is the bast way to transition to a new OS. You actually are forced to learn how things work. I mean you'll probably end up hacking around to emulate what you're used to, but you come to appreciate the spec of how things are done (though I have to admit, systemd threw me off for a while, but I'm not going to just say, "Ugh, I'm going to Devuan" when it makes more sense to transition to a new distro completely). You come to like how things are done. Then you look back on Windows and you think, "Darn, that's complex. I could do XYZ on a unix-ish system in a 10th the time at a 10th the simplicity." And I think part of the journey for users like us really is, "How do I make this my own?" when it comes to customizations that improve workflow or "How can I get rid of this feature/behaviour that's counter-productive to my needs?" From the sound of it, Puppy definitely fit your niche there. It's great you collaborated with folk online. Honestly, I'm not the most people-person so I was never too good reaching out about projects I started doing, though I was happy to help if someone initiated something.

So, thanks a lot for the low down. It's got me thinking and I love some good brain stimulation these days!
 
@Fanboi:-

Y'see, much of what has always driven Puppy development was the desire for a featherweight OS that would happily run with minimal resources......think all the way back to 2004, and a P4 with 256 MB RAM (512 MB if you were really posh!)

Puppy developers have learnt to keep their code light'n'tight; no extraneous stuff hanging around.....and Bash has usually been the preferred scripting language. When I started with Puppy a decade ago, the community gave me so much help & encouragement (they're a good bunch!) - and more - that it was only natural for me to want to return the favour in whatever way I could. And in those days I only had an old Athlon64 X2 and 3 GB DDR1 to 'play' with, so I quickly learnt to do things the "Puppy way".

I could never have imagined I'd be doing what I do now. I was as green as grass; even being a Windows 'power user' is of no help whatsoever when jumping over to this side of the fence.....and I was far from being one of those.

I quickly discovered that I had 'the knack' for packaging, and re-packaged a lot of stuff for Puppy's package formats - the .pet and SFS. Like all of us, you learn new stuff almost daily, and your arsenal of tools gradually and steadily expands, in the process opening up ever more in the way of possibilities. When you're naturally inquisitive - like me; yeah, I'll hold my hand up to that....it's a 'fair cop', guv! - then you experiment with no end of stuff. And yes, you're right; in the early days, I too tried to 'emulate' what I was used to in Windows.....but over time, I've developed my own unique look & feel for my Puppies.

My distro-hopping days are LONG past. Aside from a long-standing interest in HaikuOS - the spiritual successor to the BeOS system from the late 90s - and an install of Google's ChromeOS-Reflex to a home-grown "external SSD", I'm not going anywhere. I found "the one for me" a very long time ago..!

Nothing else even comes close. Although I now have way more in the way of resources.....including 32 GB RAM, and better than 5 TB+ of internal storage (plus assorted external storage, too), and could literally run anything I wanted.....I'm simply not interested.

At the end of the day, it all boils down to one thing; being happy with your system, and refining it to do everything you need from it. It's an on-going process, though.....and most of us are never QUITE satisfied.

I'm sure you know what that's like!


Mike. ;)
 
Last edited:

Members online


Latest posts

Top