LinuxQuestions.org
Help answer threads with 0 replies.
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 09-09-2003, 08:52 PM   #1
jdaniel
Member
 
Registered: Jul 2003
Posts: 51

Rep: Reputation: 15
starting X from the command line in a specific resolution


Is there a way to start an X server in a specific resolution from the command line without having to edit a config file before hand? Sometimes I would like to run the server in 1280x1024 and other times I would like to run in 1024x768. I am trying to write scripts to automate this process.

Thanks.
 
Old 09-09-2003, 10:07 PM   #2
DrOzz
Senior Member
 
Registered: May 2003
Location: Sydney, Nova Scotia, Canada
Distribution: slackware
Posts: 4,185

Rep: Reputation: 60
maybe create a file(s) in /etc/X11 one called 1024 and the other called 1280...so their paths will be respectivly::
/etc/X11/1024
/etc/X11/1280
and the contents of them will be identical as the XF86Config file but only put the mode for what you want....
for /etc/X11/1024::
Modes "1024x768"
for /etc/X11/1280::
Modes "1280x1024"
so then when you want to start up (and i'll give one example) you could type ::
xinit -- :0 -xf86config 1024
to fire up X at 1024x768...
i think that will work, won't hurt to try....although there may be something easier, this is all i can come up with....
and you can always throw that last command in a script just for you can type something simpler...
 
Old 09-09-2003, 11:37 PM   #3
jdaniel
Member
 
Registered: Jul 2003
Posts: 51

Original Poster
Rep: Reputation: 15
Hmmm.. this is a good idea. I will try this and see how it works out. Thanks.
 
Old 09-10-2003, 04:28 PM   #4
jdaniel
Member
 
Registered: Jul 2003
Posts: 51

Original Poster
Rep: Reputation: 15
Thanks Drozz, that worked like a charm.
 
Old 09-10-2003, 09:27 PM   #5
kazuni
Member
 
Registered: May 2003
Location: Hong Kong
Distribution: Android on HTC Hero
Posts: 256

Rep: Reputation: 30
try man startx, it also has a command-line switch for it. i frogot what it is, but it's something along the lines like startx --resolution 1280 1024 or soemthing like that :|
 
Old 09-10-2003, 10:25 PM   #6
DrOzz
Senior Member
 
Registered: May 2003
Location: Sydney, Nova Scotia, Canada
Distribution: slackware
Posts: 4,185

Rep: Reputation: 60
sweet d00d, glad to help
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Kill specific Wine program from Command Line Brian114 Linux - Software 4 06-07-2011 05:02 AM
Starting An App From A Command-line linuxdawg Linux - Newbie 5 02-02-2005 10:06 AM
Command line tools to Find files with specific text naps Linux - Software 5 11-15-2004 05:46 AM
Only starting command in a specific time period jeroenvrp Linux - Software 3 07-21-2004 12:18 AM
starting gui in command line mattfritze Linux - General 3 12-24-2003 07:05 AM

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

All times are GMT -5. The time now is 06:10 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