File Structure -- Your Road Map to Puppy

New to Puppy and have questions? Start here

Moderator: Forum moderators

Post Reply
User avatar
mikeslr
Posts: 2964
Joined: Mon Jul 13, 2020 11:08 pm
Has thanked: 178 times
Been thanked: 919 times

File Structure -- Your Road Map to Puppy

Post by mikeslr »

A place for everything, and everything in its place.

Puppy does some things differently. But not all that differently. Like driving a new car. It has four wheels and a steering wheel. But where did they put the thing to turn on the windshield wiper? Most of what you already know from Windows, from the Mac, from Linux, even from your smartphone will carry over into Puppies, debiandogs and other operating systems discussed on this Forum. To a large extent, maybe all that you'll need to do is learn some new names for the things you already know. But there are some routines which are different. For example, it is recommended that Puppies be run Frugally, rather than as a Legacy (AKA 'Full') install; the method of preserving settings, and other changes resulting from running Frugally; and the option to run applications as "Spot".

I believe knowing how Puppy's files are structured; why that is and how it got that way will help you understand how Puppies function; how you can get the most from them; and how we --you and others on the Forum-- can solve problems you may encounter.

It's all a matter of figuring out how to "get from there to here"; and how far do you think you'd get if you put one of your car's four wheels on the back-seat?

Puppy's Current Structure: :ugeek: Don't Panic. ;) You'll be able to ignore most of it and the rest will quickly fall into place, so to speak. 8-) We'll be concerned mostly about what's within the red enclosure. [ I'll be back after lunch. :roll:

Well, after lunch and a detour of over a day, I'm back. But not yet completely finished. :roll: Bear with me. ;) ]
SORRY: The Original Image was on funkyimages when went belly-up. The following is somewhat different. When I find the time I'll revise this post as needed. Hopefully, you'll get the idea.

File-Structure

Puppy-File-Structure.png
Puppy-File-Structure.png (176.95 KiB) Viewed 1987 times

:idea: Hint: This will be easier to follow if you open two tabs to it. One to read the text. The other showing the above graphic. Flip to the graphic for a second when the text identifies locations :)

It is possible to work with files and folders using only a terminal: just harder to visualize what’s going on. In the above graphic, at the top, to the right and left of the folder named Root, bearing the symbol “/”, are icons. These are NOT part of the file-structure. They are icons provided by the Rox file-manager which is built into most Puppies. If your Puppy uses a different file-manager it may have something similar.
You will never actually see the entire file-structure of an operating system. You will only see the contents –files and folders-- of one folder. In fact, a Folder is only a file which is specialized in that it contains links to other files (including other folders) graphically represented. Folders and files are all parts of a “tree structure”.
From the folder you are currently viewing you see the contents of a folder it contains (those linked to it) by Left-Clicking the contained folder’s icon. Doing so will provide a view of that Child folder’s contents. To view the other contents of the current folder’s Parent, Left-click rox’s Up-Arrow, at the far Left. Clicking the Up-Arrow repeatedly will eventually take you to root (/).
“Everything hangs from root”.
I would have given the top of the structure the name “Top”. Nobody asked. Maybe the term “root” had a well understood meaning in some field of math. In the early days of computing a lot of concepts from mathematics were used in discussions. Maybe whoever coined the term ‘root” was an e.e. cummings fan; or on a bad trip. Whatever. The term caught on. Did you ever try to get people to abandon a well understood term for something, perhaps, easier to explain to newbies? Get over it. Root is a term you’ll have to memorize. Worse, yet. Root not only means the top of the Linux File-Structure. Root is also used when referring to the top of the physical structure of storage media. Your USB-Key, hard-drive and every partition of them has its own root. And still worse: root is also the term frequently used for Administrator – the person having the highest authority in making decisions. Hence the term “running as root”.

Patent and copyright laws permitting, nobody goes out of the way to reinvent either language or ‘the wheel’. By the time Bill Gates and Steve Jobs thought of manufacturing personal computers for profit, and Linus Thorvalds of developing a free operating system for individually owned computers, the Unix operating system for Mainframes had been around for more than a generation. Mainframes were big, expensive, distant ‘black-boxes’ which were shared not only by individuals within a company but often by several companies. The Unix operating system had to be a multi-user system with builtin structures to prevent any one with access from accessing the information someone else had stored on the computer; from using programs to which they had no right; and, especially from accidentally or intentionally throwing a monkey wrench into it. Hence, individual Users were restricted to their own folders and the programs their bosses allowed them to use; those bosses were restricted to the rights within their “group”; and only the computer Administrators had full control over what became available system-wide.

Basically, Gates. Jobs and Thorvald transposed the Unix operating system (bells, whistles warts and terminology) to the personal computer. [FYI, Android is just a Linux variant using a lot of the programming language JAVA –and others-- optimized for a touch-screen].

With programs being ‘on the mainframe’ and data being stored ‘on the mainframe’ what a mainframe didn’t (originally?) have or need were such plugin hard-wares as floppy-disk drives and CD players and burners or their evolutionary replacements: DVD players USB-Sticks and other External Drives. For an operating system to make use of those there had to not only be a physical port and hardware connections but some place for them in the operating system where they would be recognized. That place is /mnt, pronounced mount. On the graphic, on the right side /mnt hangs from /root; and drives, partitions, USB-Sticks, and such hang from /mnt. When you use a Frugally Installed Puppy, ONLY DATAFILES, APPLICATIONS AND ANYTHING ELSE WRITTEN TO FOLDERS HANGING FROM /mnt WILL SURVIVE A SHUTDOWN/REBOOT.

[Not to completely confuse you, but AFAIK, they actually hang from a folder under initrd, for which /mnt serves as a short-cut visually represented. But /mnt serves so important a function under Puppy Linux that it only makes sense to think and speak of it distinctly].

