What is it?
Urandr is a GUI to RandR 1.2 written in PyGTK. IT covers RandR 1.2 basic functionalities and aims to make multihead configuration as easy as possible for unexperienced users.
Usecases:
* James wants to connect his laptop to a projector without messing with his xorg.conf
* Jane has two displays and would like to work on her screens as if they were a unified desktop
What URandR does NOT do:
* It doesn’t set up your screens permanently. Your settings will be lost when the Xserver is restarted
* It doesn’t set up more than 2 screens a time (e.g. 2 DVI monitors) [THIS WILL BE FIXED]
Requirements:
* An Intel card with Intel’s modesetting driver [ATI cards will be supported in the next future]
* xorg-server 1.3 or higher (on any GNU/Linux distribution)
Known Problems:
* If you allow URandR to set up a virtual resolution, you will have to enable your external monitor (with the enable checkbox) and click on the Apply button. Only then you will be able to set your external monitor to the left (or to the right, etc.) of your main screen
* Sometimes setting the virtual resolution disables direct rendering (which you can restore by removing the virtual resolution from your xorg.conf or with URandR’s Clear button. [Make sure you disable Compiz before you use a a method other than Clone mode]
What does it look like?
You can get a deb package here here
NOTE: this program works well on OpenSUSE 10.3 and Fedora 7 but I haven’t made an RPM yet. I hope someone can help me with this (the source code in on my website) since I have never made an RPM package.
Constructive criticism is welcome.
This looks pretty cool! I will be watching and waiting for the ATI-driver-friendly version to be released.
Does this works better than the new “Screen and Graphics” preferences of Ubuntu 7.10 ? Is it aimed at the same goal ?
@kiplantt
No, they are different.
URandR:
* doesn’t set up your screens permanently (something which “Screen and Graphics” does). Your settings will be lost when the Xserver is restarted.
* uses RandR 1.2 while (AFAIK) “Screen and Graphics” doesn’t
All you have to do is plug in an external monitor, press the Detect button and configure the screen.
Why all the duplication?
Firstly, this should be integrated in GNOME’s screen resolution capplet. The GNOME CC guys will have to do all this work over again. (Rodrigo Moya blogged about proceedings from the Boston GNOME summit, and I believe this was on the TODO list.) It would be great if you could take the experience you have gotten with this project and bring it to GNOME’s CC! 🙂
Secondly, the distinction between “Screens and Graphics” and tools that uses RandR is just outright silly from a users POV. (Just because there is a distinct thechnical difference it doesn’t automatically mean there should be such a drastic difference between the tools. The user shouldn’t have to care.)
@Martin
I see your point, however I think that GNOME devs will develop their own program in C. Unfortunately I don’t have the time to teach myself C (at least at the moment) therefore I had to use Python and xrandr.
In the meantime you can use my program.
🙂
Oh, btw. To get it into GNOME it doesn’t necessarily have to be in C. Not sure how the GNOME CC developers look at it though.
Hello, the new Catalyst driver for Windows is go out. I think, the Catalyst LE 8.42 will go out since a little time. Will-you add this new driver on Envy?
pierluc:
sure
When I run it, I don’t get a gui… here’s the output with an external monitor connected… this is an i965 video chipset, with the intel driver running gutsy.
~$ urandr
/proc/5587/smaps
devices are [‘vga’, ‘lvds’, ‘tv’]
lista is [‘Screen 0: minimum 320 x 200, current 1440 x 900, maximum 1440 x 1440n’, ‘VGA connected (normal left inverted right)n’, ‘ 640×480 60.0 n’, ‘LVDS connected 1440×900+0+0 (normal left inverted right) 303mm x 190mmn’, ‘ 1440×900 60.0*+n’, ‘ 1280×800 60.0 n’, ‘ 1280×768 60.0 n’, ‘ 1024×768 60.0 n’, ‘ 800×600 60.3 n’, ‘ 640×480 59.9 n’, ‘TV disconnected (normal left inverted right)n’]
positions is [1, 3, 10]
vga is connected
lvds is connected
tmds does not exist — set as disconnected
tv is disconnected
{‘tv’: ‘disconnected’, ‘lvds’: ‘connected’, ‘tmds’: ‘disconnected’, ‘vga’: ‘connected’}
vgarot is VGA connected (normal left inverted right)
lvdsrot is LVDS connected 1440×900+0+0 (normal left inverted right) 303mm x 190mm
self.lvdsr is [‘LVDS’, ‘connected’, ‘1440×900+0+0’, ‘(normal’, ‘left’, ‘inverted’, ‘right)’, ‘303mm’, ‘x’, ‘190mmn’]
vgarot is VGA connected (normal left inverted right)
lvdsrot is LVDS connected 1440×900+0+0 (normal left inverted right) 303mm x 190mm
self.lvdsr is [‘LVDS’, ‘connected’, ‘1440×900+0+0’, ‘(normal’, ‘left’, ‘inverted’, ‘right)’, ‘303mm’, ‘x’, ‘190mmn’]
SPECIAL vga is connected
SPECIAL vga is connected
self.vgar is [‘VGA’, ‘connected’, ‘(normal’, ‘left’, ‘inverted’, ‘right)n’]
640×480 60.0
0
SPECIAL lvds is connected
SPECIAL lvds is connected
self.lvdsr is [‘LVDS’, ‘connected’, ‘1440×900+0+0’, ‘(normal’, ‘left’, ‘inverted’, ‘right)’, ‘303mm’, ‘x’, ‘190mmn’]
1440×900 60.0*+
0
@Byron:
type:
sudo apt-get install -f
and tell me what happens.
If nothing happens, post the output of:
sudo aptitude show python-glade2
sudo aptitude show python-gtk2
Alberto:
$ sudo apt-get install -f
Reading package lists… Done
Building dependency tree
Reading state information… Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
~$ sudo aptitude show python-glade2
Package: python-glade2
State: installed
Automatically installed: yes
Version: 2.12.0-0ubuntu2
:~$ sudo aptitude show python-gtk2
Package: python-gtk2
State: installed
Automatically installed: yes
Version: 2.12.0-0ubuntu2
I did manage to get xrandr working via the command line.
@Byron
what happens if you type:
cd /usr/share/urandr
python randrgtk.py
and post the entire output
Alberto: Here you go:
/usr/share/urandr$ python randrgtk.py
/proc/14101/smaps
[sudo] password for byron:
devices are [‘vga’, ‘lvds’, ‘tv’]
lista is [‘Screen 0: minimum 320 x 200, current 1440 x 900, maximum 1440 x 1440n’, ‘VGA disconnected (normal left inverted right)n’, ‘ 1024×768 60.0 n’, ‘LVDS connected 1440×900+0+0 (normal left inverted right) 303mm x 190mmn’, ‘ 1440×900 60.0*+n’, ‘ 1280×800 60.0 n’, ‘ 1280×768 60.0 n’, ‘ 1024×768 60.0 n’, ‘ 800×600 60.3 n’, ‘ 640×480 59.9 n’, ‘TV disconnected (normal left inverted right)n’]
positions is [1, 3, 10]
vga is disconnected
lvds is connected
tmds does not exist — set as disconnected
tv is disconnected
{‘tv’: ‘disconnected’, ‘lvds’: ‘connected’, ‘tmds’: ‘disconnected’, ‘vga’: ‘disconnected’}
vgarot is VGA disconnected (normal left inverted right)
lvdsrot is LVDS connected 1440×900+0+0 (normal left inverted right) 303mm x 190mm
self.lvdsr is [‘LVDS’, ‘connected’, ‘1440×900+0+0’, ‘(normal’, ‘left’, ‘inverted’, ‘right)’, ‘303mm’, ‘x’, ‘190mmn’]
SPECIAL vga is disconnected
SPECIAL vga is disconnected
SPECIAL lvds is connected
SPECIAL lvds is connected
self.lvdsr is [‘LVDS’, ‘connected’, ‘1440×900+0+0’, ‘(normal’, ‘left’, ‘inverted’, ‘right)’, ‘303mm’, ‘x’, ‘190mmn’]
1440×900 60.0*+
0
Traceback (most recent call last):
File “randrgtk.py”, line 1651, in
RandrguiMain()
File “randrgtk.py”, line 273, in __init__
self.devprobe()
File “randrgtk.py”, line 640, in devprobe
self.subdevcontrol()
File “randrgtk.py”, line 384, in subdevcontrol
self.detection.refine(i)#get resolutions and refresh rates
File “/usr/lib/python2.5/site-packages/URandR/randrback.py”, line 254, in refine
self.refr[ite].remove(‘n’)
ValueError: list.remove(x): x not in list
type:
xrandr > myfile.txt
and send me your myfile.txt via email, please.
You can get my email address here (the icon below “Contact”):
http://www.albertomilone.com/
Thanks
Hi Alberto – I can’t get urandr to work on openSUSE 10.3 (one thing it got installed in /usr/local/share, but that was not a big problem). It says that it does not support my graphics driver. I’m using ‘intel’ driver with a 955GM card, xrandr works fine…
What could be the problem?
@Saviq
How did you manage to install URandR on Opensuse?
You should just extract the source code and run urandr by typing:
sudo python randrgtk.py
Hiya,
Great stuff you’re doing here! I’ve written quite a lot on xrandr 1.2 and so forth on my blog, and happened upon your great little tool a while back. I’ve also written a script to switch output options with a keypress which is on my blog. Also, I’m sure you have the info but I have found some information which would help you save the xrandr configuration into xorg.conf. I’d be pretty sure you’ve already got it but if you need it, let me know and I’ll pass on what information I’ve gathered 🙂
Vicky
Dear Vicky,
I’m deliberately avoiding to set things permanently in xorg.conf so as to rely (almost entirely) upon what RandR detects.
In the future I might add the support for profiles (e.g. “home”, “work”, etc.). I’m not sure as to when these profiles should be enabled (either after the X session starts or when you launch URandR) but I know that I’ll try to make things as automated (and as simple) as possible.
A user (Spive) suggested this feature:
http://albertomilone.com/wordpress/?p=130#comments
I hope URandR works for you (since it now supports ATI cards as well) and should you have any suggestions, please let me know.
Alberto
i wonder if the kernel or hal generate hotplug-events when output devices are connected. i think in the future it would be the killer feature par excellence to have a monitor connected and profiles activated automatically.
And i dont know if its possible or even preferable, but additionally panels for new output devices could be created, saved, and destroyed depending on events
Hi
I using a lenovo T61 with a dell 24″, Urandr was fine, the only problem is that it sets my 24″ screen as my default screen and when i try to change it this is what i get : lvdscommandlist is [‘ –auto’]
command is xrandr –output LVDS –auto
xrandr –output VGA –auto
xrandr –output LVDS –auto
dev1 is lvds
dev2 is vga
select position is left-of
x1 = 1280
y1 = 800
x2 = 1920
y2 = 1200
Original Resolution:
xorig 3200
yorig 1200
New Virtual Resolution:
xvirt 3200
yvirt 1200
applysettings()
multi-command
positionapply
self.canbemulti
self.multiheadapply()
File “/usr/share/urandr/randrgtk.py”, line 1595, in multiheadapply
self.multicompute()
File “/usr/share/urandr/randrgtk.py”, line 1639, in multicompute
self.multicommand()
File “/usr/share/urandr/randrgtk.py”, line 1682, in multicommand
self.positionapply()
File “/usr/share/urandr/randrgtk.py”, line 1718, in positionapply
print ‘self.canbemulti’, self.canbemulti
AttributeError: RandrguiMain instance has no attribute ‘canbemulti’
Please help