Skip to content

Instantly share code, notes, and snippets.

@unsalted
Last active November 18, 2016 15:32
Show Gist options
  • Save unsalted/b63e7cdd54ba967599dde96b8855fd07 to your computer and use it in GitHub Desktop.
Save unsalted/b63e7cdd54ba967599dde96b8855fd07 to your computer and use it in GitHub Desktop.

Gist for keeping track of setting up Lenovo Thinkpad x240 with Kubuntu 16.04

High DPI setup

xdpyinfo | grep -B2 resolution ``

screen #0:
  dimensions:    1920x1080 pixels (512x260 millimeters)
  resolution:    96x96 dots per inch

Returns wrong values for dimensions. Actual values shoud be 276x155

Divide screen reslotion by number screen width (converting inches ) 1920/(276/25.4) returns 176.69

set dpi and check values

xrandr --dpi 176.7x176.7
xdpyinfo | grep dots
screen #0:
  dimensions:    1920x1080 pixels (276x155 millimeters)
  resolution:    177x177 dots per inch

Save it to /etc/X11/Xsession.d/77set_dpi So that it works on startup

nano /etc/X11/Xsession.d/77set_dpi
# enter values
xrandr --dpi 176.7x176.7

Save .Xresources in /home/USER/

Xft.dpi: 177
Xft.autohint: 0
Xft.lcdfilter: lcddefault
Xft.hintstyle: hintslight
Xft.hinting: 1
Xft.antialias: 1
Xft.rgba: rgb

Set System Settings/Fonts/Force fonts DPI to set the DPI for scaling.

Set System Settings/Display and Monitor/Display Configuration/Scale Display to desired scaling - I used 1.6

Not tested but mentioned elsewhere

#put this into /etc/X11/xorg.conf.d/90-monitor.conf

Section "Monitor"
  Identifier ""
  DisplaySize 293 165 # xrandr reports 294, but 293 makes it 277x277dpi instead of 276x277
EndSection

Git install

sudo apt-get update;
sudo apt-get install git;

Completed the following gist for Go and Hub Go Gist

Build essentials

sudo apt-get install build-essential 

Dropbox dependency

sudo apt-get install python-gpgme

Python/pip

sudo apt-get install python-pip

ruby update

sudo apt-get install ruby-dev

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment