Tiny Core Base > TCB Q&A Forum
Getting X Windows resolution
binarydemon:
Hi,
I was trying to have a script determine the resolution used by X Windows- most of the examples on the internet utilize xdpyinfo or xrandr but neither of these seem to be included in TinyCore x86 by default (I'm sure one of the tcz's in the repository include these, but I'd rather not keep adding bloat). I see there is a -screen parameter in first line of .xsession, can I pretty much count on that being the working resolution or is there a chance when running that Xvesa command that it might fallback to something else or be overridden by a boot vga= parameter?
Is there another method I might be overlooking?
Juanito:
Xorg-7.7-bin contains xdpyinfo and xrandr - if you are concerned about the size, you could always hack the extension to only contain what you need.
Rich:
Hi binarydemon
If you go here:
http://forum.tinycorelinux.net/index.php/topic,13793.msg77139.html#msg77139
you'll find the C source code for a small desktop clock. You can lift the GetScreenParams routine to retrieve screen resolution.
Rich:
Hi binarydemon
Attached is a small C program for retrieving screen information. Install compiletc, xorg-7.x-dev and sstrip. Then run the
CompileScreenParams script to compile it. Compiled and stripped it's 1700 bytes and outputs the following:
--- Code: ---tc@box:~/guilib/ScreenParams$ ./ScreenParams
Screen=1920 x 1080 DPIx=95 DPIy=94
tc@box:~/guilib/ScreenParams$
--- End code ---
windundgeist:
@Rich
Can I use this script to change the resolution, because the width is a little warped. This causes problems after a certain time, i.e. when working for a long time.
I am working with flux, so the icons are in the center on the bottom of the screen. Don't know if this is X. Here some information about my HW:
--- Code: ---Graphics: Device-1: Intel Mobile 4 Series Integrated Graphics
vendor: Toshiba America Info Systems driver: i915 v: kernel bus ID: 00:02.0
chip ID: 8086:2a42
Display: x11 server: X.Org 1.20.4 driver: intel resolution: 1280x800~60Hz
OpenGL: renderer: Mesa DRI Mobile Intel GM45 Express v: 2.1 Mesa 18.3.6
direct render: Yes
00:02.0 VGA compatible controller [0300]: Intel Corporation Mobile 4 Series Chipset Integrated Graphics Controller [8086:2a42] (rev 07) (prog-if 00 [VGA controller])
Subsystem: Toshiba America Info Systems Mobile 4 Series Chipset Integrated Graphics Controller [1179:ff67]
Flags: bus master, fast devsel, latency 0, IRQ 28
Memory at 50000000 (64-bit, non-prefetchable) [size=4M]
Memory at 40000000 (64-bit, prefetchable) [size=256M]
I/O ports at 4140 [size=8]
[virtual] Expansion ROM at 000c0000 [disabled] [size=128K]
Capabilities: <access denied>
Kernel driver in use: i915
Kernel modules: i915
00:02.1 Display controller [0380]: Intel Corporation Mobile 4 Series Chipset Integrated Graphics Controller [8086:2a43] (rev 07)
Subsystem: Toshiba America Info Systems Mobile 4 Series Chipset Integrated Graphics Controller [1179:ff67]
--- End code ---
Navigation
[0] Message Index
[#] Next page
Go to full version