Initial release of Python XRandR

Category: Ubuntu

 
Python-xrandr is a high level API for the RandR extension of the X.org server. RandR allows you to switch resolution, refresgh rate and output settings on the fly without having to hack the xorg.conf file or to restart your x server.

This is the intial release of python-xrandr. It supports some basic functions, e.g. setting your refresh rate, size and rotation (RandR 1.1) and enabling, disabling and postioning of outputs (RandR 1.2).

Python-xrandr comes with the command line tool pyxrandr. The tool is basically a rewrite of the original xrandr tool and a reference implementation of the bindings. See the man page or use the option --help for supported options. If you start pyxrandr without any options it will show you detailed information of your screens.

Here is a video that demonstrates the following two commands:

pyxrandr --output VGA --preferred --right-of LVDS

pyxrandr --output VGA --off

You can download a package for Ubuntu 'Gutsy' 7.10 here or add the following repository URL in System > Administration > Software Sources:

deb http://ppa.launchpad.net/displayconfig-gtk/ubuntu gutsy main

The source code is hosted in a bzr branch at Launchpad:

https://code.launchpad.net/~displayconfig-gtk/python-xrandr/main

Finally an example code which enables the DVI output:

from xrandr import xrandr

screen = xrandr.get_current_screen()

output = screen.get_output_by_name("DVI")

output.set_to_preferred_mode()

screen.apply_output_config()

Feel free to report bugs in our bug tracker or to send an email for comments and suggestions.

In the future python-xrandr will be used as an additional backend in displayconfig-gtk.


Update: I just release a small bug fix release 0.1.1 that solves a crash if no -dev packages have been installed and shrinks the screen after disabling an ouput

 
  1. Louis Vuitton UK Louis Vuitton UK

    Thursday, 10-05-12 05:55

    While everyone seems to have a (real or fake, sigh) Louis Vuitton UK Handbagsthese days, not everyone has This Louis Vuitton Sale bags. That’s pretty much a guarantee, unless there’s been a sudden increase in knockoff Minaudiere Bijou Louis Vuitton Outlet bags!

    The Oakley Sunglasses Thumps, which combine an MP3 player and headphones into a pair of Cheap Oakley Sunglasses, have been around since 2004. But because of their relatively high price
  2. chanel handbags 2012 chanel handbags 2012

    Monday, 07-05-12 10:08

  3. chanel handbags 2012 chanel handbags 2012

    Monday, 07-05-12 10:08

  4. yblwyvis yblwyvis

    Saturday, 28-04-12 15:34

    mhaykzg
  5. badjhn badjhn

    Saturday, 28-04-12 15:30

    tlbxlt
1 2 3 4 5 6 7 8 9 10 Next
 

CAPTCHA image for SPAM prevention