I recommend not running this program as root, for good security practice. That said, if you want to do it anyway and are willing to take the risks that it eats your hard drive, read along.
When attempting to run as root, the GUI window will appear but without any contents. This was reported upstream in 2015 at https://forum.scootersoftware.com/forum/beyond-compare-4-discussion/linux-aa/12397-running-bcompare-as-root but its developers decided it was a KDE bug. They reported it to Fedora as a KDE bug at https://bugzilla.redhat.com/show_bug.cgi?id=1185893 but Fedora decided it was an application side bug, and they gave the good advice to not run GUI apps as root.
A workaround is:
$ sudo QT_GRAPHICSSYSTEM=native bcompare
Again, run a GUI as root at your own risk. (FWIW, it worked fine for me.)
This workaround only works on a local machine. Over a ssh session, even with X forwarding, it will give "X11 connection rejected because of wrong authentication." I didn't work through what the workaround for that would be, but it'll have something to do with /root/.Xauthority and/or xauth.
For a moment, I considered that the /usr/bin/bcompare bash script could be updated to check for root permissions and automatically export this environment variable. But, I see that bash script comes from upstream so is probably best left alone. Also, it's probably not a good idea to make it easier for people to run the program as root without understanding the dangers.
Pinned Comments
Musikolo commented on 2024-08-25 07:07 (UTC) (edited on 2024-10-16 03:55 (UTC) by Musikolo)
You can build the last version of Beyond Compare v4 I packaged (
4.4.7.28397) by doing this:Since you have a license for v4, you might be interested in looking at the upgrade policy at https://www.scootersoftware.com/kb/upgradepolicy .
I hope it helps!