You are not logged in.
I want to write a script that detects the resolution I'm running and echo it to a configuration file. I've heard of xrandr, but when I run it, I get ...
[max@pwn rigsofrods]$ xrandr
Xlib: extension "RANDR" missing on display ":0.0".
RandR extension missing
This script will be a part of a PKGBUILD, so I'm hoping there's something really simple and seamless that I could use for just about anyone's computer regardless of configuration.
Last edited by synthead (2008-12-24 00:33:27)
Offline
try to export DISPLAY before running xrandr
export DISPLAY=:0.0
Give what you have. To someone, it may be better than you dare to think.
Offline
What about xdpyinfo | grep -i dimensions ?
Excuse my lame english.
Offline
Do you use xinerama? It currently unloads randr since the concepts underlying both utilities are incompatible.
Offline
What about xdpyinfo | grep -i dimensions ?
For it to output just the dimensions...
xdpyinfo | awk '/dimensions/{print$2}'
will do it.
Offline
RodrickCZ wrote:What about xdpyinfo | grep -i dimensions ?
For it to output just the dimensions...
xdpyinfo | awk '/dimensions/{print$2}'
will do it.
That is PERFECT! Thanks!
Offline
Onyros wrote:RodrickCZ wrote:What about xdpyinfo | grep -i dimensions ?
For it to output just the dimensions...
xdpyinfo | awk '/dimensions/{print$2}'
will do it.
That is PERFECT! Thanks!
Ah, you're welcome! You've got me curious about that PKGBUILD, though...
Offline
Haha. I made a better solution with the PKGBUILD, actually Rigs of Rods isn't the "smartest" linux game so lots of configs are in the program directory. Just like any other big game, I put it in /opt, so there were a lot of permission issues and complications when regular users tried to configure the game. What I ended up doing is replacing the blank config it comes with with a very basic 800x600 windowed configuration, and if a user runs RoR, a little script makes a hidden folder and copies it to it. From there, that section of the configuration utility edits the ~/.rigsofrods configuration And as you would expect, its in plaintext, so you can edit it by hand too.
But not ignoring all the other configs that have to be in /opt/rigsofrods, I made a group called "ror" that allows rw access to config files and allows you to fully configure the game.
Offline
http://aur.archlinux.org/packages.php?ID=22354
Oh, and http://rigsofrods.com/
PS - In typing this, I realized something that I sould add to my scripts to prevent bugs, so I'll have a new PKGBUILD up soon if you're curious enough to build it ...
Offline
Done, I'm at release 5 now.
Offline
What about a few screenshots or some more info?
Offline