LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 07-30-2006, 02:52 AM   #1
timread
LQ Newbie
 
Registered: Mar 2002
Posts: 23

Rep: Reputation: 15
Two monitor setup when you temporarily only have one?


I have a small portable (Sony Vaio TX2XP) and am running Kubuntu Dapper. I have set up X using Xinerama to work with an external 19 TFT monitors and it is great. The problem is that when I am on a trip and only use the portables built in monitor, X still thinks there are two monitors and some applications (windows) appear where the external monitor should be, and I cannot access them.

I know that I can copy over my old version of xorg.conf and restart X to get around the problem, but it is a real pain...

Is there some command I can run to let X know that I don't have the external monitor plugged in.

Thanks,

Tim
 
Old 07-31-2006, 11:58 PM   #2
lurko
Member
 
Registered: Jun 2006
Location: Ontario, Canada
Distribution: Debian
Posts: 448

Rep: Reputation: 35
you could setup more than one serverlayout in your xorg.conf, one for your default setup and one for your sometimes-1-screen-only setup.

then use
Code:
startx -- -layout nameoflayout
to start X with just the one screen.

You should add
Code:
Option   "DefaultServerLayout" "nameoflayout"
to the ServerFlags section too in this case, adding the ServerFlags section if you don't have one. I'm not sure what criteria is used to decide which layout to use without the DefualtServerLayout option present, so this might not be absolutely necessary. If you have more than one layout though, it would seem logical to have the defualt layout option.

I don't know how this helps you though if you boot right into runlevel 5, sorry.
 
Old 08-01-2006, 01:29 AM   #3
timread
LQ Newbie
 
Registered: Mar 2002
Posts: 23

Original Poster
Rep: Reputation: 15
[QUOTE=lurko]you could setup more than one serverlayout in your xorg.conf, one for your default setup and one for your sometimes-1-screen-only setup.

then use
Code:
startx -- -layout nameoflayout
to start X with just the one screen.


That is an excellant idea. The only problem is that I don't know how to specify more than one server layout in the xorg.conf file. I guess it doesn't matter I can define two xorg files:

xorg.conf1
xorg.conf2

And then write a shell script:

cp xorg.conf1 xorg.conf
startx


Thanks,

Tim
 
Old 08-01-2006, 01:29 AM   #4
timread
LQ Newbie
 
Registered: Mar 2002
Posts: 23

Original Poster
Rep: Reputation: 15
Just one question, how do I stop X from starting automatically when I log in?

Thanks,

Tim

Last edited by timread; 08-01-2006 at 01:32 AM.
 
Old 08-02-2006, 05:08 PM   #5
eccles42
Member
 
Registered: Jul 2006
Location: UK
Distribution: Gentoo, Gentoo, Ubuntu, Gentoo
Posts: 42

Rep: Reputation: 15
couldn't you just use metamodes?

I do that for UT2004, got two monitors and UT likes the spot in the middle, GRR!
Sooo....
I've defined a two monitor set up, and added a metamode with null for one of the monitors, this should solve your problem.
I'm using gnome and just hit ctrl+alt++/- to cycle through the modes.
Here's the line in my xorg file:


Option "MetaModes" "1280x1024,1280x1024; 1280x1024,NULL"
(in the screen section)
computer starts up with two monitors, then I can hit ctrl+alt++ and it turns off the second monitor

Good luck
 
Old 08-03-2006, 06:30 PM   #6
lurko
Member
 
Registered: Jun 2006
Location: Ontario, Canada
Distribution: Debian
Posts: 448

Rep: Reputation: 35
Quote:
Originally Posted by timread
The only problem is that I don't know how to specify more than one server layout in the xorg.conf file.
you just add another... if your default xorg.conf has device and screen sections for your laptop monitor and your two 19" monitors, then you just add a new Section "ServerLayout", with a different identifier, that uses just one screen, and leaving your multi-monitor layout alone.

Code:
Section "ServerLayout"
    Identifier         "roving"
    Screen             0 "laptop_screen" 0 0
    InputDevice    "Mouse1" "CorePointer"
    InputDevice    "Keyboard1" "CoreKeyboard"
EndSection
obviously you would point the layout to the correct screen and input devices for your laptop.

and then put in a ServerFlags section(or just the option if this section is already present) to specify which layout to use when nothing is specified with startx -- -layout
Code:
Section "ServerFlags"
       Option   "DefaultServerLayout" "default"
Endsection
so if your layout with the dual 19's (and the laptop screen?) had the identifier "default", just running startx would use that layout. and running startx -- -layout roving would startup the layout that only uses the screen "laptop_screen".



I believe you set the default runlevel in /etc/initab, but I have not yet done any fiddling with that so I can't comment any further. I also suppose it's possible that some distros do it differently... I bet there's something in the LQwiki
 
  


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
default monitor on nvidia / dual monitor setup fenderog SUSE / openSUSE 3 05-01-2009 05:36 PM
3 Monitor setup, Only 1 Monitor can play videos. kierl Linux - Software 0 01-05-2005 07:45 PM
monitor setup ZaphyR Linux - General 2 01-04-2005 04:43 PM
Booting to wrong Monitor (w/ dual monitor setup) NeoNostalgia Linux - General 1 06-30-2004 01:49 AM
Help with Triple Monitor Setup jduck Linux - Hardware 5 10-11-2003 10:25 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 02:03 AM.

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
Open Source Consulting | Domain Registration