Change resolution with xrandr works, but cant input in lightdm (wheezy) ?

More
30 Sep 2019 19:15 - 01 Oct 2019 19:39 #146748 by tom-rock
Hi all,

I am using Debian wheezy (parallel port...) and because I have a switch box it doesen´t detect the monitor and I cant get the screen resolution I want (1280x1024).

So I used the xrandr commands to change the resolution manually.

xrandr --newmode "1280x1024_60.00" 109.00 1280 1368 1496 1712 1024 1027 1034 1063 -hsync +vsync
xrandr --addmode VGA1 1280x1024_60.00
xrandr --output VGA1 --mode 1280x1024_60.00

When I type the commands individually in the terminal everything works and I get the resolution.

But now I want to set the resolution automatically and tried to input it in the lightdm.conf at:

display-setup-script=/home/tom-rock/customres.sh

where customres.sh was made with the commands above and gave the rights to execute (-x).

But it doesn´t work and even no gui started.

Does someone know what I am doing wrong or is it easieer to execute the above command via autostart (as a script with shebang ??)
about what I have no idea.

I would be very happy if someone could help me.

Thanks for your interest and help.

Ralf
Last edit: 01 Oct 2019 19:39 by tom-rock.

Please Log in or Create an account to join the conversation.

More
01 Oct 2019 18:41 #146817 by tom-rock
Now I made the script executable with the shebang

#!/bin/bash

and I can start the script with ./customres.sh and it changes the resolution properly.

No I want to run the sript every new boot.

First I tried cron:

sudo crontab -e

and then edit : @reboot sh /home/user/customres.sh

but it does not work.

Then I tried to add it into rc.local with

sh /home/user/customres.sh

but it also did nothing.

I would be very happy if someone has an idea??

Thanks and best wishes

Ralf

Please Log in or Create an account to join the conversation.

More
01 Oct 2019 19:39 #146822 by tom-rock
Hi,

the solution is so simple:

I just put with the gui my script in system/session into the autostart list.

With just a few mouseclicks everything is fine...

Ralf

Please Log in or Create an account to join the conversation.

More
03 Oct 2019 04:59 #146947 by andypugh
Glad you got it working. I was about to suggest creating an Xorg.conf file and doing it the old-fashioned way (which is the only way I have ever figured out how to do it)

Please Log in or Create an account to join the conversation.

Time to create page: 0.122 seconds
Powered by Kunena Forum