Barry Kauler originally conceived of Puppy Linux as an operating system to be run from a floppy-disk or a CD. It was to be freely available; so there was no need to include ‘multi-user’ capabilities. It was to ‘co-exist’ with Windows operating system on computers. You’ll notice both CDs and floppy disks ‘hang’ from /mnt. Booted from a CD or floppy disk, with applications also on those devices, Puppy Linux merely used the same hardware on the computer as Windows. In fact, even before USB-Keys became inexpensive, Puppy Linux was able to limit its reliance on the computer it ran from by being able to Save the data you created and the setting you established to the same CD from which Puppy booted. [This capability still exists with some Puppies. But, I'll leave discussions about it to those more familiar with it]. Today, of course, you can place Puppy on a USB-Stick and carry your computing needs in your pocket.

Then as (usually) now, Puppy Linux was published as an ISO: a packaging format. You could, then as now, use a program such as burncdcc under Windows to ‘burn’ the ISO to a CD. That process would unpack the ISO and copy files to the CD. Although there’s since been some changes, if you looked at what files were on the CD after burning an early Puppy Linux onto it, it would not appear very different than the following graphic which shows an unpacked ISO of the recent Puppy Linux, bionicpup32.
Image

The actual files required by bionicpup32 are initrd.gz, vmlinuz, puppy_upupbb_19.03.sfs and zdrv_upupbb_19.03.sfs. All the other files on the above graphic have to do with booting either from a CD/DVD or a Drive. Vmliuz is ‘the kernel’ --think the operating system's engine. Initrd.gz is set of instructions for loading a temporary root file system into RAM used to make preparations before the real root file system can be mounted. My understanding is that in Puppies, it also contains instructions as to what to do with the other two files mentioned above (and any other files Puppies can use on bootup). puppy_upupbb_19.03.sfs contains bionic32’s window (graphic desktop) manager and file manager, applications and the infra-structure (think nuts & bolts) necessary to run those. zdrv_upup66_19.03.sfs contains the drivers and firmware through which bionicpup communicates with hardware (keyboards, monitors, mice, sound-cards, wifi adapters and such). The emphasis on sfs above is intentional: not just because different Puppies will use their unique names before "sfs" , but because sfs stands for “squashed file system”.

Remembering that it is not recommended, if you did a Legacy/Full install, those SFS files-systems would be “unsquashed”/decompressed and their contents distributed throughout an entire hard-drive's partition, physically creating a file-system not unlike the one in the first graphic.

[For purests: lib is an acronym for "library" AKA dependency, Linux-speak for "nuts & bolts". bionicpup32 is a 32-bit operating system. It would not have any /lib64 folders. And the 64-bit lib folders in Puppies not based on Slackware would use a names other than /lib64. Moreover, Puppies usually do not have a /media folder. Some Linuxes use that instead of /mnt.]

Having its origin in the same ISO, a Frugal Install has exactly the same files as a Legacy install. But it continues Barry Kauler’s pioneering work in providing an operating system contained in squashed files. It's just that the required files are now relocated to either a USB-Key or a hard-drive. A Frugal Puppy creates anew on each boot-up an operating system existing only in Random Access Memory. Depending on how much RAM you have available, and the boot instructions you can provide, there will be copied into RAM (a) sufficient files for you to have a desktop, menus and/or launchers to available applications, and the ability to call into RAM those applications and their files as and when you need them; (b) all the files within the Squashed files; (c) something in-between. [You get to see where files are even if they weren't in RAM before you looked for them. Rox obeys your command to climb up and down the tree and look in folders, copying files into RAM as it becomes necessary for you to see/access them].

More about Puppies' use of SFSes will be discussed elsewhere. As this post is about files and their locations, I will only mention that Frugal Puppies and debiandogs are not limited to the use of those SFSes included in the ISO. Many applications can be packaged as SFSes and so used without requiring that the application be installed.

In Linuxes designed for multi-users, individual Users do not have administrative privileges. In order to install an application not already part of the system the Administrative password must be given. And each USER has to have his or her own folder to store the files created. That is the purpose of the /home folder which hangs 4th from the Left in the graphic. Puppies ‘run-as-root’. You, being Root, have authority to do whatever you want. No password required. And no need for a ‘home’ folder distinct from the /root folder shown within the red ‘circle’. I’ll explain below why some Puppies may now have a 'home' folder.
If you’re familiar with Windows’ Documents and Settings folder, in all Puppies the /root folder serves the same purposes: to hold settings and to provide a location for the documents you create. If you Left-Click the House shown in the graphic, rox will open a window to /root, your home folder. You’ll sometimes run across posts referring to it as “home.”

But Frugal Puppies can have another Home, a Home drive-or-Partition. Puppies ‘run in RAM’. On shut-down everything in RAM is wiped. You can create a SaveFile or SaveFolder on a drive/partition rather than having to ‘start from scratch’ each time you boot-up. Such SaveFile/Folder will hold your setting --such as your selection of a wifi network and its password-- and the applications you installed and read them into RAM on bootup. If you do create a SaveFile/Folder, Puppy will identify the location of the SaveFile/Folder as your Home Partition. The first Graphic shows the Home Partition as hanging from /mnt. It's contents and use will be immediately available on boot-up. If your Puppy uses jwm as Window Manager, immediately above the Taskbar will be desktop-drive icons. These are short-cuts to the contents of their respective drives/partitions. The icon for your Home drive/partition will have an "x" to show that it already has been mounted. Other drives/partitions only become usable/accessable after you mount them, by Left-clicking their respective desktop-drive-icons or via Menu>file-system>pmount.

Hanging from /root/root (your home folder) among other files and folders are /spot and /my-applications/bin. Bin folders are where a Linux system expects executables (binaries) to be located. If you scan the first graphic you'll notice several bin files, one just below /root, another /root/usr and another under /root/usr/local. There will also be a lib folder on each "level"; sometimes two in 64-bit systems. As I understand it, the original reason for multiple bin folders was to aid in application development and deployment. The highest level bin folder was for executables required by the operating system, itself. The /usr/bin folder was for the applications a user might install from a common pool available to that operating system. The /usr/local/bin folder was for executables the User might him/herself create. You may also have noticed several sbin folders. My understanding is that these were originally envisioned as the location of those executables relating to hardware.
Some Linuxes may insist that developers strictly adhere to that scheme. Puppy takes a 'devil may care' approach since binaries have unique names. If a binary is in one of the 'bin' or 'sbin' folders, an operating system can find it. Probably far more important was that the executable could find its libraries/dependencies. That can be accomplished by instructions telling specific binaries where to look.

