Project progress work #623 ยป Resolve exit chromium fullscreen mode in Ras pi.txt
| 1 |
Resolve exit fullscreen on Ras pi |
|---|---|
| 2 |
|
| 3 |
1. Check current desktop |
| 4 |
|
| 5 |
echo $XDG_SESSION_TYPE |
| 6 |
wayland << it is |
| 7 |
|
| 8 |
2. Change desktop to X11 |
| 9 |
sudo raspi-config |
| 10 |
choose Advanced Options > Wayland > X11 |
| 11 |
|
| 12 |
reboot |
| 13 |
|
| 14 |
3. Recheck the desktop, it should be x11 |
| 15 |
|
| 16 |
echo $XDG_SESSION_TYPE |
| 17 |
x11 |
| 18 |
|
| 19 |
|
| 20 |
4. Install wmctrl |
| 21 |
|
| 22 |
apt update |
| 23 |
apt install wmctrl |
| 24 |
|
| 25 |
5. Create shell script name set_chromium_fs.sh with below script |
| 26 |
|
| 27 |
|
| 28 |
#!/bin/bash |
| 29 |
|
| 30 |
sec=$1 |
| 31 |
|
| 32 |
while :; do |
| 33 |
wmctrl -r "Chromium" -b add,fullscreen |
| 34 |
sleep $sec |
| 35 |
done |
| 36 |
|
| 37 |
6. Permit execution mode to above file |
| 38 |
|
| 39 |
chmod +x set_chromium_fs.sh |
| 40 |
|
| 41 |
|
| 42 |
|
| 43 |
7. Call this script at startup boot |
| 44 |
|
| 45 |
For example : try set full screen of chromium every 30 second |
| 46 |
|
| 47 |
/home/pi/set_chromium_fs.sh 30 & |
| 48 |
|
| 49 |
|