W
W
wunix2021-03-22 19:44:28
Debian
wunix, 2021-03-22 19:44:28

Problems with script autorun in debian. What is the problem?

Recently installed debian 10 on a new PC. The problem was that when starting debian, it changed the screen resolution to one that is not supported by my monitor. I found such a utility as xrandr, connected the PC to the TV via hdmi and changed the resolution to 1920x1080 60 and everything seemed to work, but when I rebooted the PC the resolution was again reset to unsupported. Manipulating the TV is certainly cool, but I didn’t really want to do this every time)))
Then I searched the Internet and found such a thing as rc.local (which, by the way, was fixed, I don’t know why)
I had to create these services and so on and so forth. Having survived many errors and hours of fixing rc.local, I managed to start rc.local manually,
that is:/etc/rc.local start
and lo and behold!!! rc.local worked and was able to change the screen resolution (for the test, I first set the resolution to 1280 x 720, and rc.local was able to change me to 1920x1080)
BUT:
If you try to enter sudo systemctl status rc-local the script does not work and says that Can't open display. I don't know what to do anymore.
help

Answer the question

In order to leave comments, you need to log in

2 answer(s)
X
xibir, 2021-03-22
@wunix

https://qna.habr.com/answer?answer_id=1803633

W
wunix, 2021-03-22
@wunix

The contents of rc.local were no different, only

#! ну тут бин баш 
xrandr --newmode ...
xrandr --addmode ...
xrandr --output ...
exit 0

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question