I’ve used the phrase “nuts & bolts”. But a library is actually a collection of subroutines or classes used to develop software. Libraries contain code and data that provide services to independent programs. Some collections create an entire platforms onto which what a User may think of as THE application is akin to an ‘addon’. An important factor is that they are re-usable. Once part of your system for any reason, they can be used for any other reason. When planning an operating system it makes sense to re-use components for as many purposes as possible. That, however, may not be the best way to build any application. And it certainly isn’t the best way to build an application which can be used in many operating systems.

Opt is an acronym for optional. /opt was included in Linux file-structure “for third-party applications that don't rely on any dependencies outside the scope of said package.”

Under Puppies, the files of such independent applications as LibreOffice and firefox are frequently packaged to be within one application folder that is located in /opt. /opt, however, is not a location where Linux will look for binaries. There are two ways to work around that.

Down in the Lower Left corner of the first graphic is a folder named “Applications”. It hangs for /usr/share. The only things in that folder are files with the endings “.desktop”; for example geany.desktop. Desktop files are used by (AFAIK every Linux) Puppy to create Menu Entries. Another post will discuss Menu Entries in detail. Here, I’ll just point out that an application in /opt can be linked into your system by spelling out the exact location of (path to) its binary in that application’s desktop file. [This will be clearer after you see the 2nd method].

While you are examining the Lower Left corner of the first graphic notice that also hanging from /usr/share are folders named “backgrounds”, “pixmaps” and many others including one named “icons”. If you have favorite Wallpapers, you can place them in “backgrounds”. That is where Puppies’ wallpaper chooser applications will look first. And while you can locate icons anywhere, the “pixmaps” and “icon” folders are two locations commonly used.

On rox's toolbar, the icon to the right of the House provides a bookmarking feature. [Icon set change. But hovering over an icon will generate a 'tool-tip']. While "in"/viewing the contents of a folder, Left-Clicking that icon will create a bookmark. Later, Left-clicking the Bookmark icon will display a menu of bookmarked folders "into" which you can "jump".

Getting back to the folders hanging from “~ root”, your Home Folder, you’ll notice /my-applications/bin. I’m not certain why Barry K didn’t make greater use of /opt. What he did, unique to Puppy, was establish the /my-applications/bin folder where Puppies would also automatically look for executables.

Binary files include image files, sound files, executable (i.e., runnable) programs and compressed data files. An application often makes use of several, sometimes many, binary files. I just took a look at /usr/bin under Bionicpup64. It holds more than 1600 files. Although they were displayed ‘alphabetically’, it would still take some time to locate any one in particular. Having a folder where you keep a few executables unique to Puppy makes life easier.

Bash is Puppy’s built in programming language. Almost my entire knowledge of it is that the following line would start portable-firefox from a folder in /opt:
exec /opt/firefox64/ff "$@"
In less than two minutes, I could locate that bash-script in /root/my-applications/bin, open it in a text-editor, save it under a different name, and after editing it to spell out the path and executable to read:

exec /mnt/home/Opera-portable/LAUNCH "$@"

start opera from its folder on my Home Partition. A short bash-script in a bin file is the 2nd way to start executables not themselves in a bin file.

In the dozen years I’ve been involved with Puppy Linux there has never been a report that anyone using a Puppy has had his/her system compromised even though Puppies “run as root”. To a large extent that may be because a properly maintained Frugal Install inhibits the establishment of malware. [To be discussed elsewhere]. But about the time I discovered Puppy, Barry K implemented an optional feature for those who desired greater security: the ability to run applications, particularly web-browsers, as Spot.

Spot is a “limited user”, not unlike Users under Multi-User operating systems: No authority to run any application not assigned to it; No authority to access any folder other than its own. OOTB, Puppies –except for FatDog64-- have the Spot Folder “hanging” from ~root, your Home Folder.

Chromium is Google-Chrome’s ‘test bed’, freely available. When Google-Chrome is satisfied with a Chromium build, it adds some “call home to Google features”, its branding and publishes the Web-browser as a Google-Chrome version. Others can use the Chromium builds, add or subtract from them, and publish web-browser under their own brands. Among those others are now Opera, Vivaldi, Slimjet, Brave, Cliqz, and Iron. One of Google's innovations, implemented about three years ago, was to run Chromium in a "sandbox". Sandboxing serves the same purpose as "running-as-spot": isolating the application from the rest of the system. Unfortunately, the way Google implemented that made it increasingly difficult to run Chromium builds as Root.

Under Puppies, that means that Chromium and its clones either have to be run with 'sandboxing turned off' or run as Spot. Kirk, Jamesbond and the other members of the FatDog Team often work at the cutting edge, exploring and developing different methods to accomplish things. The FatDog Team was the first to implement creating a Home Folder directly hanging from “/root” with the Spot folder within it. So structured, it mirrors the “big-boy” distros --for which Google designs its web-browsers-- on which /root/home is a USER’s Home folder.

Mike Walsh publishes web-browsers rebuilt from Chromium-”Clones” for 64-bit Puppies. He discovered that FatDog64’s technique made it easier to build a functioning Google-Chrome.sfs. What loading that SFS would do is create the /root/home/spot folder; place in it the Google folder, its binary, and other files; create the Upload and Download Folders; replace the ~root/spot folder with a symbolic link to /root/home/spot; and create a launcher on the taskbar to activate rox routines as Root to moves files out of the aforementioned Download folder and to change permissions of files in Spot’s Upload and Download folders. Remember, Spot does not have authority to work with files having root permissions; and no authority to access files other than those in its own folder.

Subsequently, however, Mike Walsh discovered that it was sufficient that the Upload and Download folders be in /root/home/spot for the web-browser to function: the application folder, itself, could be anywhere. If you scan back-up, you’ll see that my Opera-portable hangs from /mnt/home. The Upload and Download folders it uses are, however, in /root/home.

Last edited by mikeslr on Mon May 02, 2022 11:26 pm, edited 17 times in total.
User avatar
bigpup
Moderator
Posts: 6995
Joined: Tue Jul 14, 2020 11:19 pm
Location: Earth, South Eastern U.S.
Has thanked: 913 times
Been thanked: 1528 times

Re: File Structure -- Your Road Map to Puppy

Post by bigpup »

That is not a correct layout of Puppy Linux file system
/root is not the top layer.
/ is the top layer.
/root is a directory in /
There is also /initrd directory missing from it.

A few other differences, but they are more based on the Puppy version and how the file system was setup in it.
Attachments
Screenshot.jpg
Screenshot.jpg (37.27 KiB) Viewed 2863 times

The things you do not tell us, are usually the clue to fixing the problem.
When I was a kid, I wanted to be older.
This is not what I expected :o

User avatar
wiak
Posts: 4082
Joined: Tue Dec 03, 2019 6:10 am
Location: Packing - big job
Has thanked: 65 times
Been thanked: 1208 times
Contact:

Re: File Structure -- Your Road Map to Puppy

Post by wiak »

bigpup wrote: Sun Jul 19, 2020 4:08 am That is not a correct layout of Puppy Linux file system
/root is not the top layer.
/ is the top layer.
/root is a directory in /
True that /root is missing, which is the established home directory of 'user root' but that is to do with users rather than the filesystem per se (though it is certainly an important directory). So Mike's layout is pretty close to correct. He is absolutely correct that / is called the root of any filesystem hierarchy, though any filesystem can (could) be mounted elsewhere - and also via a chroot for example (a basic command that changes the apparent 'root' of the filesystem). Certainly it is confusing that the top level of a filesystem is referred to as the root (though makes sense in terms of an inverted tree, and the principal superuser is referred to as 'root user' whose home directory is in /root, but that is traditional UNIX for you (and inherited by Linux).

One of the main reasons Puppy's filesystem is a little bit different from other Linux OS, is simply that is is really a single-user operating system rather than multiuser (so /etc/rc... /etc/init.d type structure a bit different and no tradition Pup uses systemd as its init instead) but there is a /home and most of the differences are hardly noticeable overall. Since not multiuser, Puppy structure is slightly simpler (in some ways) since not so complex security structure. No sudo (by default meaning 'superuser do' to run command), for example, since running really only as root user, which is a bit of a blessing much of the time - though multiuser distros can also be configured to only run as root user by default or otherwise (e.g. DebianDogs and WeeDogLinux) and thus not need to use sudo facility either.

To a large extent, from an admin/users' point of view the structure inside /usr/share is certainly very important, but so is the structure inside /etc (which holds the main configuration differences between Puppy and any typical multiuser-capable Linux).

You can work with Puppy or any other Linux simply be studying the Linux Filesystem Hierarchy Standard FHS (whilst remaining aware of the differences that Puppy has). There are official explanations of FHS or for example this simple explanation (despite it referring to 'geeks') and no doubt there are also Linux for dummies explanations (which we all are to a greater or lesser extent): https://www.geeksforgeeks.org/linux-fil ... structure/

or this non-geeky 'high-level discussion' about FHS: https://opensource.com/life/16/10/intro ... ilesystems

or

https://refspecs.linuxfoundation.org/FH ... index.html

https://en.wikipedia.org/wiki/Filesyste ... y_Standard

Better to understand more than just Puppy, I'd say - the differences are not so great as assumed or claimed, and well worth having a fuller understanding of such a basic filesystem organisation. Personally, I find Puppy structure a bit more difficult because it occasionally deviates from FHS, but very little difference overall.

What gives some users of other distros more of a problem is when and if they are running as non-root user, where they find they have very few permissions over anything not in /home/user_name. Solution is, like Puppy, simply to run as root user... despite the warnings some give about doing so. Using sudo, or similar, does work, when using non-Puppy OS, but most GUI menu's aren't starting programs with it, hence the permission problems that tend to arise unless the system is configured to run the GUI as root user, which is what 'we' (naughtily?) do....

Anyway, aside from these details, I kind of like Mike's diagram (once fixed) and would be even better if he added /etc details to it, since that's where major configurations are done. The main very top level, if shown alone, (I mean, just below /) is insufficiently important/useful to look at at all though since most important individual directories happen a layer or two below that, most of which Mike's diagram neatly shows (e.g. /root/.config; /usr/share/applications; /usr/bin; /usr/lib; /usr/share/icons; /usr/share/pixmaps; and all the configs under /etc; the same can be said for any Linux OS).

wiak

https://www.tinylinux.info/
DOWNLOAD wd_multi for hundreds of 'distros' at your fingertips: viewtopic.php?p=99154#p99154
Αξίζει να μεταφραστεί;

User avatar
nic007
Posts: 109
Joined: Thu Jul 16, 2020 9:21 am
Has thanked: 1 time
Been thanked: 12 times

Re: File Structure -- Your Road Map to Puppy

Post by nic007 »

Thanks for that diagram mike. We appreciate the effort you put into that.
User avatar
wiak
Posts: 4082
Joined: Tue Dec 03, 2019 6:10 am
Location: Packing - big job
Has thanked: 65 times
Been thanked: 1208 times
Contact:

Re: File Structure -- Your Road Map to Puppy

Post by wiak »

nic007 wrote: Sun Jul 19, 2020 7:00 am Thanks for that diagram mike. We appreciate the effort you put into that.
Yes, I second that. It is really very detailed considering how difficult it is to make such diagrams. Though I also mention 'once fixed', with /root shown, really that is such a minor omission I'm not sure it is worth trying to squeeze it in (no diagram needs to show every component and I agree also that /etc is extremely complex structure that is mainly for developers and better in separate diagram if created).

As it stands, it is a very clear diagram and very useful illustration.

