LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-16-2010, 08:31 PM   #1
TheB2B
Member
 
Registered: Feb 2007
Posts: 67

Rep: Reputation: 15
Two Display Setup


How to setup two different desktops, my first display is my laptop, second display is flat screen mointor. Like to have my primary display be the mointor, second display be my laptop. When I un-hook my laptop of course I want primary to revert back to the laptop.Currently both the laptop and monitor are displaying the same desktop.

Running Fedora 10 with all updates applied. Laptop is an HP dv6000 with Intel video chipset. I have had "some" experience with Linux running a home server ... not a true newbie but this is my first trip down the road with a desktop er rather laptop.
 
Old 01-16-2010, 08:37 PM   #2
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551
You will undoubtedly need to do some tailoring to your own hardware, such as screen resolutions, PCI bus ID's as applicable, and video driver in use, but I believe you will find this thread over here extremely interesting: http://www.linuxquestions.org/questi...screen-745682/

If you get totally stuck, or need help implementing this, and/or things are going bonky on you, do post again and let us know what you've tried to do so far, what's happening, and tell us what make/model of video card you have, and which driver you're using. Also, show us the output of:

shell# lspci -v

.. particularly the part about the VGA device.

Cheers!
Sasha
 
Old 01-17-2010, 10:44 AM   #3
TheB2B
Member
 
Registered: Feb 2007
Posts: 67

Original Poster
Rep: Reputation: 15
Followed your link, that looks easy ... not. I ran the command lspci -v , below is the results for my video system.

Looking over xflow7 post I don't understand how to mod the script for location or "path", were is that being called for in the script? Not real good with scripts as I'm just learning how to create/use them.

d Graphics Controller (rev 0c) (prog-if 00 [VGA controller])
Subsystem: Hewlett-Packard Company Device 30cc
Flags: bus master, fast devsel, latency 0, IRQ 16
Memory at f8000000 (64-bit, non-prefetchable) [size=1M]
Memory at d0000000 (64-bit, prefetchable) [size=256M]
I/O ports at 1800 [size=8]
Capabilities: [90] Message Signalled Interrupts: Mask- 64bit- Count=1/1
Enable-
Capabilities: [d0] Power Management version 3
Kernel modules: intelfb

00:02.1 Display controller: Intel Corporation Mobile GM965/GL960 Integrated Grap
hics Controller (rev 0c)
Subsystem: Hewlett-Packard Company Device 30cc
Flags: bus master, fast devsel, latency 0
Memory at f8100000 (64-bit, non-prefetchable) [size=1M]
Capabilities: [d0] Power Management version 3
 
Old 01-17-2010, 10:54 AM   #4
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551
Quote:
Originally Posted by TheB2B View Post
...
I don't understand how to mod the script for location or "path", were is that being called for in the script?
Having just gone and re-read the other thread, and xflow7's post, I don't see any reference to a "path" -- can you clarify where it is you're looking at, i.e. what "path" you're referring to?

Sasha
 
Old 01-17-2010, 11:09 AM   #5
TheB2B
Member
 
Registered: Feb 2007
Posts: 67

Original Poster
Rep: Reputation: 15
This is posted by xflow7 below the script.

"some things may need to be tailored to one's particular hardware - especially the path for testing the monitor connection."

"then I edited /etc/kde/kdm/kdmrc to call this script rather than the default when starting X:"

Code:

...
ServerCmd=/usr/bin/XAutoLayout
...



Within the script there is this

BASE_COMMAND="/usr/bin/X -br"

and

RT_STATE_FILE=/proc/acpi/video/VID/CRT0/state
 
Old 01-17-2010, 11:25 AM   #6
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551
Ahh. OK, thank you.

Allright, first: "the path for testing the monitor connection" applies to /proc/acpi/video/VID/CRT0/state and xflow7's comment implies that this may not be the correct location on all hardware, to test to see if the monitor is connected or not.
To see if it is correct for your machine, first check if that file /proc/acpi/video/VID/CRT0/state exists on your machine. If it does, do (as root, with the external monitor disconnected):

shell# cat /proc/acpi/video/VID/CRT0/state and you should get some sort of value. xflow7 seems to indicate that there's a value of 0x10 HEX (16 decimal) in that location, when the monitor is connected. Whatever value or contents you get from this file (or the appropriate file) on your machine, copy or write down what's in there.

