Difference between revisions of "Lobby TV Display Computer"
Jump to navigation
Jump to search
Michael.mast (talk | contribs) |
Michael.mast (talk | contribs) |
||
Line 50: | Line 50: | ||
/usr/bin/chromium-browser --user-data-dir=/home/publicuser --noerrdialogs --kiosk https://your.site.com/location/ & | /usr/bin/chromium-browser --user-data-dir=/home/publicuser --noerrdialogs --kiosk https://your.site.com/location/ & | ||
/usr/bin/unclutter & | /usr/bin/unclutter & | ||
+ | EOF' | ||
+ | |||
+ | echo '@hourly DISPLAY=:0 /home/publicuser/restart.sh' >> /var/spool/cron/publicuser | ||
+ | |||
+ | su publicuser -c 'cat << EOF > /home/publicuser/restart.sh | ||
+ | #!/bin/bash | ||
+ | killall chromium-browser | ||
+ | sleep 1 | ||
+ | /usr/bin/chromium-browser --user-data-dir=/home/publicuser --noerrdialogs --kiosk https://your.site.com/location/ & | ||
EOF' | EOF' | ||
</pre> | </pre> |
Revision as of 12:51, 18 May 2022
Purpose
To display content on a lobby TV.
General Process
Computer connects to a website using a browser in full screen mode, the website manages the content and redirects if needed. The PC should never need to be touched.
PC Config
- Networking : Use wired connectivity where possible. WiFi instructions per OS provided below where applicable.
CentOS 9 Stream
NOTE : This is still in testing.
NOTE : Chromium is not in the repos for CentOS Stream. The computer I am using is very slow and I don't feel like compiling. Will use Chrome instead.[1]
- Minimal install of CentOS 9 Stream
- Dump of commands, could be used for a script. Change the URL to match your environment.
url='https://your.site.com/location/' dnf -y update dnf install -y epel-release dnf makecache dnf install -y wget tar rpm --import https://dl.google.com/linux/linux_signing_key.pub dnf install -y https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm dnf install -y openbox xorg-x11-drv-libinput xorg-x11-server-utils xorg-x11-xinit wget -O unclutter.tar.zst --content-disposition --max-redirect=5 https://www.archlinux.org/packages/community/x86_64/unclutter/download/ zstd -d unclutter.tar.zst -o unclutter.tar tar -xf unclutter.tar mv usr/bin/unclutter /usr/bin/unclutter useradd publicuser rm -f /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>>/home/publicuser/.xinitrc exec openbox-session EOF su publicuser -c 'mkdir -p /home/publicuser/.config/openbox' su publicuser -c 'cat << EOF > /home/publicuser/.config/openbox/autostart /usr/bin/xset -dpms s off s noblank & /usr/bin/chromium-browser --user-data-dir=/home/publicuser --noerrdialogs --kiosk https://your.site.com/location/ & /usr/bin/unclutter & EOF' echo '@hourly DISPLAY=:0 /home/publicuser/restart.sh' >> /var/spool/cron/publicuser su publicuser -c 'cat << EOF > /home/publicuser/restart.sh #!/bin/bash killall chromium-browser sleep 1 /usr/bin/chromium-browser --user-data-dir=/home/publicuser --noerrdialogs --kiosk https://your.site.com/location/ & EOF'