Hacker News new | past | comments | ask | show | jobs | submit login

Can I just say how happy I am with Xfce. It's a Linux desktop environment that looks like in the early 2000s. It's fast. There are no unnecessary frills. It just gets the job done. Its release cycles are measured in several years, and keep it minimal. I used to be on Windows, then macOS, then Ubuntu and now this. As a developer with soon to be 20 years of experience, it's the best environment I've had.



So was I until I switch to a 4k monitor and realize that there's no real, stable, functional fractional scaling on Linux, even less so on XFCE, unfortunately.


I main Linux on virtually every one of my computers, and I love it. I wouldn't switch off Linux if you paid me. But this complaint is spot on. It drives me crazy that we still don't have good support for higher resolutions.

And there's nobody else to blame for that -- we've known for ages that 4K and fractional scaling was going to be a thing, just like we've known for ages that touchscreens were going to be a thing.

But nope, let's just measure everything in pixels. It's like the majority of native developers on Linux all looked at responsive design on the web and thought, "I'm pretty sure that's just a fad." Everybody just dug in their heels almost on principle or something and refused to make it a priority, and now we're behind both Windows and Mac when it comes to high-resolution touch devices.

And I still run into people who argue that what we should just scale the physical size of a pixel for the entire desktop by a percentage, just so we can keep building fixed layouts that absolute position all of their elements. At a certain point, it feels more like a cultural problem than a technical one.

Everybody else is doing responsive design. QT already supports `em` units (well, sort of[0]). We could be using them on Linux.

[0]: https://doc.qt.io/qt-5/stylesheet-reference.html#length


Protip: ignore "scaling".

Step 1: put 'xrandr --dpi <your actual DPI>' in .xinitrc

Step 2: Use QT applications (Plasma is a fantastic QT desktop)

Step 3: Enjoy your reasonably sized everything.

"Scaling" is a broken concept to work around applications assuming 96 DPI (which is considered scale=1). You don't need it if you use programs that actually respect your real DPI. Unfortunately X11 doesn't properly compute DPI settings, even though EDID information generally contains the screen size - I imagine, for fear of breaking stuff.

(You can correct GTK3/GDK applications by setting GDK_DPI_SCALE=<actual dpi / 96>, but in my view it's a sin that you need to do that)


Thank you. I struggle to understand people that claim linux does not do hidpi.


Try using Linux on a laptop with an hdpi internal monitor, and a regular old external. It's a guaranteed way to generate a daily urge to throttle yourself. (Using Gnome in my case rather than XFCE, but it's still an unparalleled shitshow)


I used a lot of mixed screens with KDE, from 150 DPI laptops to 30 DPI tvs to my main desk setup having DPIs of 105, 125, 155, and 115 respecitvely.

GTK3 and Qt5 software works great, anything else is a pot shot.


My work laptop is in this situation and it got to the point where I just ran the eDP display in 1080p instead. Honestly on a 15 in screen where I'm only doing code and not editing photos, there's no point in running it in UHD.


