Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

When i'm connecting an external Monitor to my notebook (specs below), whether with VGA or Displayport, I always have to configure the screen resolution and display position. At the moment i'm doing this with an GUI utility for XRandR calld arandr. Another issue is, that always the lowest possible display resolution is used, instead of the highest, when connecting a monitor.

Is it possible to automatically recall a previously made configuration every time I connect a specific monitor? For example, when I connect the monitor at work, I want to the displays setup side-by-side, at home instead, I use a vertical layout.

This problem exists with both of my laptops. They are running Fedora 18 and Xubuntu 13.04, all with XFCE as Window Manager. They are the same devices, Lenovo X220, with the integrated Intel HD3000 graphics.

Update

I tried to make a per monitor setting, but unfortunately fedora don't uses a xorg.conf file , instead it tries to do an automatic configuration every time X is started (see create xorg.conf) Creation of xorg.conf file with Xorg :1 -configure, like described in the fedora wiki, fails with Number of created screens does not match number of detected devices. .

Workaround

I've made a little workaround that solves the problem, but only for displays connected at the displayport. Arandr can save the display setup as shell script, so i used the saved settings and putted them into the .xinitrc.

cat ~/.screenlayout/<name_of_your_settingsfile>.sh > ~/.xinitrc

chmod u+x ~/.xinitrc

That should do the trick, if someone has a better way to do it, please let me know.

share|improve this question

1 Answer 1

I found this thread with a solution titled: How Do I Save Xrandr Settings?, that might help you:

You can use this command to get your current settings:

$ xrandr --verbose

Using that command you could figure out what your current display is set to and put the following example types of lines in your $HOME/.xinitrc file:

xrandr --newmode "1920x1080_60.00" 173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync
xrandr --addmode HDMI1 1920x1080_60.00
share|improve this answer
    
Thanks for the answer but i think this solution is connection and not monitor specific. The output of xrandr --verbose looks a little bit different, than shown in the most tutorials, f.e.: HDMI1 connected 1920x1080+0+0 (0xc0) normal (normal left inverted right x axis y axis) 160mm x 90mm –  klingt.net Jun 6 '13 at 7:38

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.