LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (http://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Command line screen res changing in X from Xterm? (http://www.linuxquestions.org/questions/linux-hardware-18/command-line-screen-res-changing-in-x-from-xterm-125221/)

Frustin 12-12-2003 09:36 AM

Command line screen res changing in X from Xterm?
 
I have a little gui in X made out of perl/tk and that passes options to a C program that i want to run in <insert screen prefernce> mode even when the X server is running in 1024x768 by default.

So to clarify:

I am running X
I am in default 1024x768 mode
When the user decides he/she want to run program in another resolution they click their prefered resolution from drop down list.
They click ok button to launch the program.
The X session will now change resolution to the users prefered mode
When the user has finished with the program and quits, then it should return to the default res and the gui that launched the program in the first place.

At the moment i thought i could just pass the selected res to -geometry. So i tested it by passing the resolution that my screen is currently in so there would be no confusing for it, but that gives me:

ERROR: invalid geometry

i tryed using xrandr and that gives me:

bingo2:~$ xrandr -v
Xlib: extension "RANDR" missing on display ":0.0".

so now here i aml; stuck!

help please.

Frustin 12-15-2003 02:40 AM

odd how there are a lot of linux gurus but when it comes to X its an enigma.

verigoth 12-15-2003 05:20 AM

um...it works for me...i'm not a "guru" by any means, but the first place to start is possible missing libraries. 'ldd /usr/X11R6/bin/xrandr' gives me this output:
libXrandr.so.2 => /usr/X11R6/lib/libXrandr.so.2 (0x4002a000)
libXrender.so.1 => /usr/X11R6/lib/libXrender.so.1 (0x4002e000)
libXext.so.6 => /usr/X11R6/lib/libXext.so.6 (0x40036000)
libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0x40044000)
libc.so.6 => /lib/libc.so.6 (0x4010b000)
libdl.so.2 => /lib/libdl.so.2 (0x40241000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
(some of the locations might be different depending on distribution)
are you sure you have all these libraries? if so another possibility is a problem in your XF86Config file...i remember seeing a option that stops a user from changing display size...perhaps that's there? hope this helps

verigoth

Frustin 12-15-2003 05:32 AM

DontZoom option stops the ctrl-alt-+/- working if its enabled is that the one you are refering too? if so its off by default which doesnt help my cause. :(

verigoth 12-15-2003 06:00 AM

did you check the libraries tho? they exist?

Frustin 12-15-2003 06:08 AM

yeah i checked all my libs exist but mine isnt linked wth:

libXrender.so.1 => /usr/X11R6/lib/libXrender.so.1 (0x4002e000)

but all the rest are.

verigoth 12-15-2003 06:17 AM

this thing you're working on, is it some kind of script or unseen interface to xrandr or will it be something you write in C? if it's the second maybe you should try messing with the functions in Xrandr(3) (type 'man 3 Xrandr')...maybe it's just your xrandr program that's broken and not the RandR extension?

verigoth

Frustin 12-15-2003 06:23 AM

well the plan was to in effect xargs the display that the user selects to xrandr which would then change the screen res.

verigoth 12-15-2003 01:42 PM

if you wanted to try my xrandr (be sure to keep yours backed up somewhere) to see if that works you can get it from http://maug.wireless.mnsu.edu/~verigoth/xrandr.gz
other than that i don't think i can be much help

verigoth

Frustin 12-16-2003 07:29 AM

thanks for that.

I tried it and i get the same error. :(


All times are GMT -5. The time now is 06:23 PM.