Dr Dubya
Posts: 3
Joined: Thu Feb 27, 2020 12:40 pm

In need of multiple kiosk-mode setups

Thu Feb 27, 2020 1:10 pm

Hi , new member here, looking for advice / help on a specific issue

I recently set up a Pi in kiosk mode using the excellent tutorial https://pimylifeup.com/raspberry-pi-kiosk/
My Pi is set up to go to one site only, in order that candidates can complete online exams without the possibility of cheating by using a search engine.

I would now like to change the setup so I can choose between two completely different online exam sites and I am hoping someone can advise on the best way to do this.

Is it possible to have two separate kiosk service files and to be able to choose which one to run or would I need two different Raspbian installs with site-specific kiosk setups, or is there some other option?

TIA
Dr Dubya

User avatar
topguy
Posts: 6527
Joined: Tue Oct 09, 2012 11:46 am
Location: Trondheim, Norway

Re: In need of multiple kiosk-mode setups

Thu Feb 27, 2020 1:37 pm

I would now like to change the setup so I can choose between two completely different online exam sites and I am hoping someone can advise on the best way to do this.
Who will choose ? When will he choose, how often will it change ?

You can quite easily change the startup script to get the URL from another file, the content of the file can be manipulated in many ways.
- You can log in remotely via SSH to modify it.
- You can share the directory so you can edit the file from another computer.
- You can ask on any boot someone to make a choice with keyboard or mouse.
- You can create a local web-server that you can view on a different computer that lets you manipulate the file.

Dr Dubya
Posts: 3
Joined: Thu Feb 27, 2020 12:40 pm

Re: In need of multiple kiosk-mode setups

Fri Feb 28, 2020 1:06 pm

It will be me (or someone else I work with) who chooses which kiosk setup to boot into, it won't be an everyday occurrence, one set up would get used once or twice a month and the other option would get used once every two or three months.

Of the options you've given me the one that seems most suitable is to make the choice at boot up, can you advise how I would set that up please?
Thanks

User avatar
topguy
Posts: 6527
Joined: Tue Oct 09, 2012 11:46 am
Location: Trondheim, Norway

Re: In need of multiple kiosk-mode setups

Fri Feb 28, 2020 1:43 pm

There are probably several ways of doing this..

I would ( because its a method I know ) use the program xdialog ( http://xdialog.free.fr/ ) which allows you to make simple pop-up windows where a user can answer a question or make a selection.

First step would pop up an "InfoBox" with a timeout of 10 seconds, informing that if you want to make a change you have to press the "ok" button before the timer runs out. Then based on the response you either start the kiosk normally or you pop up a second xdialog window where the user can select the preferred site. Then base on the choice there you modify the file containing the URL and then start the kiosk normally.

All this requires a little bit of shell scripting knowledge:
- general knowledge about how to use variables.
- how to read the content of a separate file. ( containing the URL(s) )
- How to store the return value from the xdialog.
- how to test the value and do stuff ( if/then/else )

Dr Dubya
Posts: 3
Joined: Thu Feb 27, 2020 12:40 pm

Re: In need of multiple kiosk-mode setups

Sun Mar 01, 2020 4:42 pm

Thanks for that but I think I'm falling flat at the "All this requires a little bit of shell scripting knowledge" part.

I can follow a tutorial (as I did setting up the site-specific kiosk mode I mentioned previously) but beyond that I really don't know what to do.

Are there any pre-prepared tutorials to show me how to do this?

Return to “General discussion”