LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 12-12-2003, 10:36 AM   #1
Frustin
Member
 
Registered: May 2002
Location: Essex, UK
Distribution: Debian, Redhat, AIX 5L
Posts: 512

Rep: Reputation: 30
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.
 
Old 12-15-2003, 03:40 AM   #2
Frustin
Member
 
Registered: May 2002
Location: Essex, UK
Distribution: Debian, Redhat, AIX 5L
Posts: 512

Original Poster
Rep: Reputation: 30
odd how there are a lot of linux gurus but when it comes to X its an enigma.
 
Old 12-15-2003, 06:20 AM   #3
verigoth
Member
 
Registered: May 2002
Posts: 179

Rep: Reputation: Disabled
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
 
Old 12-15-2003, 06:32 AM   #4
Frustin
Member
 
Registered: May 2002
Location: Essex, UK
Distribution: Debian, Redhat, AIX 5L
Posts: 512

Original Poster
Rep: Reputation: 30
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.
 
Old 12-15-2003, 07:00 AM   #5
verigoth
Member
 
Registered: May 2002
Posts: 179

Rep: Reputation: Disabled
did you check the libraries tho? they exist?
 
Old 12-15-2003, 07:08 AM   #6
Frustin
Member
 
Registered: May 2002
Location: Essex, UK
Distribution: Debian, Redhat, AIX 5L
Posts: 512

Original Poster
Rep: Reputation: 30
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.
 
Old 12-15-2003, 07:17 AM   #7
verigoth
Member
 
Registered: May 2002
Posts: 179

Rep: Reputation: Disabled
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
 
Old 12-15-2003, 07:23 AM   #8
Frustin
Member
 
Registered: May 2002
Location: Essex, UK
Distribution: Debian, Redhat, AIX 5L
Posts: 512

Original Poster
Rep: Reputation: 30
well the plan was to in effect xargs the display that the user selects to xrandr which would then change the screen res.
 
Old 12-15-2003, 02:42 PM   #9
verigoth
Member
 
Registered: May 2002
Posts: 179

Rep: Reputation: Disabled
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
 
Old 12-16-2003, 08:29 AM   #10
Frustin
Member
 
Registered: May 2002
Location: Essex, UK
Distribution: Debian, Redhat, AIX 5L
Posts: 512

Original Poster
Rep: Reputation: 30
thanks for that.

I tried it and i get the same error.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing Wallpaper from Command Line b_suny Linux - General 2 06-27-2004 06:52 AM
FREAKISHLY URGENT: How can I change the screen res. through command lines? nealkochhar Linux - Newbie 16 06-09-2004 04:49 PM
how do i change the graphical res. from command line? justin9 Linux - Newbie 6 03-27-2004 05:16 AM
changing the screen res outside X tux_rox Linux - General 1 06-25-2002 05:23 PM
Changing screen res in Slackware amp2000 Linux - General 6 03-03-2002 06:23 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 12:30 PM.

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