LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 06-29-2009, 05:32 PM   #1
Jeff91
Bodhi Developer
 
Registered: Jan 2009
Location: Bloomington, IL
Distribution: Bodhi
Posts: 379

Rep: Reputation: 68
Easy xorg.conf changing with a script?


I have two different xorg.conf setups that I use, one when I have my 32inch LCD connected and one when I do not, is there a way I can create a file that makes it a one click process to swap the configuration it uses? I often let my roomates use my laptop to watch videos and the nVidia configuration is not so user friendly for a computer nooby.

~Jeff
 
Old 06-29-2009, 06:06 PM   #2
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556
Actually, the process of using multiple setups is not *that* simple, but it *is* simple, you just go about it another way:

One thing to remember is that when changing the configuration, X must be restarted (or a second session started) in order for the new configuration to be used.

The way to do it is with the --layout switch on the command-line that starts X. For example, a command-line like:

startx --layout=television -- :1

will start an X session on the first available tty, using the 'television' layout.

A 'layout' is defined inside the xorg.conf file; it is the 'ServerLayout" section. Most files have only one 'ServerLayout' section-- the default one. You can make a second (or more) different layouts by making new 'ServerLayout' sections each with their own 'Identifier', as long as the Device, Screen, Monitor etc. all exist elsewhere in the file (I mean, the different Layouts can share other components of the file). The 'Identifier' is the name you would use with the --layout switch.

This is way less confusing than trying to edit the config file with a script; that will get messy.

Sasha

PS - Making a button to make it a one-click process might work, but I have never tried it. The executable/command line of the button would likely be pretty much alike the commandline I gave above, with the --layout switch.

Last edited by GrapefruiTgirl; 06-29-2009 at 06:10 PM.
 
Old 06-29-2009, 09:02 PM   #3
Jeff91
Bodhi Developer
 
Registered: Jan 2009
Location: Bloomington, IL
Distribution: Bodhi
Posts: 379

Original Poster
Rep: Reputation: 68
Alrighty, I understood most of what you said. One question though, how is my nVidia settings able to add my television to a "twin view" with out forcing an x-restart, is there a way I can do this with a script or a command do you know?

~Jeff
 
Old 06-29-2009, 09:18 PM   #4
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556
There's not a way that _I_ know, but that doesn't mean there isn't a way.

I use nvidia-settings too, and every time it offers to do something for me without re-starting X, it fails, and I need to restart X anyway if I want to see the change. I use nvidia-settings more like an info source than as a tool for actually doing something to the server.

NOTE: in my first reply, the command I gave to start X in a second tty, does not kill the running session, it just starts a second one; so for example, if you're using the machine, and you want to lend it to your friend or whatever to watch TV, you can start a second session for the friend, while leaving your first session intact; when the friend is done, just log out of that session, and you will be returned to your own session (or you can switch back and forth any time with CTRL-ALT-[1-7])

Sorry I can't give any specifics about your exact question regarding nvidia-settings, but I hope this info has helped you in some way

Sasha
 
Old 06-30-2009, 07:58 AM   #5
Jeff91
Bodhi Developer
 
Registered: Jan 2009
Location: Bloomington, IL
Distribution: Bodhi
Posts: 379

Original Poster
Rep: Reputation: 68
Yep, def helpful thank you much for the replies, I've actually been playing with a second X server for games. Any-who I've never had an issue with nvidia-settings not working for me (with or without a restart) so I will have to keep looking online I guess

~Jeff
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
FC8, Xorg.conf resoulution keeps changing forkliftman Fedora 7 11-03-2008 08:40 AM
What's changing XORG.CONF mickeyboa Fedora 2 11-28-2007 04:17 PM
Xorg.conf settings keep changing gtzpower Linux - Hardware 2 02-13-2006 11:56 PM
Changing keymaps in xorg.conf. jens Slackware 3 09-22-2005 12:04 PM
changing screen frequency with xorg.conf hesher Linux - Hardware 1 02-11-2005 06:49 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 05:16 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
Open Source Consulting | Domain Registration