Now, assuming you don't want to plug monitors in and out with the machine turned on, you'll need to turn off the computer and connect your external monitor. Reboot, and as root, run the above `cat` command again, and see if you get a different value returned. If you do, it's somewhat likely (but not guaranteed) that this location is good on your machine, for determining if the external monitor is connected. Write down or copy the value, and adjust the code as necessary. The value you got from the file with the monitor CONNECTED, is what you would put for "CONNECTED_BIT_MASK=0x10"

Next: BASE_COMMAND="/usr/bin/X -br" -- this should likely be OK for most machines, but to be sure, look and make sure that /usr/bin/X actually exists. This is the "X" executable binary. If it exists at that location, all is well. Otherwise, locate it and correct the path as required.

Same goes for ServerCmd=/usr/bin/XAutoLayout -- this is actually the name of the custom script you're making. If you put it at that location (in /usr/bin) all is well; otherwise, adjust as required depending on where you save this custom script.

Now, xflow7 according to his sidebar
(<--- over there) says he's using Slackware; also, his X startup script is /etc/kde/kdm/kdmrc which starts KDM, the KDE login manager. If you're using KDE, or the KDM login manager, this will be similar, but won't necessarily be exactly the same. I see you're using Fedora. You'll need to find out where the particular script is located on your system, that starts up your login manager. If you're not using KDE, or cannot find this file, tell us what Fedora you're using, and which desktop environment (KDE, GNOME, other..) and someone using Fedora will hopefully be able to help you figure out how to adjust this for your system.

Sasha

Last edited by GrapefruiTgirl; 01-17-2010 at 11:30 AM. Reason: further info,.
 
Old 01-17-2010, 08:45 PM   #7
TheB2B
Member
 
Registered: Feb 2007
Posts: 67

Original Poster
Rep: Reputation: 15
Ran the cat command on state file, returned the same value with my external monitor connected or disconnected, 0x1f. As per your suggestion I rebooted prior to connecting my external monitor. The file path to the state file is different then shown on xflow7 how to. Mine is /proc/acpi/video/VGA/CRT/state. I have another folder under /VGA/LCD/state this to lists the same value of 0x1f with the external monitor connected or disconnected.

I do have the path of /usr/bin/x as per xflow7 but path for my start up is not the same, /etc/kde/env/imsettings-kde.sh. The file imsettings-kde.sh has the following;

# workaround for KDE
if [ -f /etc/X11/xinit/xinitrc.d/50-xinput.sh ] ; then
DISABLE_IMSETTINGS=1 DRY_RUN=1 . /etc/X11/xinit/xinitrc.d/50-xinput.sh
fi

I am running fedora 10 with the default desktop environment.
 
Old 01-17-2010, 10:16 PM   #8
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and Scientific Linux
Posts: 5,753

Rep: Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288
xrandr should be able to this for you fairly easily. Please search your package manager for a "randr" and install one the gui packages you find (or example grandr). If you can't find such a package, with the external monitor connected please run the following command and post the output.

Code:
xrandr
Evo2.
 
Old 01-18-2010, 01:39 PM   #9
TheB2B
Member
 
Registered: Feb 2007
Posts: 67

Original Poster
Rep: Reputation: 15
Yes xrandr works and I can set the external monitor to either be primary with the laptop screen off, laptop to be the primary screen with the external monitor off or both on but then the external monitor mirrors the laptop or vice versa. I want each one to provide a distinct work space. Word doc open on one only and perhaps spreadsheet only open on the other.
 
Old 01-18-2010, 06:32 PM   #10
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and Scientific Linux
Posts: 5,753

Rep: Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288
Quote:
Originally Posted by TheB2B View Post
I want each one to provide a distinct work space.
Not 100% sure if I understand you. Are you using the --left-of etc so that the display is not cloned?

If yes to above, then to getting separate "work spaces" (in this context an undefined term)
is down to your window manager. You don't say what window manager you are using, but I'll take a guess that it is something hobbled like metacity, which would explain your problems.

Both awesome and enlightenment do this type of thing very well.

Evo2.

Last edited by evo2; 01-18-2010 at 06:35 PM.
 
Old 01-18-2010, 07:27 PM   #11
TheB2B
Member
 
Registered: Feb 2007
Posts: 67

Original Poster
Rep: Reputation: 15
We do have a terminology issue here, not sure what you mean by --left of etc. Right now my laptop display is cloned onto my LCD monitor displayed. To give some context what I am typing here is displayed both on me external monitor and my laptop at the same time. What I would dearly love is to have two open "windows" with different items being displayed on each monitor.

How would I be able to determine what window manager I am using?
 