https://www.tinylinux.info/
DOWNLOAD wd_multi for hundreds of 'distros' at your fingertips: viewtopic.php?p=99154#p99154
Αξίζει να μεταφραστεί;

User avatar
bigpup
Moderator
Posts: 6995
Joined: Tue Jul 14, 2020 11:19 pm
Location: Earth, South Eastern U.S.
Has thanked: 913 times
Been thanked: 1528 times

Re: File Structure -- Your Road Map to Puppy

Post by bigpup »

This is Puppy Linux.
It is different than other Linux OS's.
The file system layout is different.
Stop explaining what it is in other Linux OS's.

People are going to use Rox file manager to navigate around in the file system.
Give them a diagram of what that is going to show them.
What is each directory for.

Tell me how I could explain where .jwmrc is located if I showed them this diagram?

The things you do not tell us, are usually the clue to fixing the problem.
When I was a kid, I wanted to be older.
This is not what I expected :o

User avatar
nic007
Posts: 109
Joined: Thu Jul 16, 2020 9:21 am
Has thanked: 1 time
Been thanked: 12 times

Re: File Structure -- Your Road Map to Puppy

Post by nic007 »

bigpup wrote: Sun Jul 19, 2020 9:22 am This is Puppy Linux.
It is different than other Linux OS's.
The file system layout is different.
Stop explaining what it is in other Linux OS's.

People are going to use Rox file manager to navigate around in the file system.
Give them a diagram of what that is going to show them.
What is each directory for.

Tell me how I could explain where .jwmrc is located if I showed them this diagram?
Perfect opportunity for us to see YOUR attempt...........
User avatar
wiak
Posts: 4082
Joined: Tue Dec 03, 2019 6:10 am
Location: Packing - big job
Has thanked: 65 times
Been thanked: 1208 times
Contact:

Re: File Structure -- Your Road Map to Puppy

Post by wiak »

bigpup wrote: Sun Jul 19, 2020 9:22 am This is Puppy Linux.
It is different than other Linux OS's.
The file system layout is different.
Stop explaining what it is in other Linux OS's.
...

Tell me how I could explain where .jwmrc is located if I showed them this diagram?
Sorry, that is nonsense. If it were true, it would be a very bad idea (in terms of education) to encourage anyone to learn Linux via Puppy Linux. But actually, fortunately, most of the file system is same as "other Linux OS's". If that were not the case I would not myself understand Puppy layout, but I do.

And jwm is a window manager that can be used on any Linux OS and its configuration is determined by jwm itself - rockedge, for example, routinely configures jwm for use with various WeeDogLinux OS flavours (which use their upstream Linux filesystem organisation) - no difference for that at all. Saintless used jwm on DebianDogs. Fred provides that as an option now too, and these use standard Debian Filesystem Layout - pretty much same as Puppy except for Puppy not being fully multi-user capable. If you want a diagram on how jwm is configured, make one for the community. And how about pcmanfm as a desktop and filemanager combination - make one for that too. Mike isn't focussing on one desktop manager in his diagram - Puppy is not restricted to that!

You are pretending to newcomers that Puppy somehow is using some new OS design - no... it is Linux, like all the rest. Not one distro out there uses anything particularly NEW - it all comes from facilities provided by Linux kernel (plus all the available open-source addons, e.g. from GNU), with minor minor differences in Filesystem layout - and it all comes from ancient UNIX to a very large extent. You should stop nonsense claims that simply mislead newcomers who know nothing about Linux! Mike's diagram is excellent and far better than a pretty useless screen capture from Rox filemanager. Puppy doesn't need to use Rox filemanager either, and other Linux distros can and sometimes do use Rox, or pcmanfm, or Thunar, or xfe, and so the list goes on - the similarities between distros are enormous because they have to be! - Linux is Linux (and its ancestor is UNIX!) I have been using Linux since 1991 (Linux on some dozens of floppy install disks and then Yddrasil Linux) and I remember it well from back then how similar it all was, X and all, and I cannot be bothered with this fake claim of uniqueness and difference. Prior to that I was using SunOS followed by Solaris - file system hierarchy has little changed - Linux was not yet in existence.

Mike's diagram is very good. It works to a large extent for any Linux distro.

https://www.tinylinux.info/
DOWNLOAD wd_multi for hundreds of 'distros' at your fingertips: viewtopic.php?p=99154#p99154
Αξίζει να μεταφραστεί;

User avatar
mikeslr
Posts: 2964
Joined: Mon Jul 13, 2020 11:08 pm
Has thanked: 178 times
Been thanked: 919 times

Re: File Structure -- Your Road Map to Puppy

Post by mikeslr »

Hi Guys,

The original post is a work in progress. Try to restrain yourselves until it's finished. I'm still learning (a) how to use this forum's software; and (b) that of funkyimg.com.
I think it important to try to provide 'newbies' the same type of orientation instructions (albeit updated) which was available in John Murgha's Beginner's Section. Otherwise, we're going to spend all our time repeatedly answering the same questions.
The graphic was 'flinched' from the internet. I think this one, https://thesagediary.com/2020/04/14/lin ... hitecture/. It's now on the third revision. I noticed that the wrong symbol ( / rather than ~) was used for /root/root immediately. It was on my 'fix it' list. Try typing ~ when you're using gimp's add-text tool and see what happens. The various confusing uses of the terms root and home have to be explained simply. Doing that was actually at the top of the list.

The flinched graphic had to be significantly modified to provide a representation of structural elements important to Puppy. I missed that /initrd wasn't there. Thanks, Bigpup. Will be corrected in the 4th revision.
The forum's software allows saving drafts. :thumbup: But not with graphics. :( I'm not familiar with funkyimg.com or any online picture host. funkyimg is free and seems easy enough. Well, it's easy to upload a graphic. But it provides 6 links to the uploaded graphic and I discovered that only one link actually generated a graphic in a post on this Forum. FYI, it's the one under "BBCode Image". Probably the one under "BBCode Thumbnail" would work. But I didn't want to loose details. As for the other links, my guess is that someone familiar with embedding images could figure out how to use them. But I couldn't find anyway to modify the image 'stored' at funkyimage. Since it's free, I figured the best thing to do was upload revisions and edit the post to the revised image's link.