I dismissed this initially out of a felt need to max out the use of my hardware. But actually it does solve some problems. I prefer native resolution + 200% scaling when using laptop (also a 15") on its own. But given the laptop screen is further away when I'm plugged in at the desk, 1080p is more than adequate. It also means I can go back to Xorg, which obviates some Wayland bugginess.

So thanks for the idea - it truly had never occurred to me (oddly).


Depends on your distro but on Debian+XFCE I use ARandR (front-end to xrandr cli tool, which is a front-end to xorg's randr). Laptop plus external monitor works great, with auto-config on connect and other stuff.


This is the biggest thing keeping me from leaving the Mac for Linux, and it hasn’t really improved much in the last 4 years. I don’t think most people care about HighDPI (or whatever you want to call it), particularly Linux devs. But I can’t go back to lower DPI screens.


I do care about high dpi but not in the way most people seem to mean: I want as much text as readable on a screen. One of the many reasons for not using Gnome everything is that it insists on making everything SO BIG with enormous amounts of wasted space around it. Those 1600x1200 pixels on my laptop or 1920x1280 on the monitor are there to be used, not wasted. Firefox used to be another offender in this respect albeit one which is easier to tame - just change layout.css.devPixelsPerPx to something sensible (0.7 works quite well), move all controls to the navigation bar and close all toolbars.


I have used GNOME with HiDPI for two years on Wayland and it is great. Even Tk apps seem to support HiDPI these days.

However, this is all assuming that 2x scaling is fine for you, support for fractional scaling is not great yet.


Ubuntu 18.04 using 2x scaling is broken in lots of little ways for me.

From the simple (boot screen runs at 1x so text is unreadable) to the wierd (VirtualBox tangle of bugs), to the frustrating (dolphin file manager, which I use to avoid UI bugs in the gnome file manager).

I found workarounds for some issues, and maybe they are fixed in the next LTS, but there is no way I could recommend 18.04 with 4k to a non-professional.


Nah it's too big on a 28" 4k, trust me I tried everything before going back to Windows, even using Gnome Shell (which I despise) and experimental fractional scaling (which barely works, freezes and scales back to 100% randomly)


> I don’t think most people care about HighDPI (or whatever you want to call it), particularly Linux devs. But I can’t go back to lower DPI screens.

I find this surprising. I'd say anyone who does any serious amount of multitasking (whether a Linux dev or not) would easily want one. I think people do care but they are just waiting on better pricing/availability.


> I find this surprising. I'd say anyone who does any serious amount of multitasking (whether a Linux dev or not) would easily want one.

I would have thought so too, but this isn't my experience. The smartest developers I know at my current job still develop with old laptops with awful 720p screens (I mean, awful beyond just the low res) and can't be bothered to attach an external Full HD monitor, let alone ask for a 4K one. And still they are brilliant, produce great software, and are key when planning profound software changes in the company. These are people who I deeply admire and from whom I always learn something valuable when they speak. Keep in mind they are also developers, not "whiteboard engineers".

My conclusion is that we nerds tend to overestimate ergonomics, because they are easier to see ("pff, I can only type with a mechanical keyboard!", "how can people code with fewer than three 4K monitors!"), but the actual bottlenecks and difficulties of building complex software lie elsewhere.

I still can't stand 720p screens though.


My experience with hiDPI on Linux has been pretty varied. On GNOME, everything just works, and I recommend GNOME to most first-time Linux users. I use i3, and the scaling situation there involves setting some environment variables globally, but is otherwise fine (GDK_scale or something like that). The only issue I usually run into is when Firefox opens my file browser, which breaks the scaling somehow. Other than that, hiDPI is as good as it is in windows. MacOS definitely leads in that regard, but things have certainly gotten better to the point of not really worrying about it in Linux these days.


Seconding i3. I bought into vim when the evangelists came for me early in my career and it has payed wonderful dividends. I can't recommend i3wm for everyone but for those who like keeping their hands on the keyboard and want the wm to just get out of their way, i3 is perfect.


I think things will improve as more Linux devs get HiDPI monitors (ones with good IPS panels are still quite expensive). Ubuntu has some beta-level support for fractional scaling but it looked awful when I tried it. But I live in hope that it'll all be sorted out soon!


> On GNOME, everything just works

This is far from true. Gnome shell itself is mostly OK (if buggy), but only a minority of real apps work properly. The standard Gnome apps (Nautilus, Gnome Shell etc) are fine, but that's where the support pretty much stops.


I prefer low DPI monitors, i just like the pixels :-P.

(writing this from a 23" 1366x768 desktop monitor)

And honestly a lot of things are so broken in hidpi anyway that i do not see a reason to bother.


Qt 5.14 is now in beta and has a toggle switch to do per-display scaling based off DPI on all platforms.

I've had a 4k 27" monitor mixed with 1080p and 1440p monitors of varying sizes for years and have managed to get 90% of software working great, and whenever I dip into Wayland get to use the fractional scaling there it goes up to 99% of software.


Interesting. I've never really cared too much beyond a color calibrator (x-rite). What is an example of a HighDPI screen that will only work with Mac?


2.5K monitor with slightly bigger fonts and a few tweaks here and there is best of worlds on linux now, sadly


I used Mac and Windows before, they are no way better, they all come with their own shortcomings

At least XFCE just works


By using a combo of xrandr and Xfce's hi dpi setting, I've managed to make my linux desktop more stable, functional and consistent across a 4k screen and a 1920*1200 screen next to it than Windows can manage.

Sure, I had to put in a bit of effort, but now that I have the results are excellent, there's no scale jumping or even the weird rendering MacOS does when moving windows around.


Until you get new hardware and have to do the whole dance again.

Now that I'm older, it's just a waste of time.


It's not much of a dance now I've figured it out.

It's worth it to me and like I say - it works better than than windows or even OS X on the same screen setup.

If that's of no value to you, that's up to you I guess. I'm in my 40s so no spring chicken...


I would really appreciate if you could share some of your findings there.


Honestly I just had to switch window scaling to 2x in the Xfce appearance settings, then I run this to fix my layout on each login, giving me a consistent size and no weird rendering -

#!/bin/bash

xrandr --output HDMI-0 --mode 1920x1200 --pos 0x100 --scale 1.5x1.5 --output DP-4 --mode 3840x2160 --primary --scale 1x1 --pos 2880x-150

AFAICT this effectively renders the smaller screen as if it had a much larger resolution (2880x1800), then downscales, giving a good quality image, and then positions the 4k screen to the right of it. The key is the scale factor compensating for different DPI on the different screens.

I tried scaling the other way first, by giving a sub-1.0 scaling factor to the 4k screen, but that meant rendering a lower res and then upscaling, which looked terrible!

The only annoyance now that I have this set up is that occasionaly driver updates change which output is which and I have to update the script so it works again.


Yes, please share! How did you deal with the window title bars?


Not sure I did anything special, I'm using the clearlooks theme with some customisation of the fonts. See the other answer for how I sorted out the res/DPI stuff.


KDE has excellent support for fractional scaling, to a single decimal point. It is also a very lightweight and fast desktop environment, but has plenty of useful features.


I did try with Plasma on both Kubuntu and Arch at 1.2 and in both cases some controls had very ugly and/or blurry fonts and some were fine. The inconsistencies were too annoying.


typing this from a Linux desktop on a 4k screen, don't understand what does not work ? I can set whatever dpi in my .Xresources's Xft.dpi key and it looks fine


until you plugin a second simple HD monitor and everything looks huge on it


This lol and the tiny title bars that can't be resized in XFCE unless editing the XFWM theme images (unlike Mutter where the title bar size can be changed in a file).

Sorry but I don't have time for this anymore. I would have on my SUSE box in 2003.


Not if you use Wayland. GNOME with Wayland works fine with screens with different DPIs.


Gnome does, but a WM that works isn't much use without apps that do likewise. Linux desktop software support for hdpi is an absurd mess. Some apps can switch resolution when you move them between screens. Others can't. When you combine this with Gnome's inability to deterministically start an app on the main monitor, this means sometimes it's sometimes literally impossible to get an app in the resolution & on the screen you want. Some apps start up with an apparently random resolution (Calibre, I'm looking at you!). What a horror show it is.


Wayland sort-of handles this. That is to say you can set scaling per-screen without xrandr hacks (with Gnome anyway, not sure about xfce). But there's such a variation in support from apps, it's still a mess).


It's actually quite good now using Gnome with Wayland on Arch Linux (latest releases of the various components).

Only a few apps have given me trouble in recent times.


Therefore I got a 4K monitor at 24 inches so that it would be usable at 200% scaling. For 27-30 inches I would aim for 5K.


I've run Linux (i3 window manager) on UHD screen since around 2015 when I bought this laptop:

https://battlepenguin.com/tech/msi-ws60-running-linux/

It isn't simple? no. You have different env variables for QT, GTK and xrander can set its own DPI as well. It is kinda a mess, but I use i3 so I figure I'm in for whatever pain I put myself into.

I've been running Linux on HiDPI devices for a couple of years now and I've got things sorted to where it's no an issue on any new device. I need to give Wayland/Sway another shot at some point. I hope it has better native zoom support than X11.


4k laptop monitor and 4k external monitor, XFCE4 2x works perfectly

I also use 2 different resolutions without problems

KDE plasma gives you fractional scaling

I've heard Wayland supports different scalings on different monitors, but I'm on Xorg so I can't say if it works


I feel the same way about i3 and not too far over the 20 year mark myself :)


I like and use XFCE as well, but how is that relevant to this post? haha


Yes, it is so solid and also easy to customize for keyboard navigation, etc.

Printing, wifi/vpn, keyring, graphics drivers... everything just works.


What are the language and dev tools that you use that allowed you to freely transit from one OS to another again and again? Thanks.


What Linux distro do you run Xfce on?


Just Debian.


I'm posting in the Linux thread because it's probably annoying to some to see 'but I moved to Linux' threads throughout this comment.

But the original post is very sobering.

I left OS X a few years back when the new laptop came out. Partly the whole USB-C thing I suppose, but I felt that there was pretty good hardware around and the new MBP didn't really shine (and was fiercely expensive). So I made the move to Ubuntu on some new Lenovo hardware (Carbon X1).

I really look forward to the twice-yearly Ubuntu releases. More of the same, rarely any huge new surprises and just generally more polish. I upgraded to Ubuntu 19.10 immediately once the 19.10beta came out and it seems speedier.

I'm sorry to see Mac users get so badly burnt but I'm very glad I made the decision to leave when I did.


An X1 with Ubuntu is butter-smooth


I think the Apple touchpads are the best in the industry, along with the displays as well.


The displays are good, but you get similarly good displays on similarly priced machines.

https://www.notebookcheck.net/The-Best-Notebook-Displays-As-...

For the touchpad I am undecided how much here is software and how much is hardware. E.g. install ubuntu on a macbook, is the touchpad still great or just average?


Does systemd not bother you?


Xubuntu all day every day (seriously, I've been on Xubuntu for the past 5 years and I love it)


I've been running fluxbox on Debian since ~2002. Works great; does everything I need.


> Can I just say how happy I am with Xfce.

Yes.

> There are no unnecessary frills.

My macOs machine doesn't have them either.

> It just gets the job done.

Mine does as well.

Do you want to talk about frills?




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: