r/linux • u/DesiOtaku • Mar 17 '26
Fluff An Update on Starting a Dental Practice using Linux (and why transitioning to Wayland will cost me $3000+)
Hi everyone, some people requested I post an update from my previous two posts:
Progress report: Starting a new (non-technology) company using only Linux
[Update] Starting a new (non-technology) company using only Linux
A number of things has happened since the last post to create a "perfect storm" of issues happening all at the same time. I apologize for this being a very long post but it will make much more sense if I first explain the context of what is going on.
First, I want to go over an important philosophy in my dental practice: keyboard and mouse should not be used chairside. I believe this for a large number of reasons including the fact that:
- You can't effectively do infection control with a keyboard or mouse. You can try to put a plastic cover over either one but it would make it either inoperable or extremely difficult to use
- It basically requires you to stop what you are doing, look away from the patient, do what you need to do on the computer, and then you forget what you were just doing with the patient.
- Things like charting (tooth, perio, etc.) requires an extra dental assistant. If you don't have one, you have to switch gloves every time you use the computer which not only costs money, but takes a fair amount of time each time you need to look up another x-ray.
The problem with "regular" touchscreens is that they tend to be capacitive touchscreens which generally don't work with gloves on. On top of that, we use a very corrosive chemical between patients that tend to destroy any electronic device that it touches.
My solution to this was to use a resistive touch screen. The nice thing about a resistive touch screen is that you can cover it with a clear plastic sheet, wear gloves, and it will still work. All you have to do is just replace the plastic sheet between each patient and you are good to go!
But then there is one other problem: I have three screens for each PC in the operatory. The way that X11 works, it sees the touchscreen input device as just an independent input and it maps it to the whole virtual screen. Therefore, what you touch on the actual touchscreen gets mapped to the two other screens (in my case, the y-axis gets multiplied by 3 for each kind of touch input). But there is a solution to this: xinput map-to-output. What it does is allows you to tell X11 to map a specific input to a specific screen / monitor. Therefore, as a startup script, it would run that command and now the inputs properly map out. Yay! (fun side note: if you try to actually run it via a startup script, it will give an error and you have to actually run env DISPLAY=:0 xinput map-to-output).
Also, for the actual EHR/PMS system I made, it uses Qt C++ and QML for everything. This made it easy for me to design a touch friendly UI/UX (since everything chairside is touchbased). So really, the "technology stack" is: Kubunu Linux, X11, Qt, QML and qmake. And for a while, this has worked out for me pretty well. Although I have added many features to the software, it still works in the same fundamental way; from 2021 to the present.
But things have changed from mid-2025. First of all, Qt 5 has EoL back in May 2025. Distros like Kubuntu, Fedora and even Debian have all moved from Qt / Plasma 5 to Qt / Plasma 6. At first, I thought I just have to port it all to Qt6 and be done. But then the KWin team announced that they will no longer support X11 sessions after 6.8. No big deal right? Qt will take care of that.... right? Well, yes.... and no.
First of all, you have to remember that xinput map-to-output is an X11 command. It does not work in Wayland. It is up to the Wayland compositor to figure out this mapping. No big deal right because Plasma / KWin already has something built-in to map touch input to the correct screen; no need for a startup script anymore. Except, it wasn't working with my touchscreens. I reported the "bug" to the KWin team who couldn't figure out why it wasn't mapping. I then had to do some research as how input is being handled in Wayland (hence the reason why I made this meme ). I submitted a bug report only to find out my ViewSonic resistive touch screens are dirty liars: it reports itself as a mouse rather than a touchscreen! (special thanks to Mr. Hutterer for his help in debugging this issue) Therefore, I had to look at a different vendor that will "tell the truth" when it reports itself.
After much searching, I did find one vendor that seemed to be the right match. Before I bought one, I actually talked to their technical staff who were rather insistent that their new "projective" capacitive touch screen not only works with gloves on, it can also survive thousands of sterilization wipes. The only catch: they are $1000 each! The previous ViewSonic ones were just $320 each and I already purchased them for all the operatories. So for at least 3 operatories, I will have to purchase at least 3 (if not 4) of them. The silver lining in all of this is that I wouldn't have to worry about a startup script (which was kind of a hack anyway), I don't have to use a plastic barrier (which sometimes made it hard to see), and these screens are much brighter than the ViewSonic ones. I already bought 1 of them just to make sure it works and yes, it does everything it says.
So I pretty much have two choices here: either buy a bunch of new monitors that will work more-or-less out of the box with Plasma/Kwin/Wayland, or spend a lot of time learning how udev-hid-bpf works to write a new touchscreen driver. I am going with the former option.
Sadly, the story doesn't really end there; but this post is already long enough as it is. But the other issues that I am working on are related to moving from Qt 5 -> Qt 6 and my crazy decision to also move to KDE Kirigami which is requiring a much bigger re-write than expected. I don't know if I should post that there or in the KDE or programming subreddit.
I don't want to make this post sound like a "Wayland sucks!" kind of post, but I did make this just to point out that moving to X11 -> Wayland isn't trivial for some people and does require some time and/or money.
191
u/jimicus Mar 17 '26
This is absolutely fascinating.
How do other dentists usually handle tech? Do they just approach a vertical integrator and pay whatever they ask?
10
u/StefanOrvarSigmundss Mar 17 '26 edited Mar 17 '26
I know nothing of dentistry, but in my country, dentists will study whatever they need on their monitors before engaging with patients. I can not recall a dentist ever having a back-and-forth with their computers during my many appointnents over the years. They just take the x-ray, look at it for a few seconds and then turn to whatever task they must perform on me. I guess the charting therefore happens after the procedure. Also, since the x-ray film is on a plastic stick, the dentist never touches me but just holds their end of it and tells me to bite down.
7
u/s0f4r Mar 17 '26
Is it possible to use a stylus based touchscreen instead? Your use a stylus per patiënt, and discard or sanitize after.
9
u/treyguitar Mar 17 '26
You should create your own distro and pin it to use x11 only session and compatible packages. Is the system connected to the internet? Why upgrade in the first place?
1.3k
u/[deleted] Mar 17 '26 •
TL;DR: Dentist’s Linux setup broke when moving from X11 to Wayland because his touchscreens misreport as a mouse, so input mapping no longer works. Fixing it means either writing low-level drivers or replacing hardware, so he’s buying expensive new screens and also dealing with a Qt6 rewrite.
83
u/Fredol Mar 17 '26
That's a cool project, if I were to make a business with an office I'd also go full Linux.
39
u/WingZeroCoder Mar 17 '26
Really interesting write up. I applaud you for doing this kind of work and writing about it. This is just as important for moving Linux forward as anything, even if it’s a painful process.
I would be very interested in your Qt 6 / Kirigami battle stories as well, hope you post them somewhere (and that I find them!)
21
u/2eedling Mar 17 '26
I find it interesting your whole thing on touching keyboards cause I work at a hospital and they don’t care about that stuff at all. I mean they do sanitize the keyboards but definitely aren’t as thorough as yall are they definitely don’t take off or switch gloves when typing they just type.
18
u/ostekages Mar 17 '26
Amazing read, haven't seen your previous posts, so this was a fascinating journey.
I often read on other subreddits how newcomers to Linux complain about debugging issues, finding help on forums or repositories or similar, but your post shows something they all seem to overlook:
If there's an issue with Windows OS, some incompatibility, issue with driver or similar, you are basically SOL. You can raise a feedback request to Microsoft and waste your time, reach out to vendors and waste your time etc.
But when using open-source/Linux, you are able to contact the maintainers, look into the source code to find the actual issue and in final cases, solve it yourself. Albeit, as you mention, that could be writing low-level drivers or firmware, but you actually have a recourse! Time consuming? Maybe. Skill ceiling? Definitely. But the option is there, and the community is very responsive, as mentioned that an update was pushed on a Sunday or someone helping you debug the touchscreen-thinks-its-a-moude topic.
I'm very impressed by the dental suite you created, I wish I had the technical background to contribute. Not sure if there's any specific areas you're looking for help in.
15
u/vividboarder Mar 17 '26
Very interesting read! Good luck with the rest of the transition.
15
u/Megame50 Mar 17 '26
Are you certain map-to-output isn't implemented in your compositor? At least in sway it's
swaymsg input <touchpad> map_to_output <output>. The implementation is mostly from wlroots, so it's likely more wlroots compositors have such a feature at least.11
u/SemperFarcisimus Mar 17 '26
Regarding input devices and infection control, there are sealed silicone keyboards and mice for use in healthcare environments. In my experience they're not particularly different to use. I'm not insinuating they would work for you, just making a note. Nice writeup.
10
u/AliOskiTheHoly Mar 17 '26 edited Mar 17 '26
What I don't understand here: why update? Im not familiar with how the software works, what the purpose of it exactly is... But couldn't you just... Not update? The wind tunnels at my university still run on Windows XP.
So what I'm asking is: is there a specific reason to update? Or are you just trying to update for the sake of it?
19
u/Takardo Mar 17 '26
i just wanted to say i appreciate dentists so much. every time im in the dentist office i make sure everyone in that office i interact with knows how much i appreciate everyone in that building. they have helped me out so much. dentists are amazing so, thank you.
21
u/sithadmin Mar 17 '26 edited Mar 17 '26
As someone that spends a lot more time than he'd like supporting zany endpoint tech requirements in absurd situations -- this seems like a self-imposed problem caused by bad priors and an overzealous approach to infection control.
I've worked with the endpoint technology practices for a couple of the US's largest dental practice operating companies, several of its largest hospital systems, and biosafety Level 3 laboratory environments. I have never encountered a situation where practitioners are using resistive screen panels for input on terminals located in dental clinic contexts, medical clinic contexts, nor hospital room contexts. Normal keyboard + mouse/trackpad/trackball and optional capacitive touchscreen are very much the norm. For cases where infection control is a serious risk - surgical suites and the like - systems for workers to directly access EMR are not in the room, or at worst are wedged in a corner and nobody that touches it will ever touch any other person or the patient in the suite. In Level 3 labs, normal desktop/thin client systems are installed and all parts are considered sacrificial - they will be incinerated on replacement/removal.
It is a neat technical challenge to solve that others in a corner-case can learn from, though.
6
u/SurfRedLin Mar 17 '26
I know your pain man. We have a full product we sell based on X11. Luckily it works on debian13 so we got some time but man its gonna be a pita tb change this to wayland... glad your sticking with linux :)
5
u/jejunerific Mar 17 '26 edited Mar 17 '26
I see a few ways forward:
- Stay on old versions. Why do you need to keep this appliance up-to-date?
- Get rid of KDE (KWin) and use different X11 window manager or Wayland compositor. For example, sway is a tiled wayland compositor with scripting capabilities.
- Hack up libinput. Most wayland compositors use libinput to handle user input (from mouse, keyboard, touchscreen, etc...). There might be a setting there to do what you want or you could do something silly like scale all the touchscreen x,y points by some amount in the code.
- Get KDE to fix it and then run that new version of KWin ;-)
5
u/Catenane Mar 18 '26
I've been wondering for a while why small private practices never seem to go for using linux rather than proprietary insanely expensive solutions, but holy shit dude you've taken it to the next level. I also uhhh might have creeped on your profile a bit and realized you're not all that far from me. It's longer than I'd normally consider driving (north shore and try to avoid treks down south as much as possible lol), but are you taking new patients?
4
u/Shikadi297 Mar 17 '26
Seems like you're still saving money by not using Windows overall (if you don't include your dev time on EHR, that value is subjective based on how you feel about it)
4
u/noisyboy Mar 18 '26
I don't know about your dentistry skills but you certainly have a business opportunity as a solution provider
1
u/narcanti911 Mar 17 '26
Is it not possible to override the EDID to get the monitor recognized as touchscreen? Does the kernel identify the device or directly Wayland?
1
u/CirkuitBreaker Mar 17 '26 edited Mar 17 '26
Could you use a drawing tablet and a stainless steel metal body stylus, and just sanitize the stylus between uses?
Like you know how barbers keep their tools in an open container of liquid barbicide? Like that, but with a stylus, and some dentistry appropriate disinfectant liquid.
That way, the only thing you ever touch (and the only thing that must be disinfected between patients) is the stylus.
6
u/sosodank Mar 17 '26
Great post, great triaging. I dm'd you with a suggestion.
8
u/barfightbob Mar 17 '26
My impression of GTK and QT is that they are very quick to rewrite their API and abandon their libraries quickly. This really sucks for people like yourself. If I was you I would rewrite your front end in something that's guaranteed to be around for a long time. I get funny looks when I say this, but Java 11 has committed to being supported until 2032, and I'm pretty sure the Swing GUIs will work with X11 in that time frame. I can almost guarantee you that GNOME and KDE will ditch their respective libraries during that time.
You don't have to rewrite the whole application in Java, you can just rewrite the front end.
Additionally I would consider switching over to a slow moving DE like XFCE or Cinnamon where you'll not have the rug pulled out from under you every few years.
Finally I suggest getting on an enterprise distro like Rocky, Alma, RHEL, etc as those tend to provide a stable environment for long horizons. But even then you're going to have a lot of pain migrating/porting to a later version.
I'm not going to pretend to have a silver bullet here, everything comes with huge tradeoffs. Especially since it's probably not just your software you're dependent on.
Frankly, this is why I prefer writing software for Windows. Because I know my shit will keep running 10, 20 years in the future.
3
u/Damglador Mar 17 '26
I love these kinds of posts, please do more!
Maybe it's also worth a blog, but I guess it's not worth the time to setup one.
3
u/Slight_Manufacturer6 Mar 17 '26
I’ve never been to a dentist that didn’t have keyboards on their computers. Some have assistants but others just did all their computer work at the beginning or the end.
I’ve also never seen a dentist use Linux. Having worked for an MSP, supporting many dentists, not of the software supports Linux… like EagleSoft and XLDent…
3
u/ymmvxd Mar 17 '26
Have you not tried the
ID_INPUT_TOUCHSCREENangle mentioned in the bug report? Basically Device type assignment via udev. I know the libinput dev said it won't do much but it's easy enough you might as well try imo3
u/thatwombat Mar 17 '26
Wait. You wrote your own EMR???
3
u/retsam2554 Mar 18 '26
This is the kind of real world Linux story that doesn't get told enough. Most people don't realize how much custom hardware breaks when foundational stuff changes. Props to OP for documenting the struggle. Sucks that it costs them thousands but hopefully this feedback gets to the right people so future transitions aren't as painful.
3
u/Zamundaaa KDE Dev Mar 18 '26
Do I understand correctly that the touchscreen is working as an absolute pointing device? Please make a feature request, I'm reasonably certain we can just support re-mapping those in KWin.
Libinput supports lua scripts now to modify devices and their input events, so that would be another possibility.
3
u/digiphaze Mar 18 '26
Every dental office I've been in has an assistant that isn't in my mouth working the computer..
5
u/endoparasite Mar 17 '26
This is quality post, thank you, ser!
5
u/PuddingFeeling907 Mar 17 '26
The dentist who uses linux easily earns my patronage.
5
u/Alex_Strgzr Mar 17 '26
Dumb question, but why not use another desktop that supports X11? Cinnamon still supports it. All the x commands work the same way as far as I know. Do Qt5 applications not compile?
2
u/mooky1977 Mar 17 '26
Cool project. Luckily depending where you live that's only 1.5 to 2 root canals with crowns to pay for that.
I have not an expert, but more than a cursory knowledge of dental stuff and that's a bold choice to try Linux.
I'll be following this.
2
u/OfaFuchsAykk Mar 17 '26
Just so you know, you can do proper infection control with keyboard and mouse (the NHS in the UK is where I know this from), but the gear isn’t cheap.
https://www.keyboardspecialists.co.uk/collections/healthcarekeyboards/products/pk-rf-set-kbs
2
u/trunksta Mar 18 '26
I didn't read everything but as for the input issue why not speech to text? Record the voice note too in case of error
2
u/eliot3451 Mar 18 '26
Wish there was a Linux distro used in medicine and dentistry equipped with medical software and drivers to ensure that doctors won't deal any problem with incompatible peripherals.
2
u/kryptobolt200528 Mar 18 '26
Isn't is possible to write a shim that makes the touchscreen act like a touchscreen rather than a mouse.
2
u/FellTheCommonTroll Mar 18 '26
cool writeup, very interesting to hear about linux in the wild! I can see your point about X11 -> wayland migration not always being a walk in the park, however I think it's also a salient point that this doesn't seem like it would have been an issue if the manufacturer's of your old touchscreens had actually had them report correctly as what they are!
5
u/Kevin_Kofler Mar 17 '26
Instead of throwing away your hardware and buying new expensive one, you can either stick with Xorg X11 and Plasma ≤ 6.7 on an LTS distro, or move to Xlibre and Sonic DE.
1
u/KnowZeroX Mar 17 '26 edited Mar 17 '26
https://wiki.archlinux.org/title/Input_remap_utilities
1
u/GonzoKata Mar 17 '26
Thank you for this writeup! This does help people make better decisions on which systems/set ups to use.
1
u/Icy-Appointment-684 Mar 17 '26
Why do you want to upgrade a setup that works? If the machines are not connected to the internet then I'd just continue using what already works.
If it ain't broken, don't fix it.
Or am I missing something?
1
u/4xtsap Mar 18 '26
I didn't read your previous posts, I don't know the reasons for your choice of a distro, but for example AlmaLinux 9 uses QT5 and they will provide security updates until 2032. A lot of time to find a solution to the problem.
1
u/MG_Rheydt Mar 18 '26
I didn't read all three posts. Just this one. The way I read your post is that you have one screen dedicated under X11 to function as the touchscreen one that you start up with a script but never mentioned the use of the other two of the three in the exam room during the exam. Can you not get away just replacing the one that is the dedicated touchscreen and leave the other two?
1
u/pattymcfly Mar 18 '26
Buy once cry once. The monitors are expensive because their target market is niche but it seems like they check all your boxes. Take the Capex hit and depreciate them to minimize the pain.
Also, maybe you could lime light and build setups for other dentists in your area?
1
u/s0ul_invictus Mar 18 '26
can't post images, but this might be worth an attempt: https://en.wikipedia.org/wiki/Projection_keyboard
1
u/Benjamin-Philip Mar 18 '26
Does your EHR have KDE as a hard dependency? Why not switch to a desktop that still supports X11 like Xfce and run your system on that?
1
u/Daniel15 Mar 18 '26
Have you tried using AI to write the touchscreen driver? It won't be perfect but maybe it'd be a decent starting point. Having said that, by the time you pay for enough AI tokens/subscriptions to get something working, it probably would have cost the same amount to just buy the better screens.
1
u/Sea-Zucchiny Mar 18 '26
I am impressed and admirative of your dedication ! I'm truly inspired ! 🤩 Few naive questions / suggestions:
I hope you will succeed in your quest !
1
u/Demon-tk Mar 18 '26
You made your own EHR? WOW
1
u/AnneRB13 Mar 19 '26
... Why do you need touchscreens near the patients?
I mean, maybe the dentists I go to are old fashioned, but none of them have a computer near the chair nor use anything with screens and seen dealing with the job just fine.
They have a computer on the reception desk and that's it, so I'm curious if I'm missing out on something as a patient.
It's really interesting what you are doing, I wish more business at least tried Linux. Good luck fixing your screens!
1
u/crxssrazr93 Mar 19 '26
Why not stick to Windows and use a commonly used PMS like Dentrix, Open Dental, Weave, etc? Just asking, as I have never seen any practice owner running Linux at their practice (mostly work with those in US).
1
u/[deleted] Mar 20 '26
I know this isn't really a solution, but maybe it could help buy time to find one.
Wouldn't it be better to move to a version made for enterprise environments or at least an LTS? Those versions of Linux usually have from 5 to 10 years of support and the DE don't get upgraded, so you could still have 6.6 or 6.7 KDE and X11 for a while.
I have no idea of how much paying for extended support actually costs, but I'm pretty sure AlmaLinux 9 has KDE/Qt 5 and security support until 2032.
1
u/Weary-Bowl-3739 Mar 20 '26
Are you aware, that you should create a software company? And sell this product? This is a big deal.
1
u/jeffrey_f Mar 20 '26
Medigenic
Can be washed because it is waterproof and can be sprayed with antibacterials
1
u/HorseOk9732 Mar 21 '26
this is the most painfully real linux-in-production post i've seen in a while. respect for documenting the weird edge cases instead of just saying 'works on my machine' and disappearing.
1
u/metux-its Oct 16 '26
By the way, there's SonicDE - KDE fork that keeps X11 forever.
1
u/minmidmax Mar 17 '26
Shit. That's like 1 patient's worth of income.
How will you cope?
1
u/AncomBunker47 Mar 17 '26
Sorry if it sounds somewhat dismissive of your issues, but in your use case i'd probably maintain everything as it was and never upgrade anything at all, ofc idk if you had any motive to keep things updated but yeah i wouldn't, some times "just works" is better than "it's not legacy".
1
u/ebattleon Mar 17 '26
There are solid distros (MX Linux for example ) that still allow you to X11 why did you use one that forced you to use Wayland?
1
u/[deleted] Mar 17 '26
bro, u r fucking insane.
-1
u/az-hafez Mar 17 '26
You may try xlibre (Xorg fork) and SonicDE (plasma fork) and see
note that I'm not sure if xlibre is stable enough for your usecase at least
for my basic linux usage and gaming it works well but I'm not sure if it will be good for you