As I said, 'a work in progress.' Wait 'till it's finished to suggest revisions.
The following written without having surveyed yesterday's posts:
In the meantime, how about writing some original posts to help orient newbies. FYI, on my ToDo list are 'Removing the Automatic Save'. [I don't think we have shinobar with us yet. His grub4dos config is needed for older puppies. Nic, have you uploaded your Utility yet, with an explanation of its components]. Frugal vs. Legacy/Full install -- which only makes sense if there is an understanding of Linux File structure (particularly Puppy's). Anyone want to tackle UEFI? gyro's development of frugalpup pretty much solves problems once there's a functional puppy. But it isn't here yet. A 'Rox simplified post'? Maybe with a mention of your favorite alternative file-manager and/or of rox's Right-click options? How about a post telling Newbies How to post: what info we need to help; what sections to post to; how to post to a section rather than start a new thread. I'm sure you Guys can think of other topics.
User avatar
bigpup
Moderator
Posts: 6995
Joined: Tue Jul 14, 2020 11:19 pm
Location: Earth, South Eastern U.S.
Has thanked: 913 times
Been thanked: 1528 times

Re: File Structure -- Your Road Map to Puppy

Post by bigpup »

i
t would be a very bad idea (in terms of education) to encourage anyone to learn Linux via Puppy Linux. But actually, fortunately, most of the file system is same as "other Linux OS's".
Who is telling people to use Puppy Linux to learn Linux?

You prove my point in your statement.
"Most of the file system is the same as other Linux OS's".

Most of it is, but not all of it.
The biggest reason Puppy is now using a much more regular Linux file system layout, is so programs, compiled for other Linux OS's, will run in Puppy.
But Puppy still places Puppy specific stuff in non normal locations.

Also, which specific Puppy version are we talking about?
The file system layout is not the same in all Puppy versions.

The things you do not tell us, are usually the clue to fixing the problem.
When I was a kid, I wanted to be older.
This is not what I expected :o

User avatar
rockedge
Site Admin
Posts: 6549
Joined: Mon Dec 02, 2019 1:38 am
Location: Connecticut,U.S.A.
Has thanked: 2751 times
Been thanked: 2627 times
Contact:

Re: File Structure -- Your Road Map to Puppy

Post by rockedge »

That is how one learns "Linux". By realizing that every distro has it's own uniqueness in the Linux family but still has a similar structure. Sure Puppy Linux has it's way of auto-starting scripts and how the system boots but it still does the same as all Linux does...use the Linux kernel.

I learned how to really well work with Ubuntu and Debian by being involved with Puppy Linux, now Arch and Void added into the fray.
Funny thing is I tend to set up Void Linux or Arch (like the WeeDog's) to look like a Puppy and sort of use some of the same structure, which allows me to use apps made for Puppy Linux on these other systems.
User avatar
wiak
Posts: 4082
Joined: Tue Dec 03, 2019 6:10 am
Location: Packing - big job
Has thanked: 65 times
Been thanked: 1208 times
Contact:

Re: File Structure -- Your Road Map to Puppy

Post by wiak »

bigpup wrote: Mon Jul 20, 2020 12:07 pmWho is telling people to use Puppy Linux to learn Linux?
rockedge wrote: Mon Jul 20, 2020 2:42 pmFunny thing is I tend to set up Void Linux or Arch (like the WeeDogs) to look like a Puppy and sort of use some of the same structure, which allows me to use apps made for Puppy Linux on these other systems.
And I've written many an app or utility with versions for Puppy Linux, sometimes written whilst on Puppy itself but often written when being on a different system such as Ubuntu or related Dog. One of the apparent differences between file structure of different distros is not a difference to Linux Filesystem Hierarchy Standard (FHS) at all, but rather that there is choice provided by FHS (albeit with guidance as to what is most appropriate). For example, a created binary can be put into /usr/bin or /usr/local/bin or sometimes /opt/bin or into $HOME/.local/bin, and similarly desktop applications can be put into /usr/share/applications, or /usr/local/share/applications, and similarly there are different possible locations for lib structures, such as /lib itself, or /usr/lib, or /usr/local/lib. And similarly for /usr/share/pixmaps, usr/local/share/picmaps, $HOME/.local/share/pixmaps, and so on. And that is just an example of the diversity 'allowed' and similar choices are available for the configuration /etc directory (e.g. /usr/local/etc, $HOME/.local/etc, and so it goes on...)

Nowadays, several distributions are preferring to put all their libs into /usr/lib and make /lib simply a symlink to /usr/lib, and similarly all binaries into /usr/bin and making both /bin and /sbin (and even /usr/local/bin) simply symlinks to that, so all the binary/executable files actually reside in same physical directory in that case. Distro creators (and to some extent, app creators) need aware of that and flexible in their understanding - aside, as rockedge says, different boot scripts/locations being used 'sometimes' by differing distributions, the overall filesystem remains within these FHS bounds.

What effects things more, when it comes to Puppy Linux itself, as I earlier said, is that it has not implemented full multiuser functionality, which from an instructional viewpoint means that it can't be used to teach most of the principals of permissions/ownerships/Linux-security, and some modern apps are not designed to run as root user (so Puppy does its best to get round that second limitation by having a pseudo regular user called 'spot'). So, I suppose I agree that Puppy Linux is not the best distro to learn general Linux system administration on. However, unless you need or want other users to share your system, or are not interested in administering an upstream multiuser-type distro, such as Debian, or Ubuntu, or Redhat, or Void, or Arch or most anything else including the DebianDogs and the WeeDogs, which are full-system multiuser, these are not important limitations, but it is wise to be aware of them and also as an app/utility creator if you also intend your app/utility to be available to users of other Linux distros (including the DebianDogs and WeeDogs).

A bigger diversity, which effects ALL Linux distros, is the choice of init system (a major part of the boot process and for controlling background processes/daemons thereafter). Traditionally, for decades, that has been sysVinit, which is what Puppy Linux still uses (without exception currently I think - though it is possible to remaster it to use otherwise, albeit with quite a bit of work). Most of the upstream systems, that some smaller distros such as Puppy tend to rely on nowadays for their app repositories, have chosen to use systemd in preference to old sysVinit for various practical reasons I wouldn't argue about in this thread. And even the init system gives distro design choice in terms of where some files are stored (e.g. /usr/lib/systemd or /etc/systemd or inside $HOME/.local structure and so on, but with recommendations of how each of these alternatives can be used). And there are other, completely alternative init systems that can be used, such as runit, which has been adopted by Void Linux. But none of these 'differences' are outside of the FHS - a Linux administrator simply needs to understand the available options available via the flexibility of the FHS; no-one is forced to adopt any particular model but it would be foolish indeed for a distro creator to ignore FHS when there is such a weight of knowledge and expertise behind its use, and to a large extent.

Puppy Linux is conventional (aside from the highlighted differences and from the point of view of a frugal installable distro that uses either aufs, overlayfs or one of the several older layering UNIX/Linux-available methodologies). Puppy certainly uses a few sub-directories and files related to its own uses (for distrospecs and so on), which it would pay a Puppy user to learn, but all distros do similar to a greater or lesser extent, and apps such as jwm can be used on any distro. Main difference is that Puppy is not a multiuser system, which in simplifying its structure a little helps it achieve its aim of being small and easy to administer (no need to worry about permissions to some extent since most everything is root user owned and operated, including, always, the desktop GUI). But... app creators, who want their apps to also be usable in other Linux distros should keep multiuser requirements in mind (for example, there was long a problem with Puppy apps being hard-coded with /root as the home directory, which can not be relied on in most any other Linux distro. So many Puppy apps ended up modified years later to use $HOME instead, but such issues still sometimes arise when trying to use Puppy utils on other distros).

None of the above, by the way, is an attack on Puppy Linux as a distro. Its root-only simplicity makes it very pleasant and powerful to use. However, it is wrong to make false claims about Puppy that mislead users and important to recognise both its strengths and simplifications (as it is with all distros), and to understand what advantages and such simplications might bring whilst being informed and thus aware of their consequencies.

wiak

https://www.tinylinux.info/
DOWNLOAD wd_multi for hundreds of 'distros' at your fingertips: viewtopic.php?p=99154#p99154
Αξίζει να μεταφραστεί;

ndujoe1
Posts: 35
Joined: Thu Jul 16, 2020 7:25 pm

Re: File Structure -- Your Road Map to Puppy

Post by ndujoe1 »

Thanks for the explanation, I am sure it will help new users to Puppylinux understand this flavor of LInux that we like to use.
User avatar
mikeslr
Posts: 2964
Joined: Mon Jul 13, 2020 11:08 pm
Has thanked: 178 times
Been thanked: 919 times

Re: File Structure -- Your Road Map to Puppy

Post by mikeslr »

Just to let you know. I've 'released the OP as, say, an RC5'. Feel free to suggest any corrections of 'fundamentally erroneous' statements. But do keep in mind It's intended only as a Map to be used by Newbies to provide them with some idea, an overview, of what is going on. It is already far longer and data-dense than I would have liked.
User avatar
bigpup
Moderator
Posts: 6995
Joined: Tue Jul 14, 2020 11:19 pm
Location: Earth, South Eastern U.S.
Has thanked: 913 times
Been thanked: 1528 times

Re: File Structure -- Your Road Map to Puppy

Post by bigpup »

That diagram looks better, than just the, this is a Linux file system!
It now gives people, the information about the Puppy specific file system, layout.

The things you do not tell us, are usually the clue to fixing the problem.
When I was a kid, I wanted to be older.
This is not what I expected :o

williams2
Posts: 1062
Joined: Sat Jul 25, 2020 5:45 pm
Been thanked: 305 times

Re: File Structure -- Your Road Map to Puppy

Post by williams2 »

If your Puppy uses jwm as Window Manager, immediately above the Taskbar will be desktop-drive icons
That is correct. If you are implying that JWM is generating the drive icons, it is not.

The desktop wallpaper and all of the desktop icons, including the drive icons, are all generated by RoxFiler.

See e.g. /etc/eventmanager
User avatar
01101001b
Posts: 164
Joined: Wed Jul 15, 2020 10:57 pm
Location: Buenos Aires, Argentina
Has thanked: 643 times
Been thanked: 21 times

Re: File Structure -- Your Road Map to Puppy

Post by 01101001b »

wiak wrote: Sun Jul 19, 2020 12:46 pm
bigpup wrote: Sun Jul 19, 2020 9:22 am This is Puppy Linux.
It is different than other Linux OS's.
The file system layout is different.
Stop explaining what it is in other Linux OS's.
...

Tell me how I could explain where .jwmrc is located if I showed them this diagram?
Sorry, that is nonsense. [Flawless sound defense here]
Well, I earnestly admit it: When you are right, you are right :thumbup2:

''Most people make the mistake of thinking design is what it looks like [...] It's not [...]. Design is how it works.'' -- Steve Jobs

User avatar
01101001b
Posts: 164
Joined: Wed Jul 15, 2020 10:57 pm
Location: Buenos Aires, Argentina
Has thanked: 643 times
Been thanked: 21 times

Re: File Structure -- Your Road Map to Puppy

Post by 01101001b »

mikeslr wrote: Sat Jul 18, 2020 5:23 pm A place for everything, and everything in its place.

[Amazing explanation here]
A great, great work. I've found it not only quite correct but also an enjoyable reading. Congrats! :thumbup:
At this pace, you will single-handedly make this forum more plentiful of valuable info than the previous one! :shock: :D
Thx mikeslr!

''Most people make the mistake of thinking design is what it looks like [...] It's not [...]. Design is how it works.'' -- Steve Jobs

User avatar
bigpup
Moderator
Posts: 6995
Joined: Tue Jul 14, 2020 11:19 pm
Location: Earth, South Eastern U.S.
Has thanked: 913 times
Been thanked: 1528 times

Re: File Structure -- Your Road Map to Puppy

Post by bigpup »

01101001b wrote: Thu Jul 30, 2020 4:12 am
wiak wrote: Sun Jul 19, 2020 12:46 pm
bigpup wrote: Sun Jul 19, 2020 9:22 am This is Puppy Linux.
It is different than other Linux OS's.
The file system layout is different.
Stop explaining what it is in other Linux OS's.
...

Tell me how I could explain where .jwmrc is located if I showed them this diagram?
Sorry, that is nonsense. [Flawless sound defense here]
Well, I earnestly admit it: When you are right, you are right :thumbup2:
My original post was before the file system image got changed.
If I was wrong.
Why was the diagram changed to show what I was saying needed to be in it! :roll:

The things you do not tell us, are usually the clue to fixing the problem.
When I was a kid, I wanted to be older.
This is not what I expected :o

User avatar
01101001b
Posts: 164
Joined: Wed Jul 15, 2020 10:57 pm
Location: Buenos Aires, Argentina
Has thanked: 643 times
Been thanked: 21 times

Re: File Structure -- Your Road Map to Puppy

Post by 01101001b »

bigpup wrote: Thu Jul 30, 2020 2:42 pm My original post was before the file system image got changed.
If I was wrong.
Why was the diagram changed to show what I was saying needed to be in it! :roll:
Hi bigpup!
First of all, believe me when I say I knew exactly what you meant by your remarks. In fact, I share them. You weren't wrong, and that's why the diagram was changed.
But in a bigger picture no man is an island, and that is true too for Puppy and derivatives. They still have much in common with Linux as a whole.
bigpup wrote: Sun Jul 19, 2020 9:22 am This is Puppy Linux.
Now, there you were totally right.
bigpup wrote: Sun Jul 19, 2020 9:22 am It is different than other Linux OS's.
The file system layout is different.
There you were partially right.
bigpup wrote: Sun Jul 19, 2020 9:22 am Stop explaining what it is in other Linux OS's.
And there you were plainly wrong... and harsh in fact.
bigpup wrote: Sun Jul 19, 2020 9:22 am Tell me how I could explain where .jwmrc is located if I showed them this diagram?
I won't lie to you. I found that line above waaayyy far fetched. Almost crazy talk.

I don't even use jwm so... imagine. I couln't care less where .jwmrc was located in the diagram (in fact, I think I've seen that file in /root in MIYO and perhaps in some DebianDog and such) but again the point here is you can't ditch an entire filesystem diagram that is almost 100% accurate to Linux in general just because you can't find a file not everyone use.

In that matter, wiak's answer...
wiak wrote: Sun Jul 19, 2020 12:46 pm
bigpup wrote: Sun Jul 19, 2020 9:22 am Tell me how I could explain where .jwmrc is located if I showed them this diagram?
Sorry, that is nonsense. If it were true, it would be a very bad idea (in terms of education) to encourage anyone to learn Linux via Puppy Linux. But actually, fortunately, most of the file system is same as "other Linux OS's". If that were not the case I would not myself understand Puppy layout, but I do.
[...]
Mike's diagram is very good. It works to a large extent for any Linux distro.
... reflected exactly my own experience and conclusions.

However, I might have commented wiak's reply a little too shortly and in a way, reflecting I was disapproving your entire opinion. But I wasn't. In fact, I've been reading your posts for years in the previous forum, bigpup, and I know you're no newcomer in this Linux/Puppy world.

(But truth be told: My first reaction to your original reply was something like "he said whaaaaaaaaat??" :shock: :D )

Regards! :thumbup:

''Most people make the mistake of thinking design is what it looks like [...] It's not [...]. Design is how it works.'' -- Steve Jobs

User avatar
bigpup
Moderator
Posts: 6995
Joined: Tue Jul 14, 2020 11:19 pm
Location: Earth, South Eastern U.S.
Has thanked: 913 times
Been thanked: 1528 times

Re: File Structure -- Your Road Map to Puppy

Post by bigpup »

Tell me how I could explain where .jwmrc is located if I showed them this diagram?
This was about the very first diagram of the file system.
It did not have /root shown on the diagram!
If i tried to tell someone to look in /root and find .jwmrc file.
The first thing they would say is "there is no /root to look in".

Now with the diagram corrected and showing /root, not a problem.

I am not going to get into all the differences of Puppy and a normal, standard Linux OS.
Programs not placed in the same locations.
Different files not placed in the same locations.
The big use of symbolic links.
How the filesystem is actually being used as you run Puppy.
Where the save is located.
That it is a layered filesystem.
What the filesystem is in the Puppy save. (as a save file apposed to a save folder)
Why Puppy does not use the /opt directory for Puppy only coded programs. (added normal main steam Linux programs, do use /opt)
etc.........

This is a readme from /usr/local/etc
I think we might need this directory, even if nothing in it,
as some apps look in here.
Not Puppy specific coded apps, but maybe one you install codded for Linux in general.

The things you do not tell us, are usually the clue to fixing the problem.
When I was a kid, I wanted to be older.
This is not what I expected :o

User avatar
01101001b
Posts: 164
Joined: Wed Jul 15, 2020 10:57 pm
Location: Buenos Aires, Argentina
Has thanked: 643 times
Been thanked: 21 times

Re: File Structure -- Your Road Map to Puppy

Post by 01101001b »

bigpup wrote: Sat Aug 01, 2020 1:44 pm This was about the very first diagram of the file system.
It did not have /root shown on the diagram!
If i tried to tell someone to look in /root and find .jwmrc file.
The first thing they would say is "there is no /root to look in".

Now with the diagram corrected and showing /root, not a problem.
:thumbup2:

''Most people make the mistake of thinking design is what it looks like [...] It's not [...]. Design is how it works.'' -- Steve Jobs

Post Reply

Return to “Beginners Help”