Ubuntu Unity: Changing from High DPI to Dual Monitors

I’ve been running Ubuntu Desktop on my desktop machine at home for a few years now (I put together a great system in January 2014). Just recently, in November 2014, I switched my work laptop from a retina MacBook Pro to a Dell XPS 15 (High DPI w/ touchscreen: amazon.com ) running Ubuntu Desktop 14.04. For some reason, I prefer Linux to OS X, I guess I’m weird, heh.

The screen on this model is a 3200x1800 touchscreen, and text looks just as good (if not better) than the retina MacBook does at max DPI.

The problem is: it’s Linux, so…high DPI is not exactly a well supported feature throughout the ecosystem.

At the time I received the Dell, it was pointless trying to run day to day work activities in high DPI. Everything looked all jacked up, whether it was browsing the web in Chrome or Firefox, editing text with Sublime Text, chatting in HipChat, querying postgresql with PgAdmin, or looking at source trees in TortoiseHG, amongst other things. Odd stuff like this was commonplace:

I tried all kinds of hacks and settings to get things working nicely, but alas, it was frustrating, and it was just easier to run in 1920x1080. It still looked ok, but it wasn’t as good as it could be.

This pissed me off, obviously ;-)

Last week, I saw an update for Chromium. Every time I see an update for Chromium, I try it on high DPI. Lo and behold, they finally have scaling working properly! Huzzah! This is what it looks like now:

Present day Chromium

So I put in a bit more work, and I’m happy to say my entire workflow can be sustained in high DPI, with a few caveats that I can put up with.

Thanks, QT

So this is great when I’m just using the laptop, but what about when I go to the office and use my second monitor?

Like I said, I’m on 14.04, so this might be better (or hopefully unnecessary) in 14.10 or 15.04 (PLEASE let me know in the comments if it’s the case!), but I just whipped up a couple very simple scripts to run when I switch between the two.



dconf write /com/ubuntu/user-interface/scale-factor "{'DP1': 8, 'eDP1': 16}"
gsettings set org.gnome.desktop.interface text-scaling-factor '1.25'



dconf write /com/ubuntu/user-interface/scale-factor "{'DP1': 8, 'eDP1': 8}"
gsettings set org.gnome.desktop.interface text-scaling-factor '1.0'

What these scripts do, basically, is just automate setting the Text Scaling Factor from Unity Tweak Tool and the Scaling Factor from Settings -> Displays menu. You’ll need to find the settings for your specific system, these posts helped me out:



It’s annoying to have to run a script each time I switch from just the laptop to using my external monitor at work. It’s all worth for those beautiful looking, high DPI fonts though!

Hopefully soon I won’t need any of this and high DPI in Unity will Just Work™. A lot of people tell me to switch to GNOME or KDE or xfce. I’ve used all those, and while they are great in their own right, I’ve come to like Unity. It should work well here, too. It seems like all the problematic apps are using QT. Could be a coincidence.


comments powered by Disqus