Hey Stephane,
I find this important and I also had the idea already. There is not reason to waste space on the display, especially when the content is a web page and has to be scrolled anyway.
By the way, have you tried to rotate the display by 90° in order to use the monitor in portrait orientation instead of landscape orientation, as the MASSO G3 Touch does? Also pressing Ctrl-minus and Ctrl-plus at least on my remote browser can adjust the size of the web page so that the Jog pane and the positions and offsets table finally fit on the display.
But at the moment I don’t have the machine assembled and the controller runs, but only without the machine and over Ethernet, I have no monitor attached to it because of limited space problems as it is in my electronics lab. So I would only be able to test that if I managed to…
…okay here’s what I did:
Test 1: Calling ‘chromium-browser’ with ‘–start-fullscreen’ manually from command line
(as user ‘pi’)
As I don’t know the passwd for user ‘pi’, I set it to ‘raspberry’:
Log in via ssh on host onefinity.local as user ‘bbmc’ with password ‘onefinity’.
ssh bbmc@onefinity
Then as user bbmc, I do
sudo -i
Now I am root. As root I do:
passwd pi
and set a new password for user ‘pi’. Then I exit completely from the ssh, and then I re-open it with X forwarding enabled (see ‘man ssh
’ to read the man page):
ssh -X pi@onefinity.local
Then I am user pi@onefinity. As the user who runs the chromium-browser and the X display, I kill all that:
killall startx
I check with
ps -ef --forest | less
that there is no X display process running anymore (and subsequently, no chromium-browser).
Then I do
chromium-browser --start-fullscreen http://localhost/
This works, chromium-browser starts in full-screen mode, I get this (on my remote computer):
It also displays a popup saying “Press F11 to exit fullscreen mode” for a few seconds.
Test 2: Modifying the global chromium-browser config file:
Okay, now I will edit the config file /etc/chromium-browser/default
as explained above. For editing files under /etc, I need to be root. So I do:
sudo -i
Now I am root. As root I do:
cp -ai /etc/chromium-browser/default /etc/chromium-browser/default_orig
for backing up my file, and then I edit the file (e.g. with ‘nano’) and modify the line
CHROMIUM_FLAGS=""
to this:
CHROMIUM_FLAGS="--start-fullscreen"`
(or by applying the diff file default.diff in the previous posting with ‘patch’)
Then I exit the root shell…
exit
until I am user ‘pi’ again, and (still logged in as user pi@onefinity, remotely over a ssh with X forwarding enabled), I do:
chromium-browser http://localhost/
Okay this works too. The browser starts in full-screen mode.
See screenhot above.
But why doesn’t it work on your try? Have you made a typo somewhere?
Note that is a global variable that will affect all instances of chromium-browser, with no respect to the user that calls it. That may not be desirable, so now test no. 3:
Test 3: Modifying the bootup autostart call of chromium-browser for user ‘pi’:
Next thing I will do is to change the call where chromium is started as user ‘pi’. The X display is auto-started after boot with ‘startx’ as user ‘pi’ from the global file /etc/rc.local
.
Then the browser is auto-started as user ‘pi’ from /home/pi/.xinitrc
:
hostinfo.sh &
ratpoison &
xset -dpms
xset s off
xset s noblank
while true; do
tvservice -s 2>&1 | grep "state 0x40001" >/dev/null
if [ $? -ne 0 ]; then
# Clear browser errors
PREFS='/home/pi/.config/chromium/Default/Preferences'
sed -i 's/"exited_cleanly":false/"exited_cleanly":true/' $PREFS
sed -i 's/"exit_type":"Crashed"/"exit_type":"Normal"/' $PREFS
xrdb /home/pi/.Xresources
# Start browser
/usr/local/bin/browser --no-first-run --disable-infobars \
--noerrdialogs --disable-3d-apis http://localhost/
fi
sleep 1
done
So you could add your ‘–start-fullscreen’ option to the ‘/usr/local/bin/browser’ call in /home/pi/.xinitrc.
Backing up the original file…
cp -ai .xinitrc .xinitrc_orig
Applying the patch (or manually adding the ‘–start-fullscreen’ option, e.g. with the command ‘nano .xinitrc’ ):
.xinitrc.diff
--- .xinitrc_orig 2021-05-24 19:24:48.139999053 +0200
+++ .xinitrc 2023-11-26 02:29:35.549773119 +0100
@@ -18,7 +18,7 @@
# Start browser
/usr/local/bin/browser --no-first-run --disable-infobars \
- --noerrdialogs --disable-3d-apis http://localhost/
+ --noerrdialogs --disable-3d-apis --start-fullscreen http://localhost/
fi
sleep 1
This solution will start the chromium-browser in fullscreen mode on bootup for user ‘pi’ (that is the user that runs the Onefinity CNC User Interface in a monitor directly connected to the Onefinity Controller, in a chromium web browser). This will not affect the User Interface if it is opened in the web browser of a remote computer.
As I don’t have a monitor on my controller, I cannot test it. Maybe someone else could test this. I can still change from an X-less runlevel back to a X runlevel to restart the X display client (which will subsequently autostart the chromium-browser), but I cannot see whether or not the chromium-browser started in fullscreen mode or not.
EDIT: Confirmed that it works by @stleroux and @SurfinGump (see below)