I do not run xrandr when chromium was started. I move back and change autostart option to 16:LightDM login mask.
Then I play around with xrandr and generate script with command which I want to run from custom.sh file.
Cannot start FullScreen mode using dietpi-autostart/custom.sh file Topic is solved
Re: Cannot start FullScreen mode using dietpi-autostart/custom.sh file
try to run chromium on autostart. once started, open a SSH session and execute the following
Code: Select all
DISPLAY=:0 xrandr --output HDMI-1 --rotate left
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Re: Cannot start FullScreen mode using dietpi-autostart/custom.sh file
Hello,
Thank you for your sugesstion.
Your command rotates screen, but ... it looks like in the below picture.

I tried many different combinations, but I don't know how to strech the picture to the monitors resolutions....
Thank you for your sugesstion.
Your command rotates screen, but ... it looks like in the below picture.
I tried many different combinations, but I don't know how to strech the picture to the monitors resolutions....
Re: Cannot start FullScreen mode using dietpi-autostart/custom.sh file
which browser you are using now?
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Re: Cannot start FullScreen mode using dietpi-autostart/custom.sh file
This is chromium. When screen is not rotated, everything is ok - it covers all screen area. But when I rotate it to left it looks like in the picture.
Maybe changing resolution from 1920x1080 to 1080x1920 could help? But when I tried to run xrandr with -mode 1080x1920 I got error that there is no such mode.
Maybe changing resolution from 1920x1080 to 1080x1920 could help? But when I tried to run xrandr with -mode 1080x1920 I got error that there is no such mode.
Re: Cannot start FullScreen mode using dietpi-autostart/custom.sh file
Did you already try to switch the dietpi.txt Chromium resolution settings?
Code: Select all
SOFTWARE_CHROMIUM_RES_X=1080
SOFTWARE_CHROMIUM_RES_Y=1920
Re: Cannot start FullScreen mode using dietpi-autostart/custom.sh file
Yes, I set it up, and before rotating it looks ok (look at screenshot below).
But when I rotate screen it looks like it rotates without changing resolution from 1920x1080 to 1080x1920 (I think....)

But when I rotate screen it looks like it rotates without changing resolution from 1920x1080 to 1080x1920 (I think....)
Re: Cannot start FullScreen mode using dietpi-autostart/custom.sh file
Helped changing resolution for chromium in dietpi.txt from


But after restart, screen rotate backs to its previous setting. What should I do to make it permanent?
to# Chromium
SOFTWARE_CHROMIUM_RES_X=1920
SOFTWARE_CHROMIUM_RES_Y=1080
SOFTWARE_CHROMIUM_AUTOSTART_URL=https://dietpi.com
Now it looks like I wanted# Chromium
SOFTWARE_CHROMIUM_RES_X=1080
SOFTWARE_CHROMIUM_RES_Y=1920
SOFTWARE_CHROMIUM_AUTOSTART_URL=https://dietpi.com

But after restart, screen rotate backs to its previous setting. What should I do to make it permanent?
Re: Cannot start FullScreen mode using dietpi-autostart/custom.sh file
@kolaborek
You used DISPLAY=:0 xrandr --output HDMI-1 --rotate left besides the resolution switch, right?
This does the rotation at the end of boot, right before login/Chromium autostart. Should be what you need, but if it should be done on earlier boot stage, a dedicated systemd unit would be required.
You used DISPLAY=:0 xrandr --output HDMI-1 --rotate left besides the resolution switch, right?
Code: Select all
echo -e '#!/bin/dash\nDISPLAY=:0 xrandr --output HDMI-1 --rotate left' > /var/lib/dietpi/postboot.d/rotate_screen.sh
Re: Cannot start FullScreen mode using dietpi-autostart/custom.sh file
yep xrandr is going to rotate screen juts for current session. It's not a permanent rotation. So would need to be done right after boot as indicated by @MichaIng
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team