Difference between revisions of "Web Kiosk CentOS 7"

From Michael's Information Zone
Jump to navigation Jump to search
Line 10: Line 10:
 
This is connected to the wifi since there is no ethernet installed behind the TV. But since the site is on the unit I can live with broken connections. A simple script later on should take care of this.
 
This is connected to the wifi since there is no ethernet installed behind the TV. But since the site is on the unit I can live with broken connections. A simple script later on should take care of this.
 
==Setup==
 
==Setup==
 +
===Packages===
 
A fresh install of CentOS 7, and the usual basics.
 
A fresh install of CentOS 7, and the usual basics.
 
<pre>
 
<pre>
Line 18: Line 19:
 
yum -y group install Xfce
 
yum -y group install Xfce
 
</pre>
 
</pre>
 +
===TTY1 Autologin===
 
Now create the auto-login process.
 
Now create the auto-login process.
 
<pre>
 
<pre>
Line 43: Line 45:
 
</pre>
 
</pre>
 
After the reboot, you should see the desktop start up. If it does not troubleshoot.
 
After the reboot, you should see the desktop start up. If it does not troubleshoot.
 +
===Configure Chromium Auto-start===
 +
<ref>https://www.danpurdy.co.uk/web-development/raspberry-pi-kiosk-screen-tutorial/</ref>

Revision as of 09:45, 12 July 2018

Purpose

Powers that be wanted a TV mounted in a lobby, with content playing on it for visitors to ignore. At first I was told to install a flash drive and play images with the flush mount TV. Instead I thought it would be a good idea to have a NUC installed behind the TV running a web browser in full screen mode, displaying a WordPress site that my boss could manage (He really likes wordpress).

Hardware

Intel BOXNUC6CAYH -2GB DDR3 RAM (I had laying around, should be enough to display a single web page and run the background tasks) -Intel(R) Celeron(R) CPU J3455 @ 1.50GHz (Came with the NUC. Just enough to display a web page and run WordPress) -KingDian S100 16GB SSD (This was dirt cheap, and will probably die with the lack of RAM installed.)

This is connected to the wifi since there is no ethernet installed behind the TV. But since the site is on the unit I can live with broken connections. A simple script later on should take care of this.

Setup

Packages

A fresh install of CentOS 7, and the usual basics.

yum -y update
yum -y install epel-release
yum makecache
yum -y install htop nano xorg-x11-server-Xorg smartmontools chromium
yum -y group install Xfce

TTY1 Autologin

Now create the auto-login process.

useradd publicuser
rm /etc/systemd/system/getty.target.wants/getty@tty1.service
cp /lib/systemd/system/getty@.service /etc/systemd/system/getty@tty1.service
sed -i -e "s/\/sbin\/agetty/\0 --autologin publicuser/" /etc/systemd/system/getty@tty1.service
ln -s /etc/systemd/system/getty@tty1.service /etc/systemd/system/getty.target.wants/getty@tty1.service

cat << EOF >>/home/publicuser/.bash_profile
if [[ -z \$DISPLAY ]] && [[ \$(tty) = /dev/tty1 ]]; then # Check if we have a display and we're on TTY1
startx
else
echo "Please contact the help desk and provide the following"
echo "IP : "
echo "Hostname : $hostname"
fi
EOF

cat << EOF>>/hom/publicuser/.xinitrc
exec startxfce4
EOF

reboot

After the reboot, you should see the desktop start up. If it does not troubleshoot.

Configure Chromium Auto-start

[1]