I have been working at nights on a new project of mine. I have always thought that Keith Packards’ RandR was an excellent tool and I wanted to make xrandr (its textual interface) more userfriendly. I am aware that another chap is working on a UI written in C, however I thought I would contribute with my Python application.
RandrGUI (its provisional name) is a GTK interface to xrandr. I did not create Python bindings for RandR (since I can’t code in C, yet) but an application which captures the output of xrandr and uses it to apply the settings that users choose.
I installed Debian Sid, since it uses xserver-xorg 1.3, randr 1.2 and the intel driver 2.0, and started developing my application. I wrote the interface using glade (so that I don’t have to change the code if I want to make the UI look different.
I have almost finished writing version 0.1 which will enable you to:
-
clone your screen on an external screen or TV
-
rotate your screen(s)
-
change your screen(s) resolution
You will be able to do all this without touching your xorg.conf, only a few mouse clicks are required.
What are the requirements?
-
xserver-xorg 1.3
-
randr 1.2
-
the intel driver 2.0 (or the ATI open source driver from GIT code)
-
A GNU/Linux distribution which uses the first three elements in this list.
This means that you will not be able to use it on Feisty. Maybe on Gutsy.
Does it work flawlessly?
No,not yet. At least not with the version of randr available on Debian unstable. However it works quite well here.
Known Issues
-
There is no way to select PAL/NTSC for your CRT TV therefore my TV works at 30Hz and the video is black and white *
-
I do not know how Randrgui will work with HD TVs *
-
Sometimes you have to change the resolution of your 2nd screen in order to get the right resolution on your first screen (this means that more clicks are required).
-
If I use a DVI2VGA adapter 1 extra TMDS-1 device spawns up (I’ll have to ask some Xorg hackers about this)
* As far as I know,the first 2 problems are solved in Randr GIT code therefore I will have to play with the experimental code and adapt randrgui.
TODO
-
Write a logger (for version 0.1 ?)
-
Give the option to use each screen separately (instead of just cloning your main screen on the other screens)
-
Adapt Randrgui to Randr’s GIT code
-
Find a better name for Randrgui
-
make a deb package
Release date
I hope to release it soon. I am studying all day for my English and Spanish exams therefore I can code only at nights.
Screenshots
I know this screenshot does not show how RandrGUI works therefore I promise that I will post more screenshots soon.
Blogged with Flock
I think you should call it gRandR, pronounced ‘grander’.
Is this related to the DisplayConfigGTK spec? https://wiki.ubuntu.com/DisplayConfigGTK
You might want to team up with those people, instead of duplicating effort.
Have you followed this spec:
https://blueprints.launchpad.net/ubuntu/ spec/simple-x-mode-selection
?
There’s ongoing work to have this and other problems in X solved by next Ubuntu release. I’d hate to see duplicate work!
I see your concerns however one of the Pre-requisites of DisplayConfigGTK are the “python bindings for xrandr 1.2. Possibly ctypes would be enough.”
My application gets around the problem. And it already works well.
Of course I would be glad to help those people (provided that my help is welcome).
Alberto,
This looks really nice, I’ll try it out on Gutsy in a few days and let you know how it goes.
Keep up the good work!
In other news, envy reboots my nvidia laptop when trying to create a package, I’ll email you what it does sometime soon.
Great project Alberto ! And good luck for your exam 😉
This is great to see! If you are interested in getting it in to Debian, let me know and I’ll help make it happen. If you’re interested in cooperating with the X Strike Force, please write us at debian-x@lists.debian.org.
@Jeff
sure. Let me know when you have time 😉
@David Nusinow:
I’ll be glad to help. I subscribed to the mailing list
@all
thanks for your support 😉
(Took me forever to realize I had to click on “Leave an URL” just to enter the mandatory anti-spam word, may need to make this a little more clear. Sorry, just really found that annoying)
—-
Hi again, it’s Matt (the guy who did the “OSS projects to watch” for Datamation)
I think this is *fantastic* and would also be interested in how dual-displays are handled? Not cloning, rather extended twinview (NVIDIA) support?
N/M, it looks like you are already ahead of me on the dual-monitor stuff. 😉
“…Give the option to use each screen separately (instead of just cloning your main screen on the other screens)”
Hiya Alberto,
I’m one of the people working on displayconfig-gtk for Ubuntu (actually I focus more on Xorg itself, but this is an important piece). We would love to have your help, especially if you have sorted out issues we haven’t yet.
Display detection and configuration has been a problematic area with Ubuntu historically, but my hope is that with a good gui/randr tool we’ll be able to turn this into a big strength. So the more good brains we can get working on this solution, the better! I would be happy to put you in touch with folks, or come by the #ubuntu-devel channel on freenode and look for glatzor or I.
@Matt
currently only cloning is implemented. The multi-screen I wrote about consists in having different workspaces on distinct displays. However I feel that GNOME and KDE are not ready for multi-screen (especially KDE). But of course I hope to be proven wrong.
I have to ask Xorg’s mailing list if something similar to twinview can be done through randr. If it’s doable then I’ll implement it 😉
@Bryce
I would be more than glad to help and I’ll definitely look for you on freenode, or via email.
My laptop is a tablet one, and when I rotate the screen I have to rotate the wacom tablet also otherwise when I move the stylus up it goes left, and when I move it down it goes right.
xsetwacom is the command you need, which is in the wacom-tools package (main).
So to rotate you might issue:-
sudo xsetwacom set cursor rotate
Where is CW, CCW, HALF or NONE (default).
@Alan
thanks for your suggestion. The same happens with my mouse or touchpad.
What about color depth? I tried to change mine from 24 to 16 once, and X fell down and couldn’t get up.
@C
I’m not sure whether you can change the colour depth of your display.