Old 01-18-2010, 08:01 PM   #12
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and Scientific Linux
Posts: 5,753

Rep: Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288
Ok, the terminology I am using is that of xrandr. Please read the xrandr man page. Ok, you said "cloned". Great, that is terminology I understand. This is what xrandr will do by default. If that is not what you want, you need to tell that to xrandr using flags like "--left-of". Example

Code:
xrandr --output VGA1 --left-of LVDS1
This is assuming that LVDS1 is the name of you inbuilt display and VGA1 is the external display. To find out the names of the displays, just run the xrandr command with no arguments: eg
Code:
xrandr
Quote:
How would I be able to determine what window manager I am using?
I noticed in one of your earlier posts that you say you are using Fedora 10. As far a I know that uses the Gnome desktop environment by default, which uses the metacity window manager by default.
I guess you could confirm that somehow by looking in the gnome menus, or with the command
Code:
ps ux | grep metacity
Evo2.
 
Old 01-19-2010, 07:20 PM   #13
TheB2B
Member
 
Registered: Feb 2007
Posts: 67

Original Poster
Rep: Reputation: 15
What window manager would you recommend? Is there one that is better or preferred over another. I have confirmed that I am using the Gnome desktop with metacity.

Here is the output of xrandr:

Screen 0: minimum 320 x 200, current 1024 x 768, maximum 1680 x 1680
VGA connected 1024x768+0+0 (normal left inverted right x axis y axis) 433mm x 270mm
1680x1050 60.0 +
1600x1200 60.0
1400x1050 74.8 60.0
1280x1024 75.0 60.0
1280x960 60.0
1152x864 75.0
1280x720 75.0 60.0
1024x768 75.0 70.1 60.0*
832x624 74.6
800x600 72.2 75.0 60.3 56.2
640x480 75.0 72.8 75.0 66.7 59.9
720x400 70.1
LVDS connected 1024x768+0+0 (normal left inverted right x axis y axis) 331mm x 207mm
1280x800 60.0 +
1024x768 60.0*
800x600 60.3
640x480 59.9

I ran xrandr --output VGA --right-of LVDS

Results:
xrandr: screen cannot be larger than 1680x1680 (desired size 2048x768)

The display is still cloned.
 
Old 01-19-2010, 08:11 PM   #14
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and Scientific Linux
Posts: 5,753

Rep: Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288
Almost there! You just need to add a virtual screen size in your xorg.conf

Code:
Section "Screen"
.
SubSection "Display"
.
Virtual 2560 1024
.
EndSubSection
EndSection
The '.' just indicate that you may already have something there. You may have to tweak the actual x and y values to be different to what I show above.

Please try to modify your xorg.conf. If you do not have one, create one with just the screen section: look in /usr/share/doc/xserver-xorg/example/xorg.conf for a template.

Quote:
What window manager would you recommend? Is there one that is better or preferred over another. I have confirmed that I am using the Gnome desktop with metacity.
I'd recommend just sticking with that for now. Gnome/metacity is a very common and easy to use setup.

Evo2.

Last edited by evo2; 01-19-2010 at 08:13 PM.
 
Old 01-20-2010, 03:39 PM   #15
TheB2B
Member
 
Registered: Feb 2007
Posts: 67

Original Poster
Rep: Reputation: 15
Its working!!!!!

Solution while not the simplest method did get my dual display to work as I wanted it to. I now have my external monitor split, not cloned, but separate from each other and I can drag items between them such as a browser. I loaded fedora 12 64 bit version on my laptop and it just works. The applet under System/Preference/Display on the windows panel bar menu allows me to drag and drop the monitor windows to get the proper layout of the monitors as they physically sit on my desk.

Thanks evo2 for your time and effort. I did not see your last set of instructions until after I had completed my update. Reason for the update simply enough I wanted a 64 bit OS as I was running a 32 bit version so why not go with the latest build?

Thanks also to GrapefruiTgirl for your time and effort.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
can't display graphics, display manager may not be setup dsollen Linux - Software 5 06-17-2009 03:13 PM
Secondary display setup? tsunamikitsune Linux - General 2 06-28-2006 01:09 AM
Display Setup on FC4 ieduarte73 Linux - Newbie 1 08-28-2005 05:35 PM
how to ... X setup Graphical Display for IRAF? maiden Linux - General 0 08-13-2005 01:33 PM
Setup requires an X display to run? newtwolinux Linux - Software 2 05-10-2005 05:36 PM


All times are GMT -5. The time now is 08:54 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration