Page 1 of 1

Spot2Root - utility for moving files & changing permissions when working with user 'spot'...

Posted: Mon Aug 08, 2022 4:23 pm
by mikewalsh

Spot2Root - permission changer/file-moving utility for working with 'Spot'

Afternoon, gang.

After further recent mentions of this 'chown' stuff - along with many other mentions over the last couple of years! - I figured I'd better give this thing its own thread on the new Forum.

-----------------------------------

Running as user 'spot' gives Puppy users a similar experience to the 'normal user' behaviour of the mainstream distros. A self-contained directory limits any damage you may encounter from malware, etc. In Puppy, we mostly use this for browsers, or internet-facing apps.

The only snag, of course, is moving files in & out of spot in order to render them usable elsewhere in Puppy, since Puppy users generally run-as-root. So, way back in the dim, distant past (!! :lol: ), I figured out a simple script for simultaneously moving a file & changing its permissions, depending on whether you were going INTO spot or coming OUT of it......along with a wee YAD-powered GUI to operate the main functions.

Image

It's been refined, little by little, over the last few years; we're up to v4.3 ATM. The current version will move a file OUT of spot to the destination of your choice (it's /root/Downloads by default, but that's easily modified by some simple editing) and change permissions to root:root. It will also move any files you wish INTO spot, at the same time setting permissions to spot:spot.

A dedicated directory is created in /root, called SpotUploads; anything to upload to 'spot' goes in here, before using the button on the GUI to send it on its merry way.; downloads, as mentioned above, go to /root/Downloads by default. Some Pups never came with a Downloads directory; the utility checks for this, and creates one if necessary.

On the first run, the utility checks for:-

a) A /home directory, and /home/spot (this is analagous to the /home/user structure most distros use OOTB)
b) Whether /root/spot is a directory, or is already a sym-link to /home/spot (more Puppies are coming with this directory now, so /root/spot may already be a sym-link to /home/spot. If not, this structure will be set-up, ready to use.)

You can access the 'spot' directory from the GUI. You can also change the behaviour of the tray icon; as installed, it auto-starts at every boot, so the icon is always there, ready for use in the tray. Some of you may wish to manually start the utility when needed from the included Menu entry; the GUI allows you to select whether the tray icon auto-starts or not. This merely runs a 'chmod' operation on the tray icon script in /root/my-applications/bin to set the Exec action accordingly.

-----------------------------------------

Downloads, for both 32-bit & 64-bit Pups (a fairly up-to-date YAD binary is included, at around 900kb), can be found at the Drive:-

Spot2Root

Hope it's of some use to some of you...

Mike. ;)