Page 2 of 2 FirstFirst 12
Results 11 to 16 of 16

Thread: Duel Screens and Desktop Effects

  1. #11
    Join Date
    Mar 2007
    Beans
    95

    Re: Duel Screens and Desktop Effects

    Hope it helps, let me know if it does....I hope to refine it.

  2. #12
    Join Date
    Jan 2005
    Location
    NJ Shore
    Beans
    141
    Distro
    Ubuntu 7.10 Gutsy Gibbon

    Re: Duel Screens and Desktop Effects

    Does anyone know if this same information would apply to someone using the NVIDIA driver? Attached is my xorg.conf
    Attached Files Attached Files
    Athlon64 X2 6000+, M2N-SLI Deluxe, 2gb Corsair XMS3200, 7600GT/6600GT

  3. #13
    Join Date
    Mar 2007
    Beans
    95

    Re: Duel Screens and Desktop Effects

    I see no reason that it should not work with Nvidia drivers

  4. #14
    Join Date
    Mar 2008
    Location
    Tampa, FL
    Beans
    112
    Distro
    Ubuntu Development Release

    Re: Duel Screens and Desktop Effects

    Hey guys, this script works great. In 7.10 I created a start menu shortcut and ran it as root, so I could just hit a button and go. Now with Hardy, nothing happens when I click on it. If I run it with sudo on the command line it will work but not from the shortcut.

    Any ideas??

  5. #15
    Join Date
    Dec 2006
    Beans
    702
    Distro
    Ubuntu

    Re: Duel Screens and Desktop Effects

    Quote Originally Posted by dthomasdigital View Post
    ne screen two screen we all scream for a screen.
    Xorg Switcher Documentation:

    There is a small issue in the way which Ubuntu handles the ati graphics (specifically the Radeon X600) card running 3d or opengl applications on a two screen configuration. It has a tendency to run those types of applications either very slowly or not at all. However, when configured to run on a single screen setup, opengl and 3d accelerated applications run with absolutely no limitations.

    Why run dual screen if you encounter no limitations on a single screen configuration? For certain tasks such as desktop publishing, web or application development a dual screen configuration is invaluable, but if your playing the latest first person shooter game like Doom3 or Prey, a fast 3D accelerated graphics card is a must.

    The solution was to create two separate xorg.conf files, one for a single screen set up and one for a dual screen set up. Creating the two separate xorg.conf files was relatively simple.

    Here are the two sample files.
    technical note: all files need to be located in \etc\X11\


    xorg.config.single

    Code:
    # /etc/X11/xorg.conf (xorg X Window System server configuration file) 
    # 
    # This file was generated by dexconf, the Debian X Configuration tool, using 
    # values from the debconf database. 
    # 
    # Edit this file with caution, and see the xorg.conf(5) manual page. 
    # (Type "man xorg.conf" at the shell prompt.) 
    # 
    # This file is automatically updated on xserver-xorg package upgrades *only* 
    # if it has not been modified since the last upgrade of the xserver-xorg 
    # package. 
    # 
    # If you have edited this file but would like it to be automatically updated 
    # again, run the following command: 
    #   sudo dpkg-reconfigure -phigh xserver-xorg 
    
    Section "Files" 
        Fontpath    "/usr/share/fonts/X11/misc" 
        Fontpath    "/usr/share/fonts/X11/cyrillic" 
        Fontpath    "/usr/share/fonts/X11/100dpi/:unscaled" 
        Fontpath    "/usr/share/fonts/X11/75dpi/:unscaled" 
        Fontpath    "/usr/share/fonts/X11/Type1" 
        Fontpath    "/usr/share/fonts/X11/100dpi" 
        Fontpath    "/usr/share/fonts/X11/75dpi" 
        # path to defoma fonts 
        Fontpath    "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType" 
    EndSection 
    
    Section "Module" 
        Load        "i2c" 
        Load        "bitmap" 
        Load        "ddc" 
        Load        "dri" 
        Load        "extmod" 
        Load        "freetype" 
        Load        "glx" 
        Load        "int10" 
        Load        "vbe" 
    EndSection 
    
    Section "InputDevice" 
        Identifier    "Generic Keyboard" 
        Driver        "kbd" 
        Option        "CoreKeyboard" 
        Option        "XkbRules"    "xorg" 
        Option        "XkbModel"    "pc105" 
        Option        "XkbLayout"    "us" 
        Option        "XkbOptions"    "lv3:ralt_switch" 
    EndSection 
    
    Section "InputDevice" 
        Identifier    "Configured Mouse" 
        Driver        "mouse" 
        Option        "CorePointer" 
        Option        "Device"    "/dev/input/mice" 
        Option        "Protocol"    "ImPS/2" 
        Option        "ZAxisMapping"    "4 5" 
        Option        "Emulate3Buttons"    "true" 
    EndSection 
    
    Section "InputDevice" 
        Driver        "wacom" 
        Identifier    "stylus" 
        Option        "Device"    "/dev/wacom"# Change to 
        Option        "Type"    "stylus" 
        Option        "ForceDevice"    "ISDV4"# Tablet PC ONLY 
        # /dev/input/event 
        # for USB 
    EndSection 
    
    Section "InputDevice" 
        Driver        "wacom" 
        Identifier    "eraser" 
        Option        "Device"    "/dev/wacom"# Change to 
        Option        "Type"    "eraser" 
        Option        "ForceDevice"    "ISDV4"# Tablet PC ONLY 
        # /dev/input/event 
        # for USB 
    EndSection 
    
    Section "InputDevice" 
        Driver        "wacom" 
        Identifier    "cursor" 
        Option        "Device"    "/dev/wacom"# Change to 
        Option        "Type"    "cursor" 
        Option        "ForceDevice"    "ISDV4"# Tablet PC ONLY 
        # /dev/input/event 
        # for USB 
    EndSection 
    
    Section "Device" 
        Identifier    "ATI Technologies Inc RV380 [Radeon X600 (PCIE)]" 
        Driver        "fglrx" 
        Busid        "PCI:1:0:0" 
    EndSection 
    
    Section "Monitor" 
        Identifier    "DELL 1707FP" 
        Option        "DPMS" 
    EndSection 
    
    Section "Screen" 
        Identifier    "Default Screen" 
        Device        "ATI Technologies Inc RV380 [Radeon X600 (PCIE)]" 
        Monitor        "DELL 1707FP" 
        Defaultdepth    24 
        SubSection "Display" 
            Depth    1 
            Modes        "1280x1024"    "1152x864"    "1024x768"    "800x600"    "720x400"    "640x480" 
        EndSubSection 
        SubSection "Display" 
            Depth    4 
            Modes        "1280x1024"    "1152x864"    "1024x768"    "800x600"    "720x400"    "640x480" 
        EndSubSection 
        SubSection "Display" 
            Depth    8 
            Modes        "1280x1024"    "1152x864"    "1024x768"    "800x600"    "720x400"    "640x480" 
        EndSubSection 
        SubSection "Display" 
            Depth    15 
            Modes        "1280x1024"    "1152x864"    "1024x768"    "800x600"    "720x400"    "640x480" 
        EndSubSection 
        SubSection "Display" 
            Depth    16 
            Modes        "1280x1024"    "1152x864"    "1024x768"    "800x600"    "720x400"    "640x480" 
        EndSubSection 
        SubSection "Display" 
            Depth    24 
            Modes        "1280x1024"    "1152x864"    "1024x768"    "800x600"    "720x400"    "640x480" 
        EndSubSection 
    EndSection 
    
    Section "ServerLayout" 
        Identifier    "Default Layout" 
      screen "Default Screen" 
        Inputdevice    "Generic Keyboard" 
        Inputdevice    "Configured Mouse" 
        Inputdevice    "stylus"    "SendCoreEvents" 
        Inputdevice    "cursor"    "SendCoreEvents" 
        Inputdevice    "eraser"    "SendCoreEvents" 
    EndSection 
    
    Section "DRI" 
        Mode    0666 
    EndSection 
    Section "Extensions" 
        Option        "Composite"    "0" 
        Option        "Composite"    "0" 
    EndSection
    The second file you will need is:

    xorg.config.dual

    Code:
    # /etc/X11/xorg.conf (xorg X Window System server configuration file) 
    # 
    # This file was generated by dexconf, the Debian X Configuration tool, using 
    # values from the debconf database. 
    # 
    # Edit this file with caution, and see the xorg.conf(5) manual page. 
    # (Type "man xorg.conf" at the shell prompt.) 
    # 
    # This file is automatically updated on xserver-xorg package upgrades *only* 
    # if it has not been modified since the last upgrade of the xserver-xorg 
    # package. 
    # 
    # If you have edited this file but would like it to be automatically updated 
    # again, run the following command: 
    #   sudo dpkg-reconfigure -phigh xserver-xorg 
    
    Section "Files" 
        Fontpath    "/usr/share/fonts/X11/misc" 
        Fontpath    "/usr/share/fonts/X11/cyrillic" 
        Fontpath    "/usr/share/fonts/X11/100dpi/:unscaled" 
        Fontpath    "/usr/share/fonts/X11/75dpi/:unscaled" 
        Fontpath    "/usr/share/fonts/X11/Type1" 
        Fontpath    "/usr/share/fonts/X11/100dpi" 
        Fontpath    "/usr/share/fonts/X11/75dpi" 
        # path to defoma fonts 
        Fontpath    "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType" 
    EndSection 
    
    Section "Module" 
        Load        "i2c" 
        Load        "bitmap" 
        Load        "ddc" 
        Load        "dri" 
        Load        "extmod" 
        Load        "freetype" 
        Load        "glx" 
        Load        "int10" 
        Load        "vbe" 
    EndSection 
    
    Section "InputDevice" 
        Identifier    "Generic Keyboard" 
        Driver        "kbd" 
        Option        "CoreKeyboard" 
        Option        "XkbRules"    "xorg" 
        Option        "XkbModel"    "pc105" 
        Option        "XkbLayout"    "us" 
        Option        "XkbOptions"    "lv3:ralt_switch" 
    EndSection 
    
    Section "InputDevice" 
        Identifier    "Configured Mouse" 
        Driver        "mouse" 
        Option        "CorePointer" 
        Option        "Device"    "/dev/input/mice" 
        Option        "Protocol"    "ImPS/2" 
        Option        "ZAxisMapping"    "4 5" 
        Option        "Emulate3Buttons"    "true" 
    EndSection 
    
    Section "InputDevice" 
        Driver        "wacom" 
        Identifier    "stylus" 
        Option        "Device"    "/dev/wacom"# Change to 
        Option        "Type"    "stylus" 
        Option        "ForceDevice"    "ISDV4"# Tablet PC ONLY 
        # /dev/input/event 
        # for USB 
    EndSection 
    
    Section "InputDevice" 
        Driver        "wacom" 
        Identifier    "eraser" 
        Option        "Device"    "/dev/wacom"# Change to 
        Option        "Type"    "eraser" 
        Option        "ForceDevice"    "ISDV4"# Tablet PC ONLY 
        # /dev/input/event 
        # for USB 
    EndSection 
    
    Section "InputDevice" 
        Driver        "wacom" 
        Identifier    "cursor" 
        Option        "Device"    "/dev/wacom"# Change to 
        Option        "Type"    "cursor" 
        Option        "ForceDevice"    "ISDV4"# Tablet PC ONLY 
        # /dev/input/event 
        # for USB 
    EndSection 
    
    Section "Device" 
        Identifier    "0 ATI Technologies Inc RV380 [Radeon X600 (PCIE)]" 
        Driver        "fglrx" 
        Busid        "PCI:1:0:0" 
            Screen          0 
    EndSection 
    
    Section "Monitor" 
        Identifier    "Dell 1707FP" 
        Option        "DPMS" 
    EndSection 
    
    
    Section "Device" 
        Identifier    "1 ATI Technologies Inc RV380 [Radeon X600 (PCIE)]" 
        Driver        "fglrx" 
        Busid        "PCI:1:0:0" 
            Screen          1 
    EndSection 
    
    Section "Monitor" 
        Identifier    "Dell 1707FP" 
        Option        "DPMS" 
    EndSection 
    
    Section "Screen" 
        Identifier    "Main Screen" 
        Device        "0 ATI Technologies Inc RV380 [Radeon X600 (PCIE)]" 
        Monitor        "Dell 1707FP" 
        Defaultdepth    24 
        SubSection "Display" 
            Depth    1 
            Modes        "1280x1024"    "800x600"    "640x480" 
        EndSubSection 
        SubSection "Display" 
            Depth    4 
            Modes        "1280x1024"    "800x600"    "640x480" 
        EndSubSection 
        SubSection "Display" 
            Depth    8 
            Modes        "1280x1024"    "800x600"    "640x480" 
        EndSubSection 
        SubSection "Display" 
            Depth    15 
            Modes        "1280x1024"    "800x600"    "640x480" 
        EndSubSection 
        SubSection "Display" 
            Depth    16 
            Modes        "1280x1024"    "800x600"    "640x480" 
        EndSubSection 
        SubSection "Display" 
            Depth    24 
            Modes        "1280x1024"    "800x600"    "640x480" 
        EndSubSection 
    EndSection 
    
    Section "Screen" 
        Identifier    "Second Screen" 
        Device        "1 ATI Technologies Inc RV380 [Radeon X600 (PCIE)]" 
        Monitor        "Dell 1707FP" 
        Defaultdepth    24 
        SubSection "Display" 
            Depth    1 
            Modes        "1280x1024"    "800x600"    "640x480" 
        EndSubSection 
        SubSection "Display" 
            Depth    4 
            Modes        "1280x1024"    "800x600"    "640x480" 
        EndSubSection 
        SubSection "Display" 
            Depth    8 
            Modes        "1280x1024"    "800x600"    "640x480" 
        EndSubSection 
        SubSection "Display" 
            Depth    15 
            Modes        "1280x1024"    "800x600"    "640x480" 
        EndSubSection 
        SubSection "Display" 
            Depth    16 
            Modes        "1280x1024"    "800x600"    "640x480" 
        EndSubSection 
        SubSection "Display" 
            Depth    24 
            Modes        "1280x1024"    "800x600"    "640x480" 
        EndSubSection 
    EndSection 
    
    Section "ServerLayout" 
        Identifier    "Default Layout" 
       Screen               0 "Main Screen" 
       Screen               1 "Second Screen" RightOf "Main Screen"  
        Inputdevice    "Generic Keyboard" 
        Inputdevice    "Configured Mouse" 
        Inputdevice    "stylus"    "SendCoreEvents" 
        Inputdevice    "cursor"    "SendCoreEvents" 
        Inputdevice    "eraser"    "SendCoreEvents" 
            option          "Xinerama" 
    EndSection 
    
    Section "DRI" 
        Mode    0666 
    EndSection
    Now the not so fun part, to switch back and forth between these two set-ups is a real pain. First you have to be root to change the xorg.conf file. Then you have tp rename the setup file you want to use to xorg.conf while making sure you don't copy over any of your other .conf files. On more than one occasion I corrupted the configuration file and had to install the xorg.conf file by hand in the terminal from a backup. There had to be a better way.


    Scripts to the rescue. Xorg Switcher is a Linux script that with the help of zenity makes the task of switching back and forth between different xorg configurations as easy as pressing a button.

    Here is the script:

    Code:
    #!/bin/sh 
    #Xorg switcher by dthomasdigital and hackerssidekick 
    #This script will allow you to choose between two xorg.conf files 
    
    SCREEN=`zenity --list --text="Select an xorg.conf" --column="Index" --column="Config" --hide-column=1 1 'Single Monitor' 2 'Dual Monitor'` 
    if [ $SCREEN = "1" ]; then 
    zenity --info --text="Switching to Single Monitor X will restart" 
    rm /etc/X11/xorg.conf 
    ln -s /etc/X11/xorg.conf.single /etc/X11/xorg.conf 
    killall Xorg 
    else 
    if [ $SCREEN = "2" ]; then 
    zenity --info --text="Switching to Dual Monitor X will restart" 
    rm /etc/X11/xorg.conf 
    ln -s /etc/X11/xorg.conf.dual /etc/X11/xorg.conf 
    killall Xorg 
    else 
    zenity --info --text="Nevermind" 
    fi 
    fi
    Don't forget that you will need to make the script executable.

    Once you create the script, you will need to place it in a directory. I create a directory called scripts in the home directory. This is just for easy reference and you can place it any where you would like.

    The next step is to add a launcher to the panel

    First right mouse click on the panel


    Click Add to panel and you will see the next window:



    Click Custom application Launcher

    You will see the next screen:


    Enter the following information


    A little explanation:

    Type: well is an application.
    Name: Name of the application (you can call it what ever you want.
    Command: gksudo is a great command. When you run the script it will ask you for the root password, (like stated earlier you must have root access to change the xorg.conf file) <full path> is the path where your script is located.
    Comment: Add what you would like
    Press the No Icon button and select an icon.

    Now run the script.

    Click on the panel launcher you just created.


    Once you do, you will be asked to enter the root password.

    You should then see this window.


    If you click cancel you will see this window


    Click on the desired configuration you want and click the OK button.


    You will then see this window. Beware if you click the X to cancel the script will still run (might fix that in a later version)

    Once you click the OK button, X will restart. You log back into Gnome and your new xorg.conf will be running.


    So that's it, this is all you need to make switching your xorg.conf file as easy as pressing a button. I'd like to thank hackerssidkick from the Ubuntu forums for showing me how to rename the files and turning me on to zenity. If you would like to contact me please email me at dthomasdigital@gmail.com and visit the web site http:\\myweb.cableone.net\dthomas


    Look for more script howtos coming soon......
    Ok I have a Dell XPS m1210. The display runs at 1280x800. I also have a 15inch LCD display that runs at 1280x768. Could I just take both of these config files and modify it for my setup? The big differance here is I have a Nvidia 7400go. Will this script work for me?


  6. #16
    Join Date
    May 2008
    Location
    Butte County, CA
    Beans
    2
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: Duel Screens and Desktop Effects

    I just modified it to work for me. I could not get the script to work and after 3 evenings of work (and lots of hunting because I am a novice) I got it. I am using a Nvidia GeForce 6200 PCI card on an aopen XCcube edition computer running Ubuntu 9.04. Using this modified script I can switch between 3 different settings: dual monitor, game on large monitor, and TV out cloned to smaller monitor. All without unplugging the cords.

    Here is the script I am using:

    #!/bin/sh
    #Xorg switcher by dthomasdigital and hackerssidekick
    #This script will allow you to choose between two xorg.conf files

    SCREEN=`zenity --list --text="Select an xorg.conf" --column="Index" --column="Config" --hide-column=1 1 'Game Monitor' 2 'Dual Monitors' 3 'TV & Monitor'`
    if [ $SCREEN = "1" ]; then
    zenity --info --text="Switching to Game Monitor X will restart."
    rm /etc/X11/xorg.conf
    ln -s /etc/X11/xorg.conf.game /etc/X11/xorg.conf
    killall Xorg
    fi
    if [ $SCREEN = "2" ]; then
    zenity --info --text="Switching to Dual Monitor X will restart."
    rm /etc/X11/xorg.conf
    ln -s /etc/X11/xorg.conf.dual /etc/X11/xorg.conf
    killall Xorg
    fi
    if [ $SCREEN = "3" ]; then
    zenity --info --text="Switching to TV & Monitor X will restart."
    rm /etc/X11/xorg.conf
    ln -s /etc/X11/xorg.conf.clonetv /etc/X11/xorg.conf
    killall Xorg
    fi
    zenity --info --text="Oops... Nevermind."
    fi
    fi


    I hope this will help others for easy use as it does me.
    -JL

Page 2 of 2 FirstFirst 12

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •