Page 1 of 3

Cannot start FullScreen mode using dietpi-autostart/custom.sh file

Posted: Thu Mar 12, 2020 6:29 pm
by kolaborek
Hello,
I edited /var/lib/dietpi/dietpi-autostart/custom.sh file by adding line below:
xinit '/usr/bin/surf' -F 'https://google.com'

Legend:
  • surf is lightweight browser
  • -F option for surf should open browser in FullScreen mode.

Page is opening in browser but only on the 1/4 of the screen (I have FullHD monitor).

Any idea what should I change to make it working on all screen area and is it possible to rotate the screen? I must do kiosk with simple, static webpage.

Best Regards

Re: Cannot start FullScreen mode using dietpi-autostart/custom.sh file

Posted: Thu Mar 12, 2020 7:00 pm
by Joulinar
Hi,

Is there a reason why you did not use Chromium? Its offered by DietPi and easy to run in Kiosk mode.

Re: Cannot start FullScreen mode using dietpi-autostart/custom.sh file

Posted: Thu Mar 12, 2020 9:12 pm
by kolaborek
I have BANANA PI BPI-M1 SINOVOIP with A20 ARM Dual-Core (1GHz).
When I run chromium, it takes about ~12% of CPU Time and ~12% of RAM. The same page opened in surf takes only 1,3% of CPU and 5,8% of RAM.
That is why I try to use surf. It is much smaller, but with my SBC and webpage which I want to display, it is very good.

BTW. Chromium also did not open on full screen. Its open webpage in little wider window, but it is still about 1/4 of screen.

Re: Cannot start FullScreen mode using dietpi-autostart/custom.sh file

Posted: Fri Mar 13, 2020 1:30 pm
by Joulinar
basically if you like to use chromium, you would need to activate chromium resolution settings in dietpi.txt

Code: Select all

# Chromium
SOFTWARE_CHROMIUM_RES_X=1920
SOFTWARE_CHROMIUM_RES_Y=1080
SOFTWARE_CHROMIUM_AUTOSTART_URL=https://dietpi.com

Re: Cannot start FullScreen mode using dietpi-autostart/custom.sh file

Posted: Fri Mar 13, 2020 9:32 pm
by kolaborek
I think I'll use chromium. I don't have enough knowlege to switch it to surf browser.
But maybe you'll know if DietPi can rotate screen 90* clockwise?

Re: Cannot start FullScreen mode using dietpi-autostart/custom.sh file

Posted: Fri Mar 13, 2020 9:38 pm
by Joulinar
yup, you can rotate your screen
  1. run dietpi-config
  2. 1 : Display Options
  3. 4 : Rotation (HDMI)
there you can rotate

Re: Cannot start FullScreen mode using dietpi-autostart/custom.sh file

Posted: Fri Mar 13, 2020 9:57 pm
by kolaborek
I searched in dietpi-config and can't find it. But after your post I checked once again and indeed don't have it.
In Display Options i have:
1: Display Resolution,
2: GPU/RAM Memory Split,
3: LCD Panel addon: [none],
16: Display Brightness,
17: X.Org DPI: [96]
14: Led Control

There is not option nr 4. Maybe it's because my board?

Re: Cannot start FullScreen mode using dietpi-autostart/custom.sh file

Posted: Fri Mar 13, 2020 10:47 pm
by Joulinar
yep indeed this is depending on your board. but I found this one one the web

https://bananapi.gitbooks.io/bpi-m3/con ... creen.html

this might be the file to adjust for the xserver

Code: Select all

/etc/X11/xorg.conf.d/99-dietpi-dpms_off.conf
Probably you can create an additional file to add the command to rotate

Code: Select all

/etc/X11/xorg.conf.d/01-rotate-screen.conf

Unfortunately I'm not able to test as I didn't have such a board.

Re: Cannot start FullScreen mode using dietpi-autostart/custom.sh file

Posted: Sat Mar 14, 2020 8:59 pm
by kolaborek
EDIT:

