2015-05-18

Debian on a Dell XPS13: Part 3 - X

With console mode behaving nicely it's time to get X on the XPS13.

I started by installing a minimal X installation with my favourite window manager i3.  As with the console the huge resolution of the laptop rendered the whole screen really rather small!  The first step is to find out if X knows much about the display.  The following command when executed from an x-terminal will determine whether the display resolution has been detected properly:

$ xdpyinfo | grep -B 2 resolution
screen #0:
    dimensions:    3200x1800 pixels (846x476 millimeters)
    resolution:    96x96 dots per inch

Hmmm... good try X, but my screen definitely isn't almost 1 metre x 0.5 metres...  Time to teach X about the actual size of this display.  Modern XOrg installations don't often come with an xorg.conf file to make changes to - most of the configuration is done on the fly.  If you want to customise the configuration I believe the accepted method is with override files in /etc/X11/xorg.conf.d/.  To teach XOrg about the display I put the following into a new file called /etc/X11/xorg.conf.d/10-monitor.conf:

Section "Monitor"
    Identifier "<default monitor>"
    DisplaySize 423 238
EndSection

The DisplaySize option sets the physical size of the display in millimetres.  I just chose values that would give me a final resolution with a multiple of 96dpi.  Restarting X and repeating our previous command gives:

$ xdpyinfo | grep -B 2 resolution
screen #0:
    dimensions:    3200x1800 pixels (423x238 millimeters)
    resolution:    192x192 dots per inch

Looks pretty good!

The next step is to start configuring our apps to respect the resolution:

i3

Edit ~/.i3/config:
...
font pango: Inconsolata 12
...

rxvt

Edit ~/.Xresources:
...
URxvt.font:    xft:Inconsolata-12
...

Other resources

After these tweaks the system is mostly ready to use.  I'll continue to post anything I find useful about this laptop.  Other useful resources are:

No comments:

Post a Comment