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

Having issues with your DietPi installation, or, found a bug? Post it here.
kolaborek
Posts: 19
Joined: Thu Mar 12, 2020 6:19 pm

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

Post by kolaborek »

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.
User avatar
Joulinar
Posts: 2068
Joined: Sat Nov 16, 2019 12:49 am

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

Post by Joulinar »

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
kolaborek
Posts: 19
Joined: Thu Mar 12, 2020 6:19 pm

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

Post by kolaborek »

Hello,

Thank you for your sugesstion.
Your command rotates screen, but ... it looks like in the below picture.
Image

I tried many different combinations, but I don't know how to strech the picture to the monitors resolutions....
User avatar
Joulinar
Posts: 2068
Joined: Sat Nov 16, 2019 12:49 am

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

Post by Joulinar »

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
kolaborek
Posts: 19
Joined: Thu Mar 12, 2020 6:19 pm

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

Post by kolaborek »

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.
User avatar
MichaIng
Site Admin
Posts: 2293
Joined: Sat Nov 18, 2017 6:21 pm

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

Post by MichaIng »

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
kolaborek
Posts: 19
Joined: Thu Mar 12, 2020 6:19 pm

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

Post by kolaborek »

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....)


Image
kolaborek
Posts: 19
Joined: Thu Mar 12, 2020 6:19 pm

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

Post by kolaborek »

Helped changing resolution for chromium in dietpi.txt from
# Chromium
SOFTWARE_CHROMIUM_RES_X=1920
SOFTWARE_CHROMIUM_RES_Y=1080
SOFTWARE_CHROMIUM_AUTOSTART_URL=https://dietpi.com
to
# Chromium
SOFTWARE_CHROMIUM_RES_X=1080
SOFTWARE_CHROMIUM_RES_Y=1920
SOFTWARE_CHROMIUM_AUTOSTART_URL=https://dietpi.com
Now it looks like I wanted :)
Image

But after restart, screen rotate backs to its previous setting. What should I do to make it permanent?
User avatar
MichaIng
Site Admin
Posts: 2293
Joined: Sat Nov 18, 2017 6:21 pm

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

Post by MichaIng »

@kolaborek
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
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.
User avatar
Joulinar
Posts: 2068
Joined: Sat Nov 16, 2019 12:49 am

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

Post by Joulinar »

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
Post Reply