Keep a custom xrandr screen definition in xubuntu

Asked by giovimonto

I'd like that, as soon as I log in, a custom screen resolution will immediatly set up without having the trouble of going through:
xrandr --newmode <custom screen resolution>
xrandr --addmode VGA1 <custom screen resolution>
xrandr -s <custom screen resolution>
--
So a sort of script that auto-runs at log in! I've tried to insert this script into the /etc/init.d/ folder, but nothing happens, and i'm forced to runs the commands above in terminal.
What can I do?
I use Xubuntu 14.04

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu unity Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

Make a shell script then use the startup manager to run the script after login.

Revision history for this message
jerry (sdfdg43) said :
#2

To keep a custom xrandr screen definition in Xubuntu, you can create a script that runs at startup to apply your desired settings. Here's a step-by-step guide:

Create a Shell Script:
Open a text editor and create a shell script with your custom xrandr settings. For example, let's create a file named custom_xrandr.sh:

bash
Copy code
#!/bin/bash
xrandr --output HDMI-1 --mode 1920x1080 --rate 60 --output eDP-1 --primary --mode 1366x768 --pos 0x0 --rotate normal
Replace HDMI-1 and eDP-1 with the appropriate names of your displays. You can find the names by running xrandr in the terminal.
https://alightmotionapkm.com/

Can you help with this problem?

Provide an answer of your own, or ask giovimonto for more information if necessary.

To post a message you must log in.