Tag: opensuse

Dual monitor automation

See the file ~/.config/monitors.xml – this file generally is screwed when you are changing the monitors being connected to your laptop. Most of the times, the symptoms are:

  • connecting to a new environment doesn’t automatically bring up the new monitor on-screen
  • a second VGA monitor is either not detected, or it just doesn’t get the display because: “your display resolution is only XYZ
    whereas you are trying to set a display resolution of ABC”
  • you can only set mirror display and not “dual display” as it should be

Since all of these problems are so chronic, you may want to consider doing away with your dual monitor automation (that gnome’s display applet provides) and using xrandr+customized X configuration. That would require you to use a script that you might have to run every time you change the number of monitors (like connecting a new one etc.). I wanted to believe that openSUSE 11.2 doesn’t need this any more, but I don’t think we’re there yet, since if you are traveling around with your laptop connecting to different resolution screens, it doesn’t work out of the box.

Or – delete the monitors.xml file every time you want to change resolutions. It’s still hacky.

For anyone who wants to try out the dual display script I use, here it is (copy paste this somewhere and save as dual-display.sh and chmod a+x on that file).


# Rishi Pande
# http://fryol./net
# dual-display.sh-0.0.3
# This works well on openSUSE 11.0 / Compaq nc6400, please report if it ain't
# working or even if it works elsewhere.


if [ "x$1" != 'x-h' ];

# You should make sure that you see similar settings\\n\
# enabled in the Display sub-section of /etc/X11/xorg.conf: \\n\
#     Virtual    2880 900 \\n\
# And these in the monitor sub-section \\n\
#     Option       \"PreferredMode\" \"1440x900\" \\n\
#     Option       \"Xinerama\" \"off\" \\n"

if [ "x$1" = "x-h" ];
   echo "Usage: $app.sh [WIDTHxHEIGHT]";
   echo "$app: In case you want to undo things, plug out your laptop from the";
   echo "$app: docking station (or pull out the VGA cable) and run $app.sh again.";
   echo "$app: To use a different resoltion, please supply WIDTHxHEIGHT (like 1280x800)";
   echo "$app: as an arguement to the script, and if your /etc/X11/xorg.conf is fine,";
   echo "$app: things should work. Note that this resolution is for your VGA.";
   echo -ne "$app: These are the relevant settings in /etc/X11/xorg.conf:\n";
   grep Virtual /etc/X11/xorg.conf
   #echo -ne "\n$app: "
   grep -E 'Option.*Xinerama' /etc/X11/xorg.conf
   #echo -ne "\n$app: "
   grep -E 'Option.*PreferredMode' /etc/X11/xorg.conf
   echo -ne $directions

if [  `xrandr --prop|grep ' connected'|wc -l` -gt 1 ];
   xrandr --output VGA --preferred --mode $dual_disp_resolution --right-of LVDS;
   # With suse 11.0, this is no longer needed:
   #  xrandr --output VGA --left-of LVDS;
   #  xrandr --output VGA --right-of LVDS;
   #  dcop kwin KWinInterface reconfigure;
   xrandr --output VGA --off;


My favorite task as a teenager: cut CDs that had all the essential software I would ever need. Titling them as Essentials, I’d be ready lest somebody needed a piece. Exactly 10 years ago. The hobby soon curled up as a small business where we would burn SparcCDs containing all essential freeware programs and sell them. End: some 4 years back.

Today, the only essential software I need is a command prompt with wget. Of course, then I would get the following:

  • openSUSE 11.0
  • Firefox 3.0
    • TabMixPlus  / Live HTTP Headers / Vimperator
    • FoxyProxy / User Agent Switcher / del.icou.us bookmarker
  • Thunderbird 2.0
    • Lightning / Threadkey / SwitchProxy
    • QuoteCollapse / Mailbox Alert / XNote
  • PIdgin
    • Conversation Colors / Guifications / History / Log Reader
    • Psychic Mode / Nicksaid / Mystatusbox
      • zypper
        • konsole
          • screen
        • kbluetooth
      • klipper
        • xrandr
      • amarok

Very soon, they’ll be in your essentials list.