(1 votes, average: 5.00 out of 5, rated)
Loading...

The objective of the following configuration is to create a website kiosk on which it would be impossible to quit chromium and it would not use too many resources.

Essentially, openbox as a minimal window manager is installed, along with chromium and transformed into a service. It is recommended to start with a clean installation of ubuntu-server/debian-server with no desktop environment.

$ sudo apt install –no-install-recommends xorg openbox chromium-browser xserver-xorg-legacy
$ sudo usermod -a -G tty ${USER}

$ sudo nano /etc/X11/Xwrapper.config:

1
2
3
[Unit]
allowed_users=anybody
needs_root_rights=yes

$ sudo nano /etc/systemd/system/x.service:

1
2
3
4
5
6
7
8
9
[Unit]
Description=startx
 
[Service]
User=${USER}
ExecStart=/bin/sh -c "sudo -u test startx /etc/X11/Xsession"
 
[Install]
WantedBy=multi-user.target

$ sudo nano /etc/systemd/system/kiosk.service:

1
2
3
4
5
6
7
8
9
10
11
12
[Unit]
Description=kiosk chromium
After=x.service
 
[Service]
User=${USER}
ExecStart=/bin/sh -c "/usr/bin/chromium-browser --kiosk https://github.com"
Restart=always
Environment=DISPLAY=:0
 
[Install]
WantedBy=multi-user.target

$ sudo systemctl enable x
$ sudo systemctl enable kiosk

Et voila! You now have a fully functional website kiosk.

In case ansible rings a bell for you (it’s an infrastructure automation tool, really awesome, check it out), I’m just going to leave a link to an ansible-galaxy role I’ve created out of the forementioned configuration: https://galaxy.ansible.com/xtrinch/kiosk/

3 Comments

  • Posted July 26, 2017 at 8:32 am | Permalink

    I love your blog.. very nice colors & theme. Did you make this website yourself or
    did you hire someone to do it for you? Plz answer back as I’m looking to create my own blog and would like to find out
    where u got this from. many thanks

    • xtrinch
      Posted July 26, 2017 at 12:44 pm | Permalink

      The link to the wordpress theme is in the footer. I created it myself but feel free to (ab)use it, that’s why I put it on github. 🙂

      Also there’s a different post in which I actually explain in detail how I host this wordpress website: https://trina.si/2017/06/20/deploying-wordpress-with-docker-and-docker-compose/
      It’s deployed on my ‘rented’ cloud hypervisor on one of the virtual machines that live on it. 🙂 For a slightly (okay, severely, once you get deep into it) higher price, wordpress.com will do the hosting just fine for you.

      WordPress is really easy and you can easily get into it yourself without hiring anyone.

  • Posted July 27, 2017 at 12:27 am | Permalink

    Heya i’m for the primary time here. I came across this board and I to
    find It truly useful & it helped me out much. I am hoping to give something again and help others such as you helped me.

Your email is kept private. Required fields are marked *