-   Linux - Hardware (
-   -   Command line screen res changing in X from Xterm? (

Frustin 12-12-2003 10: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 03:40 AM

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

verigoth 12-15-2003 06:20 AM 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: => /usr/X11R6/lib/ (0x4002a000) => /usr/X11R6/lib/ (0x4002e000) => /usr/X11R6/lib/ (0x40036000) => /usr/X11R6/lib/ (0x40044000) => /lib/ (0x4010b000) => /lib/ (0x40241000)
/lib/ => /lib/ (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


Frustin 12-15-2003 06: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 07:00 AM

did you check the libraries tho? they exist?

Frustin 12-15-2003 07:08 AM

yeah i checked all my libs exist but mine isnt linked wth: => /usr/X11R6/lib/ (0x4002e000)

but all the rest are.

verigoth 12-15-2003 07: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?


Frustin 12-15-2003 07: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 02: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
other than that i don't think i can be much help


Frustin 12-16-2003 08:29 AM

thanks for that.

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

All times are GMT -5. The time now is 10:58 PM.