How to make a Precise Puppy 5.4 kiosk

How to do things, solutions, recipes, tutorials
Message
Author
shadower_sc
Posts: 136
Joined: Wed 21 Apr 2010, 23:03
Location: Texas

How to make a Precise Puppy 5.4 kiosk

#1 Post by shadower_sc »

Hello Again, Puppy Linux Community. :D

I was very happy to see a new Puppy Linux come out. It has been a while since I updated my Kiosk and now seems like a good time.

I use the Kiosk as a Public Access Computer for patrons in our Library. I lockdown Puppy Linux and Firefox to keep users from doing anything I don't want them to be able to do. In our case we want them to Only be able to access our Catalog, Databases, and a few "Research" sites. A small example of the "Research" sites we allow access to are gutenberg.org, librivox.org, and wikipedia.org.

My creation of this Kiosk would not be possible without the great people and community behind puppy linux. Thank You. :D

Install the Virtualbox Guest Additions, if you are testing Puppy using Virtualbox: http://www.murga-linux.com/puppy/viewtopic.php?t=81705

Note: These Instructions use Precise Puppy 5.4.2 as it includes a much needed improvement to the Puppy Package Manager.
These exact instructions will not work with any other version due to the nature of the changes being made. (These instructions should also work with Precise Puppy 5.4.3.) The differences between versions are minor at times, but don't count on it. I had to do a lot of digging for this version due to a change in the structure of the shutdown script and how it is integrated into the system.

Kiosk Setup Instruction Documents
Kiosk Setup 01 Begin Puppy Lockdown
Kiosk Setup 02 Customize the Menu
Kiosk Setup 03 Install and Lockdown Firefox
Kiosk Setup 04 Printing in Puppy Linux

Links to Old Kiosk Setups:
Lucid Puppy 5.2 http://www.murga-linux.com/puppy/viewtopic.php?t=64632
Puppy 4.3.1 http://www.murga-linux.com/puppy/viewtopic.php?t=55907
Last edited by shadower_sc on Fri 18 Jan 2013, 16:46, edited 15 times in total.

shadower_sc
Posts: 136
Joined: Wed 21 Apr 2010, 23:03
Location: Texas

Begin Puppy Lockdown

#2 Post by shadower_sc »

Begin Puppy Lockdown

All of the editing in this tutorial will be done from the command line. You can substitute vi for geany and use a graphical text editor, if you so desire. You will need to enable line numbers in geany. View->Editor->Show Line Numbers

Disable Save on Shutdown
In previous versions of puppy linux you only had to edit the rc.shutdown file. Starting with at least v.5.4 you also have to edit the wmpoweroff and wmreboot files.

Step #1: Edit rc.shutdown

Code: Select all

vi /etc/rc.d/rc.shutdown
Comment out lines 293 to 306 by putting a # sign at the beginning of each line.

Use the down arrow key to scroll down to line 293. Notice the line numbers at the bottom of the console window. This file has 666 lines and we start at line 1 so you should see 1/666.

Use the Following Commands in vi to edit, stop editing, save, quit, and quit without saving.

Insert Key to Start Edit Mode in vi.

Escape Key to Stop Edit Mode in vi.

Press : and it will bring up the vi command line.

w on the vi command line to save the file.

q on the vi command line to quit/exit the file.

q! on the vi command line to quit the file without saving, if necessary.

Step #2: Edit wmpoweroff and wmreboot

Code: Select all

vi /usr/bin/wmpoweroff
Comment out line 23 by putting a # sign at the beginning of the line.
(Follow the same basic steps for editing the file in vi as outlined in Step#1.)

Code: Select all

vi /usr/bin/wmreboot
Comment out line 23 by putting a # sign at the beginning of the line.
(Again follow the same basic steps for editing the file as outlined in Step#1.)

Disable Ctrl+Alt+Backspace and Virtual Terminal Switching

Step #1: Edit xorg.conf

Code: Select all

vi /etc/X11/xorg.conf
Find the Server Flags section.
Uncomment the line: Option "DontVTSwitch".
Change the value "false" to "true" in the line: Option "DontZap" "false".

Uncomment the line by deleting the # sign at the beginning of the line.

Step #2: Edit xorg.conf0

Code: Select all

vi /etc/X11/xorg.conf0
Make the exact same changes to this file as you did to xorg.conf.

Remove all Desktop Icons

Step #1: Edit PuppyPin

Code: Select all

vi /root/Choices/ROX-filer/PuppyPin
Delete all the Lines beginning with <icon.

Delete lines in vi by moving the cursor to the line you want to delete and double tapping the d key.

Step #2: Configure Drive Icon Manager
Right-Click any Drive Icon and select Run Desktop Drive Icon Manager.
Uncheck all boxes in all tabs of the Drive Icon Manager.

Step #3: Edit .xinitrc

Code: Select all

vi /root/.xinitrc
Comment out lines 12 & 13.
They contain clean_desk_icons and pup_event_frontend_d which apparently add the Drives icon to the desktop.

Restart X server to implement the changes: Menu->Shutdown->Restart X server
You should now have a desktop devoid of icons. Yay! :D
Last edited by shadower_sc on Thu 06 Dec 2012, 22:58, edited 8 times in total.

shadower_sc
Posts: 136
Joined: Wed 21 Apr 2010, 23:03
Location: Texas

Customize the Menu

#3 Post by shadower_sc »

Customize the Menu

Step #1: Edit the JWM Menu

Code: Select all

vi /root/.jwmrc
(Note that the Comment Convention for this file is <!-- Commented Out -->)
"<!--" starts the comment and "-->" ends the comment. Comment out any entries you do not want. I typically start the comment right after the start of the root menu and end the comment at the separator above the shutdown menu. That Comments out the Entire Menu except for the Separator, the Help Button, and the Shutdown Menu. Then I add the entries I want to keep above the Separator. I also created my own "Kiosk Setup" Menu.

Here are the Menu entries I am using for my Kiosk Setup CD.

Code: Select all

<Menu label="Kiosk Setup" icon="configuration24.png" height="16">
<Program label="BootFlash install Puppy to USB" icon="mini-ray.xpm">/usr/sbin/bootflash</Program>
<Program label="Chooselocale country localisation" icon="mini-font.xpm">chooselocale</Program>
<Program label="GParted partition manager" icon="gparted.xpm">gparted_shell</Program>
<Program label="Grub bootloader config" icon="grubconfig.xpm">grubconfig</Program>
<Program label="Grub4Dos bootloader config" icon="gnibbles.png">grub4dosconfig</Program>
<Program label="JWM configuration" icon="mini.window3d.xpm">jwmconfig</Program>
<Program label="JWM Theme Maker" icon="mini.window3d.xpm">/usr/sbin/jwmthememaker</Program>
<Program label="Linux-Firewall Wizard" icon="wizard16.xpm">rxvt -e firewallinstallshell</Program>
<Program label="Pdisk partition manager" icon="Pdisk.xpm">Pdisk</Program>
<Program label="Pmount mount/unmount drives" icon="mini-diskette.xpm">pmount</Program>
<Program label="Psync Time Server Synchronisation" icon="mini-clock.xpm">/usr/local/psync/psync</Program>
<Program label="Puppy Package Manager" icon="pet16.xpm">/usr/local/petget/pkg_chooser.sh</Program>
<Program label="Puppy universal installer" icon="mini-ray.xpm">/usr/sbin/puppyinstaller</Program>
<Program label="Pwallpaper background image chooser" icon="mini-cave.xpm">pwallpaper</Program>
<Program label="Remaster Puppy live-CD" icon="mini-ray.xpm">/usr/sbin/remasterpup2</Program>
<Program label="Set date and time" icon="mini-clock.xpm">set-time-for-puppy</Program>
<Program label="Set hardware-clock type" icon="mini-clock.xpm">set_hwclock_type</Program>
<Program label="Set timezone" icon="mini-clock.xpm">timezone-set</Program>
<Program label="Xorg Video Wizard" icon="wizard16.xpm">xorgwizard</Program>
</Menu>
<Program label="Geany text editor" icon="geany.png">geany</Program>
<Program label="ROX-Filer file manager" icon="mini-filemgr.xpm">rox</Program>
<Program label="SeaMonkey web browser" icon="seamonkey16.xpm">mozilla</Program>
<Program label="Urxvt terminal emulator" icon="mini-sh.xpm">rxvt</Program>
<Separator/>
Keep the File Open once you have finished editing the .jwmrc file.
Save your changes with the :w command in vi.

You need to copy the menu entries you are keeping from your .jwmrc file to the _root_.jwmrc file. Make sure you are not in edit mode by pressing the escape key. Place your cursor on the first line of the menu entries you are going to keep. Count that line and the subsequent lines that you need to copy. In my case I needed to copy 25 lines. Make sure your cursor is on the first line in the chunk of lines you are going to copy.

Command in vi: "a25yy
The "a defines the named buffer a, 25 is the number of lines to "yank", and the yy is the command to yank/copy.

Command in vi: :e /etc/xdg/templates/_root_.jwmrc
The : is to bring up the vi command line, e is the command to open a file to edit, and the rest is the path to the file and the name of the file.

Command in vi: :e! /etc/xdg/templates/_root_.jwmrc, if there are unsaved changes that you do not wish to save.

You should now have the _root_.jwmrc file open.

Move your cursor to the line before the separator above the help menu entry.
Command in vi: "ap
The "a calls the named buffer, and p is the command to put/paste.

Enter Edit Mode by pressing the Insert key.
Move your Cursor to the line just after the Root Menu Entry and enter <!-- to start commenting out the menu. Move your cursor to the line below the last "PUPPYMENU" entry and enter --> to end the comment.

Step #2: Edit the Tray

Code: Select all

vi /etc/.jwmrc-tray
(Note that this file uses <!-- to start comments and --> to end comments.)

I have outlined a few items below that can be removed from the tray. Remove them or keep them as it suits your case.

Comment out the <Dock/> line to remove the Volume and other icons from the JWM Tray.

Comment out the <Swallow ...> to </Swallow> to remove the xload / CPU monitoring icon from the JWM Tray.

Comment out the <Pager/> line to remove the Desktop switcher from the JWM Tray.

CAUTION Changing the Number of Virtual Desktops will restart JWM. You could end up unable to start any programs or unable to shutdown the computer properly, if you have not setup your menu correctly.

Change Number of Virtual Desktops
Open the JWM Configuration Tool: Menu->Desktop->JWM Configuration
Click on Tray Management.
Click on Virtual Desktops.
Make sure there is a 1 for rows and a 1 for columns. 1x1=1

You need to Restart JWM, if you don't change the number of Virtual Desktops. Menu->Shutdown->Restart JWM

You should now see your custom menu when you right-click or click on the menu button.

shadower_sc
Posts: 136
Joined: Wed 21 Apr 2010, 23:03
Location: Texas

Install Firefox and Lockdown Firefox

#4 Post by shadower_sc »

Install Firefox

Please note that you Really should be running Precise Puppy 5.4.2 as Barry updated the Puppy Package Manager and it updates quickly now.

The Firefox version in the Precise Puppy Repository is v.16.01 Nightly. (12/06/2012) I was unable to find a way to update it and as such is not what I need.

=================================
Install Latest Firefox from Ubuntu Repositories
=================================

Open the Puppy Package Manager
Click Configure Package Manager.
Click on the Update Button to update the package list.
Follow the instructions for updating the repositories.
Most of them ask you to press Enter, if you want to update the specified repository.

It will take a moment or two to update the list. The Puppy Package Manager updates Fast now! :-)

Click Ok once it has finished and the packages will be ready for you to search.

Now search for Firefox in the "Find" search box. It will ask you, if you want to search the current repository or all of the repositories. Click on the All Repositories Search Button.

A number of Firefox packages should show up. At the time of writing this how-to the package I need to install is "firefox_17.0.1+build1". The name will change with the versions. You want the current "normal" firefox build. Note: You could choose the one that is in your language instead.

Once you have clicked on the firefox package you want to install it will come up with an install dialogue.

Click on Examine Dependencies to search for the dependencies you need to install to make sure firefox works.

Click Download-and-install selected packages. The dependencies should automatically be selected along with the package you selected earlier.

You now have an option to choose which server you would like to download from. I leave it as the default. In this case it was "archive.ubuntu.com".

Click Download Packages.

Puppy Linux reports that Python2.8 is a missing dependency. I installed the latest Python and it seemed to work fine, but the dependency is still listed. You may not need to install an updated version of Python at all.

Lockdown Firefox

Step#1 Install the Public Fox, ProCon Latte, and Menu Editor Add-Ons

Start Firefox:
Menu->Internet->Firefox web browser

It will ask you, if you want to make it your default browser.
Make sure the checkbox is checked and click Yes.

Click on Tools in the Firefox Toolbar at the top of the window.
Click on Addons within the Tools Menu.
Click on the "Get-Addons" Button.
Type "Public Fox" into the text box and press the Enter key or click on the search icon on the right side of the text box.

Select Public Fox and click on the "Add to Firefox..." button.
It will give a count down and then the Install Now button will appear.
Click on the "Install Now" button.

Restart Firefox after the installation.

Click on Tools in the Firefox Toolbar at the top of the window.
Click on Addons within the Tools Menu.
Click on the "Get-Addons" Button.
Type "ProCon Latte" into the text box and press the Enter key or click on the search icon on the right side of the text box.

Select ProCon Latte and click on the "Add to Firefox..." button.
It will give a count down and then the Install Now button will appear.
Click on the "Install Now" button.

Click on Tools in the Firefox Toolbar at the top of the window.
Click on Addons within the Tools Menu.
Click on the "Get-Addons" Button.
Type "Menu Editor" into the text box and press the Enter key or click on the search icon on the right side of the text box.

Select Menu Editor and click on the "Add to Firefox..." button.
It will give a count down and then the Install Now button will appear.
Click on the "Install Now" button.

Step#2 Customize Public Fox, ProCon Latte, and Menu Editor to your liking.

I use Public Fox for the following tasks:
Password Protect the Menu and about:config.

I use ProCon Latte for the following tasks:
Enforcement of the Whitelist.

I use Menu Editor for the following tasks:
Editing the Right-Click Menu. I remove all Save Image As, etc.... entries as well as the ProCon Right-Click Menu Entry.

It would be wise to take a few minutes to familiarize yourself with their functions.

Detailed list of items to Edit using Menu Editor Add-On:
In the "File" Menu disable the "Open File..." and "Save Page As..." Menu Entries.
In the "Tools" Menu disable the "Set Up Sync..." and "Page Info" Menu Entries.
In the "Tools" Menu disable the "Web Developer" drop down menu.

In the "Help" Menu disable the following Menu Entries:
Firefox Help
Troubleshooting Information
Submit Feedback...
Restart with Add-ons Disabled...
Report Web Forgery...

In the "Main Context Menu" (Right-Click Menu Editable using the Menu Editor Add-On.) disable the following Menu Entries:
Add to Dictionary
Save Link As...
Bookmark This Link
Show Statistics
Save Imag As...
Set As Desktop Background...
View Image Info
Save Video As...
Save Audio As...
Save Snapshot As...
Bookmark This Page
Save Page As...
This Frame
View Selection Source
View MathML Source
View Page Source
View Page Info
Add Dictionaries...
Inspect Element

In the "Tab context menu" disable the following Menu Entries:
Pin as App Tab
Bookmark All Tabs...

Detailed list of items to edit using Personal Menu Add-On:
Remove the "New Tab" drop down menu.
Add separate "New Tab" and "New Window" Menu Entries.

Remove the "Help" drop down menu.
Add the "About Firefox" Menu Entry.

Remove the "Save Page As..." and "Setup Sync..." Menu Entries.
Remove the "Web Developer" drop down menu.
Last edited by shadower_sc on Fri 18 Jan 2013, 16:33, edited 3 times in total.

shadower_sc
Posts: 136
Joined: Wed 21 Apr 2010, 23:03
Location: Texas

Printing in Puppy

#5 Post by shadower_sc »

Printing in Puppy

Step #1 Manage / Setup your printers using CUPS

Start your Internet Browser: (I use Firefox)
Menu->Internet->Firefox web browser

Go to the CUPS management page:
"http://localhost:631"

Click on the Administration Tab.

Click on the Add Printer Button.
It will try to automatically detect your printer(s).

The interface is easy to use and as long as you know what you are doing all should work well. There are some help files to look into that have great information.

The Network Printer Help page has a list of models and their common URI types. "http://localhost:631/help/network.html" (That should work, but the help files are missing in Precise Puppy 5.4.2) The help is available at: http://www.cups.org/documentation.php/d ... twork.html

Step #2 Keep the printer settings for your Kiosk
(This Step is only necessary when Re-Mastering and wanting to keep your Printer Setup on the CD/DVD.)
You don't want to do this, if you are going to be sharing your Re-Mastered CD/DVD image file with the world.


When creating the Re-Mastered CD remember to do the following:

Delete the "/tmp/etc/cups" folder.

CAUTION the command "rm -r" is a powerful delete tool and will not give you a second chance. It will more or less irrevocably Delete Everything You Tell it To.

Use this command to delete the temporary cups folder:
"rm -r /tmp/etc/cups"

You should no longer have a "cups" folder in the "/tmp/etc/" directory.

Use this command to move the current cups settings from Step #1:
"mv /etc/cups /tmp/etc/"

You should now have a "cups" folder in the "/tmp/etc/" directory.

shadower_sc
Posts: 136
Joined: Wed 21 Apr 2010, 23:03
Location: Texas

Disable settings wizard and welcome on first boot

#6 Post by shadower_sc »

Disable First Boot Setup, Etc

Disable Settings Wizard at First Boot:
"vi /etc/personal_settings_popup_disabled"
Save the file with nothing in it. The file just needs to exist for it to work.

Disable Welcome on 1st Boot:
"vi /usr/sbin/delayedrun"
Comment out line 150 to disable the "puppy bark" at boot.
Comment out line 155 to disable the Welcome Screen at boot.

shadower_sc
Posts: 136
Joined: Wed 21 Apr 2010, 23:03
Location: Texas

Checklist

#7 Post by shadower_sc »

Hello Again. I almost forgot to make sure that my Kiosk was using Xorg when I was creating it. Make sure you are using Xorg instead of the Xvesa video driver. You need to be running Xorg to disable the Ctrl+Alt+Backspace shortcut and the Virtual Terminal Switch.

Checklist before creating Final Kiosk CD.

Setup Xorg
#1 Start the Xorg Wizard (Either from the menu or from the command line.) Type xorgwizard at the command line to start the Xorg Wizard.
#2 Select Xorg as the Driver.
#3 Choose a Sane Resolution for your monitor. Typically 1024x768 is a safe choice.
#4 Click Test
#5 Click Ok, if the test was good. Otherwise, wait for it to timeout and try again.

DO NOT RESTART JWM AT ANY POINT AFTER EDITING THE MENU

Final Menu Changes
#1 Edit the Menu file /root/.jwmrc
#2 Comment out all entries except for Firefox, Power Off, and Reboot.

Create Passwords for Add-Ons in Firefox
#1 Open the Add-Ons Menu.
#2 Click Preferences on ProCon Latte. Click Create Password. (Enter the password you want and will remember.)
#3 Click Preferences on Public Fox and Enter the Same Password in the password fields to set the password.

===============
Work in Progress
===============

Remaster the Live-CD.
#1 Click on the Remaster Live-CD menu entry.
#2 Choose a place to store the Temporary Files and Remastered CD image. (I plug in a usb flash drive and use that.)
#3 It will ask you, if you want to make hardware customizations.
Choose Yes. The Recommended Default is no, but we need the hardware customizations in order for our Kiosk to work properly.
#4 It will let you know that the /tmp/root directory has been made.
#5 Remove the default .mozilla profile and replace it with your updated .mozilla profile.
(Make sure you don't have any personally identifiable information in your Internet History, etc. Ideally you want a pristine Firefox that only includes the modifications you made. Such as installed Add-Ons and specific settings.)
Remove the default .mozilla profile with the following command:
"rm -r /tmp/root/.mozilla"
Copy the .mozilla profile that you have been editing to the Re-Master folder /tmp/root/:
"cp -r /root/.mozilla /tmp/root/"
Start Firefox on Puppy Kiosk Start
Start Urxvt Terminal or similar Console.
Navigate to /tmp/root/Startup: "cd /tmp/root/Startup"
Create the file firefox_run in the /tmp/root/Startup directory: "vi /etc/tmp/root/Startup/firefox_run"
Enter the following three lines into the text editor:

Code: Select all

#!/bin/bash 
sleep 15 
firefox

Make any other changes you want or need to the files in the /tmp/root directory.
Click Ok when finished making changes to /tmp/root
#6 Click Yes to include Hardware Drivers/Customizations in /tmp/etc.
#7 Edit the files in /tmp/etc
Final Menu Updates:
"vi /tmp/etc/xdg/templates/_root_.jwmrc"
( Use <!-- to start and --> to end comments in the file _root_.jwmrc.)
(You want Firefox, Restart, and Power Off as the only Menu Entries.)
Copy Xorg settings files to disable Virtual Terminal Switching and the shortcut for restarting the X Server:
"cp /etc/X11/xorg.conf /tmp/etc/"
"cp /etc/X11/xorg.conf0 /tmp/etc/"
Remove the "Pristine Printer Settings":
"rm -r /tmp/etc/cups"
Add the "Custom settings created earlier:
"mv /etc/cups /tmp/etc/"
Click Ok when finished making changes to /tmp/etc
#8 Edit the CD's Boot Menu
When asked about editing the isolinux.cfg Click Yes.
Change the timeout from 50 to 1.
That way the CD boots almost instantly.
#9 It will ask you, if you want to burn a CD/DVD. Click No.
#10 It will ask you, if you want to create an iso. Click Yes.
Last edited by shadower_sc on Fri 18 Jan 2013, 16:31, edited 1 time in total.

NerdWithNoLife
Posts: 8
Joined: Wed 10 Nov 2010, 18:35

#8 Post by NerdWithNoLife »

Thanks for this update of your other excellent guide. My family has gotten a lot out of it, having a friendly nice corner of the internet, which isn't one click away from a "TURN THAT OFF RIGHT NOW!!!" moment.

shadower_sc
Posts: 136
Joined: Wed 21 Apr 2010, 23:03
Location: Texas

#9 Post by shadower_sc »

I am glad you have been able to make good use of it. :D

User avatar
e_mattis
Posts: 114
Joined: Fri 21 Dec 2012, 02:24
Location: Williamston, SC
Contact:

wow

#10 Post by e_mattis »

Thanks Shadower_sc!

Very nice concept, excellently written instructions... an old fashioned - :D "Kudos" :D to you.

shadower_sc
Posts: 136
Joined: Wed 21 Apr 2010, 23:03
Location: Texas

Re: wow

#11 Post by shadower_sc »

Thanks. :)

anikin
Posts: 994
Joined: Thu 10 May 2012, 06:16

#12 Post by anikin »

Hi shadower_sc,

A very well written and easy to grasp tutorial.
Can I please ask you to slightly expand the text to show the actual lines in the scripts, that need to be commented out? Line numbers may get shifted over time, if Barry modifies or adds his own comments to the scripts.

Thank you very much.

User avatar
Dean
Posts: 46
Joined: Thu 03 Dec 2009, 13:15
Location: UK

#13 Post by Dean »

Disable save on shutdown doesn't work on Precise Puppy 5.5 :cry:
------------
[b]HP 510 Notebook[/b] CPU 1.4 GHz Pentium M / RAM 2GB / 15.4" WXGA BrightView 1280 x 800 / 40GB HD / OS Manjaro 0.8.8

kurtdriver
Posts: 29
Joined: Sat 17 Jan 2009, 00:15

#14 Post by kurtdriver »

Hi Shadower_sc, I'm wondering why you prefer Firefox addons, which can be easily disabled, to block connections rather that a system-wide firewall?

shadower_sc
Posts: 136
Joined: Wed 21 Apr 2010, 23:03
Location: Texas

RE:Firewall vs Firefox Add-Ons

#15 Post by shadower_sc »

The simplest answer is, because that's what I came up with. I never claimed that it was the best solution. It just works. ;-) A more elegant solution would be to use a combination of my tutorial to lock-down Puppy Linux and use a Firewall installed in Puppy Linux to manage the whitelist, blacklist or both.
Last edited by shadower_sc on Wed 03 Apr 2013, 18:59, edited 1 time in total.

shadower_sc
Posts: 136
Joined: Wed 21 Apr 2010, 23:03
Location: Texas

specific lines in the scripts

#16 Post by shadower_sc »

anikin: The text of the lines in the scripts may vary as well. I have included the text in some of my previous kiosk instructions, but apparently I didn't in this write-up. I will see what I can do, but I may not have time to work on it for a while. Thanks for the suggestion.

shadower_sc
Posts: 136
Joined: Wed 21 Apr 2010, 23:03
Location: Texas

Disable Save on Shutdown

#17 Post by shadower_sc »

Dean: I will post an update, if I have time.

shadower_sc
Posts: 136
Joined: Wed 21 Apr 2010, 23:03
Location: Texas

Disable Save on Shutdown in Precise Puppy 5.5

#18 Post by shadower_sc »

Disable Save on Shutdown in Precise Puppy 5.5

Comment out lines in the following files by placing a # symbol in front of each line to be commented out.

Edit file rc.shutdown:
Comment out lines 297 to 311.
These are the lines that need to be commented out:
#first time booted puppy, there may not have been any persistent storage...
if [ $PUPMODE -eq 5 ];then #ifpupmode5

#110919 code moved out to /usr/sbin/shutdownconfig.
#note, shutdownconfig normally called via /usr/bin/wmreboot or wmpoweroff when want shutdown from X.
unset PUPSAVE SAVEFS SAVEPART SAVEFILE NAMEONLY SAVEPATH MYPASSWORD SFEXT xPDEV xDEVFS
if [ ! -f /tmp/shutdownconfig_results ];then
shutdownconfig
fi
if [ -s /tmp/shutdownconfig_results ];then
. /tmp/shutdownconfig_results #supplies variables PUPMODE SAVEFS PUPSAVE SAVEPART SAVEFILE NAMEONLY SAVEPATH MYPASSWORD SFEXT
rm -f /tmp/shutdownconfig_results #precaution.
fi

fi #end ifpupmode5
Edit file /usr/bin/wmpoweroff:
Comment out line 24.
The line that needs to be commented out is:
shutdownconfig #dlgs for creating save-file.
Edit file /usr/bin/wmreboot:
Comment out line 24.
The line that needs to be commented out is:
shutdownconfig #dlgs for creating save-file.

anikin
Posts: 994
Joined: Thu 10 May 2012, 06:16

Re: Disable Save on Shutdown in Precise Puppy 5.5

#19 Post by anikin »

shadower_sc wrote:Disable Save on Shutdown in Precise Puppy 5.5
Performed a quick test in Upup Raring 3.8.4.2 - works perfectly well.

I'm moving away from the save file, as I see no purpose in using it. Your tutorial couldn't have come at a better time and is inspiring in many other ways, than its stated goal.

Many thanks to you, shadower_sc.

shadower_sc
Posts: 136
Joined: Wed 21 Apr 2010, 23:03
Location: Texas

Thanks where thanks is due. :-)

#20 Post by shadower_sc »

It would have been next to impossible for me to have done this on my own. The real credit goes to the people who make Puppy Linux. Thanks to Barry, the developers, and the community. Thanks for the great Documentation in the code too! :-)

Post Reply