Normally I would use xdpyinfo but that's not present in Puppy.
I can scan /etc/X11/xorg.conf but that's hardly definitive, especially if multiple resolutions exist. Surely there must be some active method of probing the X server?
TIA
Jeffrey
How can I determine the screen resolution?
Thanks, GuestToo.
Your responsiveness is amazing!
I tried everything that looked feasible in /usr/X11R7/bin but didn't notice that xvidtune had a command-line option, only the scary GUI with warning about potential video damage! "xvidtune -show" will solve my problem thanks.
I don't see xwininfo, which would be even more useful. Where did you get it? (I have it on AIX 4 and Fedora Core 5 but don't see it on Puppy.) I copied it from FC5 to Puppy, but get the familiar
Your responsiveness is amazing!
I tried everything that looked feasible in /usr/X11R7/bin but didn't notice that xvidtune had a command-line option, only the scary GUI with warning about potential video damage! "xvidtune -show" will solve my problem thanks.
I don't see xwininfo, which would be even more useful. Where did you get it? (I have it on AIX 4 and Fedora Core 5 but don't see it on Puppy.) I copied it from FC5 to Puppy, but get the familiar
message, which I've had when trying to run some RPM objects under Puppy. Is there a simple solution to this? I've tried copying FC5's libc.so.6 across to Puppy, but that simply trashes Puppy, which can no longer perform even the simplest commands like ls or ln (needed to reverse the change!). Boot from CD allowed me to restore the original.../lib/libc.so.6: version 'GLIBC_2.4' not found (required by ./xwininfo)
sorry, i remember now that i copied xwininfo from a Vector live cd ... i used it to get the id of the Rox wallpaper so i could tell xpenguins to run on the Rox window rather than the root window ... which works, but the penguins ignore the application windows, but do recognize the desktop icons
i wrote a simple script which shuts down the Rox pinboard then runs xpenguins, or if xpenguins is runing kills the penguins (literally, they explode) then restarts the Rox pinboard
anyway, that's why i have xwininfo installed ... it's about 13k
sample output:
# xwininfo -root
xwininfo: Window id: 0x3b (the root window) (has no name)
Absolute upper-left X: 0
Absolute upper-left Y: 0
Relative upper-left X: 0
Relative upper-left Y: 0
Width: 800
Height: 600
Depth: 16
Visual Class: TrueColor
Border width: 0
Class: InputOutput
Colormap: 0x20 (installed)
Bit Gravity State: NorthWestGravity
Window Gravity State: NorthWestGravity
Backing Store State: NotUseful
Save Under State: no
Map State: IsViewable
Override Redirect State: no
Corners: +0+0 -0+0 -0-0 +0-0
-geometry 800x600+0+0
#
i wrote a simple script which shuts down the Rox pinboard then runs xpenguins, or if xpenguins is runing kills the penguins (literally, they explode) then restarts the Rox pinboard
anyway, that's why i have xwininfo installed ... it's about 13k
sample output:
# xwininfo -root
xwininfo: Window id: 0x3b (the root window) (has no name)
Absolute upper-left X: 0
Absolute upper-left Y: 0
Relative upper-left X: 0
Relative upper-left Y: 0
Width: 800
Height: 600
Depth: 16
Visual Class: TrueColor
Border width: 0
Class: InputOutput
Colormap: 0x20 (installed)
Bit Gravity State: NorthWestGravity
Window Gravity State: NorthWestGravity
Backing Store State: NotUseful
Save Under State: no
Map State: IsViewable
Override Redirect State: no
Corners: +0+0 -0+0 -0-0 +0-0
-geometry 800x600+0+0
#
you might be able to the library file somewhere, for example, in a dir like /root/my-applications/xwininfo ... also the executable ... then you could start xwininfo from a script (in the PATH, like /root/my-applications/bin), something like this:Is there a simple solution to this?
#!/bin/sh
export LD_LIBRARY_PATH=/root/my-applications/xwininfo:$LD_LIBRARY_PATH
exec /root/my-applications/xwininfo/xwininfo "$@"
when you run the script, xwininfo in /root/my-applications/xwininfo/xwininfo should use the library file in that dir, but the other applications in Puppy should not even know it is there
or you could get a version of the program that is more compatible with Puppy's libraries
- Dougal
- Posts: 2502
- Joined: Wed 19 Oct 2005, 13:06
- Location: Hell more grotesque than any medieval woodcut
Here's the "original" xwininfo, from Puppy's xorg package.
- Attachments
-
- xwininfo.gz
- (10.97 KiB) Downloaded 311 times
What's the ugliest part of your body?
Some say your nose
Some say your toes
But I think it's your mind
Some say your nose
Some say your toes
But I think it's your mind
save as "screenres" and make executable (chmod 755 screenres):
sh-3.00# ./screenres
1024 768
sh-3.00#
Mark
Code: Select all
#!/usr/bin/puppybasic
resolution = xwin_screensize()
print resolution[0] , resolution[1]
1024 768
sh-3.00#
Mark