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.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
04-12-2004, 03:36 PM
|
#1
|
|
LQ Newbie
Registered: Apr 2004
Location: Houston, Texas USA
Distribution: Fedora 8 (mostly)
Posts: 15
Rep:
|
Changing video resolution from command line?
I need to be able to immediately reset the display resolution from within a shell script (since one of the games I run under Wine resets the resolution to 640x480 and doesn't restore it when it exits). I tried
/sbin/setxconf -g 1024x768 -b 16
but it didn't seem to do anything. What is the command line equivalent of "right-click-on-desktop -> Properties -> Settings -> change-screen-size -> Apply" under Xandros 2.0, which I'm running? (If it didn't log me out when it resizes like that sequence does, it would be even better, by the way.) Thanks in advance to all who respond!
|
|
|
|
04-12-2004, 06:49 PM
|
#2
|
|
Member
Registered: Feb 2004
Distribution: debian
Posts: 187
Rep:
|
You should have to make a script that change the XF86Config-4 and reboot the x server...
I'm sur it's possible, but i don't know how, sorry
Creak
|
|
|
|
04-14-2004, 09:31 AM
|
#3
|
|
LQ Newbie
Registered: Apr 2004
Location: Houston, Texas USA
Distribution: Fedora 8 (mostly)
Posts: 15
Original Poster
Rep:
|
Quote:
Originally posted by Creak
You should have to make a script that change the XF86Config-4 and reboot the x server...
Creak
|
Actually, it's even simpler than that, in theory. See, if I reboot the system, it comes up with the correct resolution, so XFConfig-4 never changes. In fact, if I just do a su and then restart X with startx, it comes up with the correct resolution. However, it also comes up to a login prompt; I'm logged out when X is restarted.
Frankly, I didn't expect this to be so complicated. When I run Master of Orion II under Wine, the first thing that happens is that the screen is changed to 640x480 resolution. How does Wine do this without restarting X? Anybody familiar with the Wine source code?
|
|
|
|
04-14-2004, 09:35 AM
|
#4
|
|
Member
Registered: Oct 2002
Location: Havertown PA
Distribution: Ubuntu/RHEL/Fedora
Posts: 253
Rep:
|
If you have the "Modes" section set up with a number of alternative resolutions, you should be able to ctrl+alt+"+" or "-" to the other resolutions listed in "Modes".
If not that, then maybe you can use "xvidtune" to set it, but that's less immediate.
|
|
|
|
04-15-2004, 02:16 PM
|
#5
|
|
LQ Newbie
Registered: Apr 2004
Location: Houston, Texas USA
Distribution: Fedora 8 (mostly)
Posts: 15
Original Poster
Rep:
|
I got a solution from the Usenet group "comp.emulators.ms-windows.wine"; I need to use the "xrandr" command.  To quote from the Usenet posting:
Quote:
Ville Aakko <vaa82@hotmail.com> wrote in message news:<c5k7on$fo1$1@ousrvr3.oulu.fi>...
> Try these workarounds:
>
> - try changing resolution with CTRL+ or CTRL- (that is, pressing CTRL and +
> or CTRL and - together). Test this before running wine, so you know how
> it works.
> - If that doesn't work, run "xvidtune -unlock" and then try CTRL+ and CTRL-
> - If that doesn't work, run "xrandr -q" and then "xrandr -s #", where # is
> the correct display mode. Also look at xrandr's man page.
>
> ...You could check you have "UseXRandR" = "Y" in your wine config, I believe
> that should make wine change resolutions itself in normal situations.
|
Oddly enough, I found that Ctrl/Alt/+ and Ctrl/Alt/- worked fine before running Wine, but not afterwards. And "xvidtune -unlock" made no difference. But "xrandr" did! So, I wanted to post what worked for me, in hopes that it might prove useful to someone else. And also, thanks to creak and dkaplowitz for their suggestions.
Leslie
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 03:48 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
|
|