> Modding XCalc
January 7, 2026
XCalc is a lightweight and highly configurable calculator program for the X Window System, originally written by John H. Bradley. It uses the X Athena Widgets (Xaw) graphical library.
This is a classic piece of software with a lot of history. The earliest version I could find was packaged with X.Org X11R1 (released in 1987), but there are probably even older versions still archived somewhere.
I typically use 'bc' in the terminal when a calculator is required, but sometimes it is handy to have a GUI tool available. This is when I reach for XCalc.
For comparison, here is the memory usage of 'galculator' (a popular calculator program for Gnome), vs the memory usage of XCalc:
galculator: 16M
XCalc: 1924K
Even though galculator is significantly less configurable than XCalc, it uses 8x more RAM and noticeably more CPU power.
Now I will get to the main point of this post, which is a modification/theme for XCalc. I call it "UnScientific Calc", because it strips away all of the scientific functions of the original, and just leaves a basic, no-frills arithmetic calculator with a modern dark look:
Most of the time I just want to do some basic arithmetic, so the scientific functions are unnecessary and just clutter the interface.
I wanted to do this mod for quite a while, but procrastinated due to the unknown difficulty level. It turned out to be easier than anticipated, although I ultimately spent a few hours to complete this project. That might seem like a lot just to change the look of a calculator, but overall I am happy with the way it turned out. It was time well spent on a cold and snowy winter evening!
Installation:
The cleanest way of installing is to replace the system-wide 'app-defaults' file for XCalc. This file will be located in '/etc/X11/app-defaults/XCalc' or '/usr/X11R6/share/X11/app-defaults/XCalc', depending on your operating system. Backup the original file in case you ever want to revert this mod.
Download: XCalc.app-defaults
Make sure you don't have any XCalc overrides in your ~/.Xdefaults or ~/.Xresources file, as they will take priority over the app-defaults settings, and could alter the appearance.
If you don't want to or can't change the system-wide app-defaults file, you can add the modifications to your ~/.Xdefaults or ~/.Xresources file, however this is not as clean, because XCalc will still use the stock app-defaults file and we then need to use some additional tricks to hide the scientific buttons, which can result in some warnings in the console when running XCalc. These warnings can be safely ignored and the mod will still work.
For this method, add the contents of this file into your ~/.Xdefaults or ~/.Xresources file:
Download: XCalc.resources