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 |
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.
|
|
09-09-2003, 08:52 PM
|
#1
|
Member
Registered: Jul 2003
Posts: 51
Rep:
|
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.
|
|
|
09-09-2003, 10:07 PM
|
#2
|
Senior Member
Registered: May 2003
Location: Sydney, Nova Scotia, Canada
Distribution: slackware
Posts: 4,185
Rep:
|
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...
|
|
|
09-09-2003, 11:37 PM
|
#3
|
Member
Registered: Jul 2003
Posts: 51
Original Poster
Rep:
|
Hmmm.. this is a good idea. I will try this and see how it works out. Thanks.
|
|
|
09-10-2003, 04:28 PM
|
#4
|
Member
Registered: Jul 2003
Posts: 51
Original Poster
Rep:
|
Thanks Drozz, that worked like a charm.
|
|
|
09-10-2003, 09:27 PM
|
#5
|
Member
Registered: May 2003
Location: Hong Kong
Distribution: Android on HTC Hero
Posts: 256
Rep:
|
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 :|
|
|
|
09-10-2003, 10:25 PM
|
#6
|
Senior Member
Registered: May 2003
Location: Sydney, Nova Scotia, Canada
Distribution: slackware
Posts: 4,185
Rep:
|
sweet d00d, glad to help
|
|
|
All times are GMT -5. The time now is 06:10 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
|
|