Ok. I found that xrandr can generate scripts to rotate screen. I copied command from that script to custom.sh file.
Now file looks like below, but xinit start and display console.... xrandr and browser don't run. What should I do to make commands to run one after the other?
xinit
xrandr --output HDMI-1 --primary --mode 1920x1080 --pos 0x0 --rotate left
'/usr/bin/surf' -F 'http://dietpi.com'
END of EDIT
----------------------------------------------------------------------------------
I put below lines:
Section "Device"
Identifier "Raspberry Pi FBDEV"
Driver "fbturbo"
Option "fbdev" "/dev/fb0"
Option "SwapbuffersWait" "true"
Option "rotate" "cw"
EndSection
into file /etc/X11/xorg.conf.d/99-dietpi-dpms_off.conf and tried with new file named /etc/X11/xorg.conf.d/01-rotate-screen.conf. Unfortunatelly without success.

Maybe logs tell you something?
Lat 50 messages from /var/log/Xorg.0.log are:
[ 53.704] (WW) The directory "/usr/share/fonts/X11/cyrillic" does not exist.
[ 53.704] Entry deleted from font path.
[ 53.704] (WW) The directory "/usr/share/fonts/X11/100dpi/" does not exist.
[ 53.704] Entry deleted from font path.
[ 53.704] (WW) The directory "/usr/share/fonts/X11/75dpi/" does not exist.
[ 53.704] Entry deleted from font path.
[ 53.704] (WW) The directory "/usr/share/fonts/X11/Type1" does not exist.
[ 53.704] Entry deleted from font path.
[ 53.704] (WW) The directory "/usr/share/fonts/X11/100dpi" does not exist.
[ 53.704] Entry deleted from font path.
[ 53.704] (WW) The directory "/usr/share/fonts/X11/75dpi" does not exist.
[ 53.704] Entry deleted from font path.
[ 53.704] (==) FontPath set to:
/usr/share/fonts/X11/misc,
built-ins
[ 53.704] (==) ModulePath set to "/usr/lib/xorg/modules"
[ 53.704] (II) The server relies on udev to provide the list of input devices.
If no devices become available, reconfigure udev or disable AutoAddDevices.
[ 53.704] (II) Loader magic: 0x647f98
[ 53.704] (II) Module ABI versions:
[ 53.704] X.Org ANSI C Emulation: 0.4
[ 53.704] X.Org Video Driver: 24.0
[ 53.704] X.Org XInput driver : 24.1
[ 53.704] X.Org Server Extension : 10.0
[ 53.708] (--) using VT number 2

[ 53.708] (II) systemd-logind: logind integration requires -keeptty and -keeptty was not provided, disabling logind integration
[ 53.713] (II) xfree86: Adding drm device (/dev/dri/card0)
[ 53.719] (II) xfree86: Adding drm device (/dev/dri/card1)
[ 53.720] (II) no primary bus or device found
[ 53.720] falling back to /sys/devices/platform/display-engine/drm/card0
[ 53.720] (II) LoadModule: "glx"
[ 53.723] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so
[ 53.798] (II) Module glx: vendor="X.Org Foundation"
[ 53.798] compiled for 1.20.4, module version = 1.0.0
[ 53.798] ABI class: X.Org Server Extension, version 10.0
[ 53.798] (II) LoadModule: "fbturbo"
[ 53.800] (WW) Warning, couldn't open module fbturbo
[ 53.801] (EE) Failed to load module "fbturbo" (module does not exist, 0)
[ 53.801] (EE) No drivers available.
[ 53.801] (EE)
Fatal server error:
[ 53.801] (EE) no screens found(EE)
[ 53.801] (EE)
Please consult the The X.Org Foundation support
at http://wiki.x.org
for help.
[ 53.802] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
[ 53.802] (EE)
[ 53.802] (EE) Server terminated with error (1). Closing log file.
Rotate screen must be possible because when LXDE is launched I can rotate screen with xrandr. Just don't know how to do it without LXDE.

Re: Cannot start FullScreen mode using dietpi-autostart/custom.sh file

Posted: Sat Mar 14, 2020 10:26 pm
by Joulinar
how does it behave if you execute xrandr once chromium was started? so open a SSH session after browser start and do:

Code: Select all

DISPLAY=:0 xrandr --output HDMI-1 --rotate left