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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
|
01-16-2010, 07:31 PM
|
#1
|
Member
Registered: Feb 2007
Posts: 75
Rep:
|
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.
|
|
|
01-16-2010, 07:37 PM
|
#2
|
LQ Guru
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594
|
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
|
|
|
01-17-2010, 09:44 AM
|
#3
|
Member
Registered: Feb 2007
Posts: 75
Original Poster
Rep:
|
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
|
|
|
01-17-2010, 09:54 AM
|
#4
|
LQ Guru
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594
|
Quote:
Originally Posted by TheB2B
...
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
|
|
|
01-17-2010, 10:09 AM
|
#5
|
Member
Registered: Feb 2007
Posts: 75
Original Poster
Rep:
|
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
|
|
|
01-17-2010, 10:25 AM
|
#6
|
LQ Guru
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594
|
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 10:30 AM.
Reason: further info,.
|
|
|
01-17-2010, 07:45 PM
|
#7
|
Member
Registered: Feb 2007
Posts: 75
Original Poster
Rep:
|
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.
|
|
|
01-17-2010, 09:16 PM
|
#8
|
LQ Guru
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,726
|
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.
Evo2.
|
|
|
01-18-2010, 12:39 PM
|
#9
|
Member
Registered: Feb 2007
Posts: 75
Original Poster
Rep:
|
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.
|
|
|
01-18-2010, 05:32 PM
|
#10
|
LQ Guru
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,726
|
Quote:
Originally Posted by TheB2B
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 05:35 PM.
|
|
|
01-18-2010, 06:27 PM
|
#11
|
Member
Registered: Feb 2007
Posts: 75
Original Poster
Rep:
|
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?
|
|
|
01-18-2010, 07:01 PM
|
#12
|
LQ Guru
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,726
|
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
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.
|
|
|
01-19-2010, 06:20 PM
|
#13
|
Member
Registered: Feb 2007
Posts: 75
Original Poster
Rep:
|
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.
|
|
|
01-19-2010, 07:11 PM
|
#14
|
LQ Guru
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,726
|
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 07:13 PM.
|
|
|
01-20-2010, 02:39 PM
|
#15
|
Member
Registered: Feb 2007
Posts: 75
Original Poster
Rep:
|
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.
|
|
|
All times are GMT -5. The time now is 02:36 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|