having tried endless os, an android-like "appliance" distribution, i wanted to put a more traditional distro on there which wouldnt make me jump through so many hoops (one i could play with and tinker with freely.)
i have a bootable trisquel 9 usb which id modified to replace systemd with upstart, but that was an experiment and i didnt want to install that. so i copied the puppy tahr iso to the usb, used trisquel to dd puppy onto the hard drive, booted from the hard drive to ram and did a frugal installation onto the same machine. thanks to frugal ive also got puppy xenial and the latest refracta on there-- all without making a bootable usb of anything now running on there.
but im not a fan of save files, and i am a fan of "remastering" the sfs from livecds. until ive got that up and running, here are some hacks ive put in a single script so that when puppy loads, i can have it the way i want. ill use this thread when there is stuff like this i want to add, a lot of this stuff isnt copyrightable but just to be sure this is all licensed creative commons cc0 1.0 (public domain) so you can use it freely in a script or a howto or whatever.
for a lot of this stuff, there is a better or cleaner way to do it. my objective here is simply to change a setting or remove, alter or add something in a quick and dirty way.
suspend
Code: Select all
sync ; sleep 2 ; echo mem > /sys/power/state
moving the taskbar to the top
the setting for this is in /root/.jwmrc-tray so i just changed it using jwmdesk manager, copied .jwmrc-tray to a partition and when i run my reconfigure script, it copies .jwmrc-tray to /root and (later) runs jwm -restart to let the change take effect.
some changes like this can be accomplished with nothing but grep or sed, but for this setting i thought it was more trivial to just make a copy of the modified file.
changing the brightness
because i dont use desktop environments, opting for simple window managers like jwm or icewm, i find the brightness keys on a laptop often dont work.
xbacklight has served me well when its available, but its not in puppy. xrandr has a --brightness feature but if your backlight is very bright, it will usually only change the colours in front of it which has limited usefulness.
since xbacklight was not installed, and copying a modern version of it to an older pup like tahr is likely to be tedious and even fail due to dependencies, i decided it was less trouble to run find /sys | grep for "rightnes" and try to find an option that would be specific to the laptop. i found one:
Code: Select all
echo 700 > $(find /sys/devices/ -type f | grep intel_backlight/brightness | tail -1)
stop barking
Code: Select all
rm $(find / | grep 2barks)
change the wallpaper
here i just copy a file to /usr/share/backgrounds/default.png and restart the rox pinboard. to stop it:
Code: Select all
kill $(pidof ROX-Filer)
Code: Select all
/usr/local/apps/ROX-Filer/ROX-Filer -p /root/Choices/ROX-Filer/PuppyPin
remove the puppy icon from the menu
i dont typically like any icon for this, but i prefer a generic one. so i just rm /usr/share/pixmaps/puppy/puppy.svg and then run:
Code: Select all
jwm -restart
remove the clock
it is necessary to restart jwm after this, but i dont like a clock on the taskbar. also without an internet connection, the clock is often set wrong. setting it is an option of course, but since i have enough clocks and i can "meta-t date [enter]" whenever it pleases me:
Code: Select all
cp /root/.jwmrc-tray jwmrctray
cat jwmrctray | -v lock > /root/.jwmrc-tray
remove xlock
im picky about what screen lock i use, and the touchscreen doesnt play nicely with puppy tahr (or xenial) so i just removed the program like this: rm /usr/local/apps/Xlock/AppRun
remove the top row of icons from the pinboard (desktop)
icon locations are stored in /root/Choices/ROX-Filer/PuppyPin and the top row in tahr consists of only lines where y="32" or y="36" so to remove those:
Code: Select all
cp /root/Choices/ROX-Filer/PuppyPin /root/Choices/ROX-Filer/PuppyPin2 ; cat /root/Choices/ROX-Filer/PuppyPin2 | grep -v 'y="32"' | grep -v 'y="36"' > /root/Choices/ROX-Filer/PuppyPin
adding some programs
as long as im doing this other stuff, i copy fig, figplus and the alex shell to /usr/bin and chmod +x them so theyre available when i use puppy.
getting rid of the dialogs
Code: Select all
kill $(pidof gtkdialog)
jwm -restart
poweroff without prompts
"busybox poweroff" works.
if you want to make it permanent and dont plan to use savefiles in the future, this should work:
Code: Select all
echo busybox poweroff > /sbin/poweroff