|
Ubuntu & NVIDIA: external monitor
This how-to describes how to configure external monitors with the "NVIDIA X Server Settings" utility, enable rotation with RandRRotation, and finally create GNOME launchers with appropriate icons.
These instructions are for Ubuntu 10.10 "Maverick Meerkat". They may also work with Ubuntu 10.04 "Lucid Lynx" or previous releases, but I had no time to do the appropriate testing.
A. External monitor setup
Configure monitors as "Separate X screen"
1. Search for "NVIDIA" in the Control Center.
If you prefer to use the menus, go for:
System → Administration → NVIDIA X Server Settings
2. Select "X Server Display Configuration" in the left column.
3. In the "Display" tab use the "Configure..." button to set each monitor to "Separate X screen".

4. Restart to the X server or your computer to apply the changes.
I set my laptop's display to "Disabled": it only enables itself when no external monitor is plugged.
B. Rotate / pivot / tilt your screen
1. Enable rotation in xorg.conf
Set the display(s) you want to rotate to "Separate X screen" as described in part A. Then edit the xorg.conf file:
gksudo gedit /etc/X11/xorg.conf
Add the RandRRotation option somewhere in the "Screen" section to allow rotation:
Section "Screen"
...
Option "RandRRotation" "True"
....
Complete example:
Section "Screen"
Identifier "Screen0"
Device "Device0"
Monitor "Monitor0"
DefaultDepth 24
Option "TwinView" "0"
Option "metamodes" "CRT: nvidia-auto-select +0+0"
Option "RandRRotation" "True"
SubSection "Display"
Depth 24
EndSubSection
EndSection
Finally, restart your computer. You'll then be able to rotate your screen through the NVIDIA utility, or via the command line:
xrandr -o left
xrandr -o normal
...
Use man xrandr for more details and options.
2. Add a button to rotate / pivot / tilt your display
Using the NVIDIA configuration tool or the command line each time you want to tilt the display is less than convenient.
Luckily, it is very easy to add a launcher (icon) to the GNOME panel to do the job: one to rotate, one to go back to the initial position.
1. Right-click on any panel, select "Add to Panel..."
2. A window appears, select "Custom Application Launcher"
3. Fill up the fields as in the following example:
.png)
3. Rotation icon
You may change the launcher icon. By default, icons are located in /usr/share/icons. More-or-less suitable arrow icons would be edit-undo.svg and edit-redo.svg, though they were not designed specifically for screen rotation.
Example: /usr/share/icons/gnome/32x32/actions/

Example: /usr/share/icons/Humanity/48x48/actions/


To find more icons, just search for "creative commons icons" in your preferred search engine.
Finally, you can add keybord shortcuts to trigger the pivot mode:
Search for "Shortcuts" in the Control Center.
If you prefer to use the menus, go for:
System → Preferences → Keyboard Shortcuts
Fill the dialog, type a shortcut, and you're all done!
4. Rotation at startup
Look for "Startup Applications" in the Control Center.
Menu: System → Preferences → Startup Applications
Click on Add. Adapt the following dialog to your needs:

C. Parsing error in xorg.conf
This paragraph is for previous Ubuntu versions, e.g. 9.10 "Karmic Koala". In some cases, it may also be useful for later Ubuntu releases. The following error message used to appear in the NVIDIA X Server Settings utility when saving your configuration:
Error: Failed to parse existing X config file '/etc/X11/xorg.conf'!
This bug gets easily fixed with this commands:
sudo nvidia-xconfig
Than you can re-run nvidia-settings as root, and hopefully you'll be able to save:
sudo nvidia-settings
By Johannes Eva, January 2011
