How to create a Kiosk using Tahrpup 6.0

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

How to create a Kiosk using Tahrpup 6.0

#1 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
Command:

Code: Select all

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

The specific section of code you are looking for deals with the pupmode that was set when you first booted Puppy Linux. Your pupmode is set to 5, if puppy wasn't able to find a pupsave file. What we are doing here is making puppy skip the Pup Save Dialog, so we will always get a fresh puppy when rebooting.

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

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
Command:

Code: Select all

vi /usr/bin/wmpoweroff
Comment out lines 23 to 27 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.)

This code in this file is also dealing with the pupsave dialog and pupmode 5.

Command:

Code: Select all

vi /usr/bin/wmreboot
Comment out lines 23 to 27 by putting a # sign at the beginning of the line.

This code in this file is pretty much identical to the code in wmpoweroff, but is called here on a reboot.

Disable Ctrl+Alt+Backspace and Virtual Terminal Switching

Step #1: Edit xorg.conf
Command:

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
Command:

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
Command:

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.

Repeat Step#1 for the file /tmp/PuppyPin
Command:

Code: Select all

vi /tmp/PuppyPin
Failure to remove the <icon lines from both PuppyPin files will result in your desktop still being populated with icons. The /tmp/PuppyPin file is called by the /usr/sbin/fixPuppyPin file when the X Server is restarted.
(The X Server is the Linux program that allows you to see things on your screen.)

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
Command:

Code: Select all

vi /root/.xinitrc
Comment out lines 15 & 136.
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->Exit->Restart Graphical Server
You should now have a desktop devoid of icons. Yay!
Last edited by shadower_sc on Thu 20 Aug 2015, 19:58, edited 4 times in total.

User avatar
oldyeller
Posts: 889
Joined: Tue 15 Nov 2011, 14:26
Location: Alaska

#2 Post by oldyeller »

Would you do the same for precise 5.7.1

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

Precise Puppy 5.7.1

#3 Post by shadower_sc »

I would have already done it for Precise Puppy 5.7.1, but it doesn't run in VirtualBox. Which is where I do almost all of my tinkering with Puppy Linux. VirtualBox is extremely convenient, unless your OS doesn't work with it. xD

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

Precise Puppy 5.7.1 Changes

#4 Post by shadower_sc »

Edits for Precise Puppy v.5.7.1
Please make the following changes when following the first post of this thread, if you are using Precise Puppy v.5.7.1
(I did not test this on Precise Puppy v.5.7.1, but it should work.)

Disable Save on Shutdown

Step#1 Comment out Lines 298 to 311
Code Snippet you are looking for:

Code: Select all

#first time booted puppy, there may not have been any persistent storage...
if [ $PUPMODE -eq 5 ];then #ifpupmode5
...
fi #end ifpupmode5
Remove All Desktop Icons

Step#3 Comment out Lines 15 & 129
Code Snippets you are looking for:

Code: Select all

/sbin/clean_desk_icons #v4.02 tidy up drive icons first.

Code: Select all

/sbin/pup_event_frontend_d & #130525 moved down.

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

Customize the Menu

#5 Post by shadower_sc »

Customize the Menu

Step #1: Edit the JWM Menu
Command:

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="configuration48.png" height="16"> 
<Program label="Puppy installer" icon="/usr/share/pixmaps/puppy/power.svg">/usr/sbin/dotpup1</Program>
<Program label="Chooselocale country localisation" icon="/usr/share/pixmaps/puppy/country_language.svg">chooselocale</Program>
<Program label="GParted partition manager" icon="gparted.xpm">gparted_shell</Program>
<Program label="Legacy GRUB Config 2013" icon="/usr/share/pixmaps/puppy/startup_os.svg">legacy_grub_2013</Program>
<Program label="Grub4Dos bootloader config" icon="gnibbles.png">grub4dosconfig</Program>
<Program label="JWM Window Manager Settings" icon="/usr/share/pixmaps/puppy/windows.svg">jwmconfig</Program>
<Program label="JWM Theme Maker" icon="mini.window3d.xpm">/usr/sbin/jwmthememaker</Program>
<Program label="Linux-Firewall Wizard" icon="/usr/share/pixmaps/puppy/shield_yes.svg">rxvt -e firewallinstallshell</Program>
<Program label="Pmount mount/unmount drives" icon="/usr/share/pixmaps/puppy/harddisk.svg">pmount</Program>
<Program label="Psync Time Server Synchronisation" icon="mini-clock.xpm">/usr/local/psync/psync</Program>
<Program label="Puppy Package Manager" icon="/usr/share/pixmaps/puppy/package_add.svg">/usr/local/petget/pkg_chooser.sh</Program>
<Program label="Pwallpaper background image chooser" icon="/usr/share/pixmaps/puppy/wallpaper.svg">pwallpaper</Program>
<Program label="Remaster Puppy live-CD" icon="/usr/share/pixmaps/puppy/puppy_remaster.svg">/usr/sbin/remasterpup2</Program>
<Program label="Set date and time" icon="/usr/share/pixmaps/puppy/date_time.svg">set-time-for-puppy</Program>
<Program label="PupClockset manager" icon="/usr/local/PupClockset/icons/clockformat48.png">PupClockset</Program>
<Program label="Set timezone" icon="/usr/share/pixmaps/puppy/country_timezone.svg">timezone-set</Program>
<Program label="Xorg Video Wizard" icon="/usr/share/pixmaps/puppy/graphics.svg">xorgwizard</Program>
</Menu> 
<Program label="Geany text editor" icon="/usr/share/icons/hicolor/48x48/apps/geany.png">geany</Program>
<Program label="ROX-Filer file manager" icon="mini-filemgr.xpm">rox</Program>
<Program label="Palemoon" icon="/usr/share/icons/mozicon128.png">palemoon</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 24 lines. Make sure your cursor is on the first line in the chunk of lines you are going to copy.
Command in vi: "a24yy
The "a defines the named buffer a, 24 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.

Removed Tray Editing Section (.jwmrc-tray) as it seems to break the package manager in 6.0.2. I will re-add the tray editing just before you would remaster your live-cd. The package manager shows that there is not enough free memory when in fact there is. The 6.0.3 update adds an error message that tells you to click on the free memory icon in the tray to fix the error. Undoing my edits in the .jwmrc-tray, refreshing the window manager, and clicking on the free memory app doesn't solve the problem.

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

Post Reply