Kiosk Project based on Safepup

Booting, installing, newbie
Post Reply
Message
Author
Bunty
Posts: 7
Joined: Tue 18 Dec 2007, 22:41
Location: Australia

Kiosk Project based on Safepup

#1 Post by Bunty »

I am new to Linux and Safepup - working with it for about one week - please excuse me if I get the terminology incorrect.

I am attempting to create a internet kiosk with mouse only navigation.

Within one week, I have come so far thanks to the help of Raffy :wink: - who has ofered some timely advice.

I have come up against two problems:

Q1 How do you 'mirror' or duplicate the actions of the left button mouse click (button 1) on buttons two and three (effectively disabling the right click menu in firefox) Is there a file to edit?

Q2 I have the need to disable the minimize, maximize and window close events of firefox. Is this a WM thing or firefox configuration. Safepup uses JWM. Alternatives could be permanently hiding the taskbar, resizing the window (not preferred) or masking the buttons somehow so they become inactive.

And now for a final (and could be quite a stupid question) does WJM need to load in order to view firefox? Can safepup just simply load firefox without the WM?

Thanks for your time.

Bunty

Bruce B

#2 Post by Bruce B »

Various ways to disable the right mouse button. Take the mouse apart if you can and push the micro switch down so it doesn't click. If you can't take it apart, use some kind of filler between the depress portion of the mouse and the body.

I think maybe it's better to use jwm and just get rid of all the menu items you don't want people to have access to. Also delete the desktop items.

But, you don't have to use jwm, but you lose some basic functionality, which is probably what you want.

Edit ~/.xinitrc and near the bottom where it executes the window manager, comment that out. Add a line to have it execute Firefox instead. While you are editing you might want to comment out the ROX lines and see how you like that loss of functionality.

Theoretically you can have Firefox open at your preferred dimensions with the -width and -height switches. But you'll have to play with that one.

Bunty
Posts: 7
Joined: Tue 18 Dec 2007, 22:41
Location: Australia

#3 Post by Bunty »

Would this help with duplicating the mouse buttons? With slight modifications?

http://www.murga-linux.com/puppy/viewtopic.php?t=279

xmodmap -e 'pointer = 3 2 1 4 5' changed to xmodmap -e 'pointer = 1 2 1 4 5' for a five button mouse.

I have tried this modification, and then restarted x - it doesn't seem to work even for setting the left hand mouse in my puppy (safe)

Any suggestions?[/url]

Bunty
Posts: 7
Joined: Tue 18 Dec 2007, 22:41
Location: Australia

#4 Post by Bunty »

Well it worked - I managed to virtually disable the right mouse key with the:

xmodmap -e 'pointer = 1 2 6 4 5 3'

Now the right mouse click behaves as the back button click. Better than nothing.

If anyone knows how to duplicate the left mouse click with the right mouse click ie both buttons doing the same thing.... I would greatfully appreciate it!

Thanks

Gerard

Bruce B

#5 Post by Bruce B »

Bunty wrote:Well it worked - I managed to virtually disable the right mouse key with the:

xmodmap -e 'pointer = 1 2 6 4 5 3'

Now the right mouse click behaves as the back button click. Better than nothing.

If anyone knows how to duplicate the left mouse click with the right mouse click ie both buttons doing the same thing.... I would greatfully appreciate it!

Thanks

Gerard
Sorry Gerard, until I met you, I never even though of disabling the right button on a mouse. I couldn't answer your question about doing it with software.

I do have a thought from outer space if your interested in trying it. How about a single button Mac mouse?

The space ship probably won't fly, but you seem adventurous to give it a whirl.

Bruce

Bruce B

#6 Post by Bruce B »

I suppose you noticed that when using Firefox in place of the Windows manager it kills X when closed. But on the other hand there are other ways to kill X which would be hard to work around.

So do you want the users to have root control at the command prompt?

User avatar
HairyWill
Posts: 2928
Joined: Fri 26 May 2006, 23:29
Location: Southampton, UK

#7 Post by HairyWill »

for right mouse button, try this:
For those with the same problem, I have come up with a solution. It may not be the *right* solution, but it works. I would still like to appeal to Ubuntu experts to help point me down the true path.

As for my solution, I first used info from various HowTos regarding mouse mappings, by modifying the xorg.conf file and adding a ButtonMapping Option to the mouse InputDevice:

Option "ButtonMapping" "1 1 1"

This works, of course, because it maps all mouse buttons to button 1 when the X server starts up. The real problem is that it is a system-wide setting, and I could not find a way to have user-specific xorg.conf files.

I also tried working with xmodmap to change the button mappings there, but was confronted with errors either telling me that I need to specify values for all 9 mouse buttons (!!!), or that a value was out of range. It seems that regardless of how many mouse buttons you have, you need to specify 9 values, AND the values all have to be unique. So doing the following does not work:

xmodmap -e "pointer = 1 1 1 1 1 1 1 1 1"

But, the following DOES WORK:

xmodmap -e "pointer = 1 9 8 7 6 5 4 3 2"

Since I don't have 9 buttons on my mouse, this effectively disables buttons 2 and 3, my desired result. The bonus of using xmodmap is that I can now put it into a user-specific .gnomerc file in the $HOME directory of the users I want to have this crippled behaviour.
from
http://ubuntuforums.org/showthread.php? ... use+button

for ideas about locking down jwm see:
http://www.murga-linux.com/puppy/viewtopic.php?t=21940

If all you want is a browser don't forget that there is a quit entry in the browser file menu. You will need to watch for this and restart the browser if the user tries to close it
Will
contribute: [url=http://www.puppylinux.org]community website[/url], [url=http://tinyurl.com/6c3nm6]screenshots[/url], [url=http://tinyurl.com/6j2gbz]puplets[/url], [url=http://tinyurl.com/57gykn]wiki[/url], [url=http://tinyurl.com/5dgr83]rss[/url]

Bunty
Posts: 7
Joined: Tue 18 Dec 2007, 22:41
Location: Australia

#8 Post by Bunty »

Thank you for your responses Bruce B and HairyWill.

Bruce B: I will use the Mac mouse as a last resort as it is for multiple computers I wish to use the kiosk for. Good suggestion though!

Bruce B:
I suppose you noticed that when using Firefox in place of the Windows manager it kills X when closed. But on the other hand there are other ways to kill X which would be hard to work around.
So do you want the users to have root control at the command prompt?

Because the right mouse button is effectively 'kind of' disabled. When Firefox is closed I have a single icon on the desktop with no taskbar. In JWM with no right mouse button, users cannot access the system. With a keyboard however, I press F12 to bring the menu up. Works a treat!

HairyWill: Thanks for your suggestions. I will give them a go overnight.... just another late night. What you said in your final point is very interesting:
If all you want is a browser don't forget that there is a quit entry in the browser file menu. You will need to watch for this and restart the browser if the user tries to close it
Could you detail this in a little more.... What to do exactly. Because I haven't been able to deactivate the window close, minimize or maximize buttons, users can still exit firefox. I would love for Firefox to automatically launch again once a user has closed. Or will this be messy when trying to shutdown the system???

Thanks for your time and effort.

Bunty

tzi
Posts: 31
Joined: Sun 20 May 2007, 04:17

#9 Post by tzi »

I run a kiosk style setup using ubuntu linux.
4 simple changes are needed...

1 - map the mouse buttons so they are the same using Option "ButtonMapping" "1 1 1" within the xorg.conf

2 - change the window manager to blackbox (nothing but a right click menu, which you cant access anyway)

3 - make it so firefox loads on the WM startup

4 - install the firefox addon called Rkiosk (removes right click anyway)

after that... you can setup a user to autologin if you wish.



All I have to do now is work out how to run that setup using puppy, and then remove all the other unused stuff I dont need... and I'll be happy ;)

sidders
Posts: 464
Joined: Wed 23 Jul 2008, 18:47
Location: Bolton, uk

#10 Post by sidders »

I have just had a go at getting the "ButtonMapping" "1 1 1" in the xorg.conf at each boot.
This is in 412 The keyboard and mouse are automatically detected (no user input), but i left the display options for the user.

I adjusted the lines in /usr/sbin/xorgwizard

Code: Select all

#v2.21 quick hack...
sed -e 's%/dev/input/mice%/dev/mouse%'  /etc/X11/xorg.conf >/tmp/xorgconfmousefix
mv -f /tmp/xorgconfmousefix /etc/X11/xorg.conf
To:

Code: Select all

sed -e 's%/dev/input/mice%/dev/mouse%'  /etc/X11/xorg.conf > /tmp/xorgconfmousefix
sed  '/ZAxisMapping/ a\
    Option      "ButtonMapping" "1 1 1"' /tmp/xorgconfmousefix > /etc/X11/xorg.conf
rm /tmp/xorgconfmousefix
It worked on a ps2 mouse with scrollwheel. Probably needs more testing.

Post Reply