I already checked several tutorials, but I can't run my script when starting the operating system. I already put the file in /etc/init.d , /boot, /bin, /urs/bin . I think I already put it in every possible place. here's my code.
#!/bin/bash
echo "Starting command to put resolution on 1920x1080"
echo "Password_of_sudo" | sudo -S xrandr --newmode "1920x1080_60.00" 173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync &&
sudo xrandr --addmode Virtual1 1920x1080_60.00 &&
sudo xrandr --output Virtual1 --mode 1920x1080_60.00
echo "Finished.
Note: runs within a VM. And it works when starts manually, the problem is that i don't want to run manually i want it to start when the system loads.