[ lsmod | wc -l -lt 3 ] && { dunstify -u critical -i /usr/share/icons/oxygen/48x48/status/dialog-warning.png "Kernel version: uname -r does not match the modules version: ls /lib/modules/ | tr '\n' ' '\nPerhaps the system was booted from usb stick while older kiosk installation exist on the hard drive.\nTo force booting from removable device please install the system with following parameter added to kiosk config: 'kernel_parameters=boot_from_usb'."; sleep 60; init 0; }
Load snd-usb-audio so USB audio devices are always on the last sound card slot:
modprobe snd-usb-audio
Start battery polling:
battery=ls -1 /sys/class/power_supply/*/capacity 2>/dev/null | head -n1 | cut -d/ -f5
[ "battery" ] && sh /opt/scripts/battery_polling battery &
Disable input devices or configure them:
#disable_input=yes
if [ "line 2>/dev/null; done
else
# Set keyboard mapping:
setxkbmap -layout us,lay2 -variant ,var2 2>/dev/null
We are in the GUI - this is good, lets keep the PC running infinitely. Network issues can be resolved by 'run_command=':
[ -e /dev/watchdog ] && /usr/sbin/wd_keepalive
Launch first-run wizard:
[ -e /opt/scripts/first-run ] && su -c /opt/scripts/first-run
Wait on network connection before proceeding (skip gateway check for dialup connections):
GTW=route -n | grep -c " UG "; [ route -n | grep -c -w ppp0 = 1 ] && GTW=1
if [ GTW−lt1];thenSLEEP=120while[GTW -lt 1 -a SLEEP−gt0];do[SLEEP = 60 ] && sh /etc/rc.d/rc.inet1; sleep 1; let SLEEP=SLEEP-1; GTW=route -n | grep -c " UG "; done
fi
[ "GTW" -lt 1 ] && dunstify -u normal -i PTH/status/dialog-warning.png "Gateway is not set - network may be not available."
Pull time from NTP server and set hardware clock to system time:
( while true; do ntpdate pool.ntp.org && hwclock --utc -w; sleep 24h; done; ) &
Setup proxy auto configuration:
#proxypac=
if [ "proxypac"];thenpkgetproxypac /opt/scripts/proxy.pac
# Default to first IP in case multiple proxies are returned:
proxy=pactester -p /opt/scripts/proxy.pac -u http://porteus-kiosk.org 2>/dev/null | tr -s ' ' | cut -d" " -f2 | sed 's/[^0-9a-zA-Z.:]*//g'
[ -n "proxy"−a"proxy" != DIRECT ] && sed -i 's_^proxy=DIRECT_proxy='$proxy'_g' /etc/profile.d/proxy.sh
. /etc/profile.d/proxy.sh
fi
Perform kiosk auto reconfiguration:
[ -e /opt/scripts/update-config ] && su -c /opt/scripts/update-config
Perform kiosk auto update (paid subscription is required):
[ -e /opt/scripts/update ] && su -c /opt/scripts/update
It is mentioned inside variables.sh as autostart that looks like this:
export
autostart=/etc/xdg/openbox/autostart
scripts=/opt/scripts
profile=/home/guest/.mozilla/firefox/c3pp43bg.default
pprofile=/opt/scripts/guest/.mozilla/firefox/c3pp43bg.default
json=/etc/opt/chrome/policies/managed/chrome.json
chflags=/opt/google/chrome/chrome-flags.conf
DISPLAY=:0
Currently when I boot up, it opens Google Chrome fullscreen with Skype Online.
I want to change it to open skypeforlinux instead of chrome. It (not in this version I've pasted, but in my other try) does so, but when I start a call in Skype, it freezes. I think it's pretty similar as it was allowing only one activity, and forces it to the foreground. But I'd only need to open the Skype app, then make if fullscreen, and allow anything
To change the default application from Chrome with Skype Online to the Skype for Linux application, you will need to modify the startup script to launch the skypeforlinux executable instead of Chrome. However, there are a few things to consider to ensure that your environment will support the skypeforlinux and it will work as expected.
Here are some steps to guide you through the process:
Install skypeforlinux: If it's not already installed on your Linux distribution, you will need to install it. You can usually find Skype in the package manager of your distribution or download it from the official website. For example, on Ubuntu-based distributions, you can install it with:
sudo apt update
sudo apt install skypeforlinux
Find the Executable Path: Determine the full path to the skypeforlinux executable. You can typically do this by running which skypeforlinux in your terminal:
which skypeforlinux
Modify the autostart Script: In the existing autostart script that you have shared, you'll need to locate the section that launches Chrome and replace it with the command to start skypeforlinux.
If the script explicitly starts Chrome, you would replace the relevant line(s) with something like the following command:
/usr/bin/skypeforlinux --fullscreen
Note: Replace /usr/bin/skypeforlinux with the actual path to your skypeforlinux executable as found in the previous step. The --fullscreen flag is an example; you need to check if Skype for Linux supports such a flag or an alternative method to start it in fullscreen mode.
Testing: After making changes and saving your autostart script, you should test if the machine correctly starts skypeforlinux. Reboot your Linux distribution and observe if the changes took effect correctly.
Debugging: If the Skype application freezes upon starting a call, you may be encountering issues with your system's hardware acceleration, audio, or other configurations that may impact Skype performance. Check the system logs and Skype logs for relevant error messages. The command dmesg and files in /var/log/ may contain pertinent info.
Ensure Compatibility: Some Linux kiosk solutions like Porteus Kiosk are highly customized and designed with certain assumptions about how applications are launched and managed. Verify that launching an interactive application like Skype is supported and that necessary system libraries and configurations don't restrict the Skype application.
Remember that the script you posted seems to be part of a kiosk system (Porteus Kiosk mentioned in the comment), which may have additional constraints meant to restrict the user's actions to provide a secure environment. Therefore, reconfiguring it to launch another application might require you to understand and work around those constraints, including potential adjustments in permissions, user sessions, and system services.