Difference between revisions of "Lobby TV Display Computer"
Jump to navigation
Jump to search
Michael.mast (talk | contribs) |
Michael.mast (talk | contribs) |
||
(7 intermediate revisions by the same user not shown) | |||
Line 7: | Line 7: | ||
===CentOS 9 Stream=== | ===CentOS 9 Stream=== | ||
<b>NOTE : </b>This is still in testing.<br> | <b>NOTE : </b>This is still in testing.<br> | ||
− | <b>NOTE : </b>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.<ref>https://www.linuxcapable.com/how-to-install-google-chrome-on-centos-9-stream/</ref> | + | <b>NOTE : </b>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. |
+ | *centos-stream-release-9.0-12.el9 | ||
+ | <ref>https://www.linuxcapable.com/how-to-install-google-chrome-on-centos-9-stream/</ref> | ||
+ | *There was some new methods for getty, will need to create another post on this<ref>https://wiki.archlinux.org/title/getty</ref> | ||
<br> | <br> | ||
*Minimal install of CentOS 9 Stream | *Minimal install of CentOS 9 Stream | ||
Line 16: | Line 19: | ||
dnf install -y epel-release | dnf install -y epel-release | ||
dnf makecache | dnf makecache | ||
− | dnf install -y wget tar | + | dnf install -y wget tar NetworkManager-wifi |
rpm --import https://dl.google.com/linux/linux_signing_key.pub | 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 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 | + | dnf install -y openbox xorg-x11-drv-libinput xorg-x11-server-utils xorg-x11-xinit libev |
wget -O unclutter.tar.zst --content-disposition --max-redirect=5 https://www.archlinux.org/packages/community/x86_64/unclutter/download/ | 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 | zstd -d unclutter.tar.zst -o unclutter.tar | ||
Line 25: | Line 28: | ||
mv usr/bin/unclutter /usr/bin/unclutter | mv usr/bin/unclutter /usr/bin/unclutter | ||
useradd publicuser | useradd publicuser | ||
+ | mkdir -p /etc/systemd/system/getty\@tty1.service.d/ | ||
+ | cat << EOF > /etc/systemd/system/getty\@tty1.service.d/autologin.conf | ||
+ | [Service] | ||
+ | ExecStart= | ||
+ | ExecStart=-/sbin/agetty -o '-p -f -- \\u' --noclear --autologin publicuser - $TERM | ||
+ | EOF | ||
+ | |||
rm -f /etc/systemd/system/getty.target.wants/getty@tty1.service | rm -f /etc/systemd/system/getty.target.wants/getty@tty1.service | ||
cp /lib/systemd/system/getty@.service /etc/systemd/system/getty@tty1.service | cp /lib/systemd/system/getty@.service /etc/systemd/system/getty@tty1.service | ||
Line 48: | Line 58: | ||
su publicuser -c 'cat << EOF > /home/publicuser/.config/openbox/autostart | su publicuser -c 'cat << EOF > /home/publicuser/.config/openbox/autostart | ||
/usr/bin/xset -dpms s off s noblank & | /usr/bin/xset -dpms s off s noblank & | ||
− | /usr/bin/ | + | /usr/bin/google-chrome-stable --user-data-dir=/home/publicuser --noerrdialogs --kiosk https://your.site.com/location/ & |
/usr/bin/unclutter & | /usr/bin/unclutter & | ||
EOF' | EOF' | ||
Line 56: | Line 66: | ||
su publicuser -c 'cat << EOF > /home/publicuser/restart.sh | su publicuser -c 'cat << EOF > /home/publicuser/restart.sh | ||
#!/bin/bash | #!/bin/bash | ||
− | killall | + | killall google-chrome-stable |
sleep 1 | sleep 1 | ||
− | /usr/bin/ | + | /usr/bin/google-chrome-stable --user-data-dir=/home/publicuser --noerrdialogs --kiosk https://your.site.com/location/ & |
EOF' | EOF' | ||
chmod u+x /home/publicuser/restart.sh | chmod u+x /home/publicuser/restart.sh | ||
+ | </pre> | ||
+ | ====Wifi==== | ||
+ | <ref>https://wiki.archlinux.org/title/wpa_supplicant</ref> | ||
+ | <pre> | ||
+ | cat << EOF >/etc/wpa_supplicant/wpa_supplicant.conf | ||
+ | ctrl_interface=/run/wpa_supplicant | ||
+ | update_config=1 | ||
+ | EOF | ||
+ | |||
+ | wpa_supplicant -B -i wlp2s0 -c /etc/wpa_supplicant/wpa_supplicant.conf | ||
+ | |||
</pre> | </pre> |
Latest revision as of 09:30, 13 June 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.
- centos-stream-release-9.0-12.el9
- There was some new methods for getty, will need to create another post on this[2]
- 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 NetworkManager-wifi 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 libev 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 mkdir -p /etc/systemd/system/getty\@tty1.service.d/ cat << EOF > /etc/systemd/system/getty\@tty1.service.d/autologin.conf [Service] ExecStart= ExecStart=-/sbin/agetty -o '-p -f -- \\u' --noclear --autologin publicuser - $TERM EOF 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/google-chrome-stable --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 google-chrome-stable sleep 1 /usr/bin/google-chrome-stable --user-data-dir=/home/publicuser --noerrdialogs --kiosk https://your.site.com/location/ & EOF' chmod u+x /home/publicuser/restart.sh
Wifi
cat << EOF >/etc/wpa_supplicant/wpa_supplicant.conf ctrl_interface=/run/wpa_supplicant update_config=1 EOF wpa_supplicant -B -i wlp2s0 -c /etc/wpa_supplicant/wpa_supplicant.conf