Krusader is a very useful file management application in the likes of the “legendary” midnight commander.
Since I use my Macbook on OSX a lot, I accepted the challenge to get it to work on OSX 10.14 Mojave.
There are 5 things to do here:
- Use Macports to compile krusader (This will fail as you will see below)
- Apply patches to Macports downloaded krusader source files and get it to compile it successfully.
- At this point, krusader “runs” but crashes at startup, so we now have to enable the dbus daemon on OSX.
- Now it runs and but the interface is flickering/blinking making it quiet usable, so we use qtconfig to configure the “Interface -> Default Graphics System” to “Native”
Use the App Store and install XCode (The version I used is 11.3.1)
Run the command below in Terminal to get the latest index of Macports packages:
sudo port -v sync
Get Macports to install krusader. It installs packages and downloads source code for compilation.
sudo port install krusader
As mentioned earlier, it will fail to install due to a compilation error. Macports will print a vague message telling you that you want to take a look at a .log file to see what happened. Open the .log file (using your favorite text editor – I use Sublime, but TextEdit that comes with OSX will work), scroll down to near the end and notice the filenames that gave an error during compilation.
Patch Krusader Source Files
Download Patch Files
This is the ticket that has the fix to krusader not compiling on OSX 10.13 – https://trac.macports.org/ticket/58459
Below that page, you will find a link to the patches that we need: https://svnweb.freebsd.org/ports?view=revision&revision=478438
We want to download those 4 patches. Click on each of them and near the top of the page, right-click on Download and save the files to your computer
If you look at the first patch file, you will find a line like this at the top:
--- krusader/Dialogs/packgui.cpp.orig 2018-08-30 09:48:14 UTC
Remember the filename you got while looking at the Macports install log file? We now want to use Terminal and navigate to the parent of the parent folder of the file.
For example, if the filename path is:
/some/long/path/krusader/Dialogs/packgui.cpp.orig, we want to be in the folder:
Move the patch files you downloaded to the folder mentioned above,
Now run the following for each of the 4 patch files:
patch -p0 the_name_of_patch_file_you_downloaded
The above command should say something along the line that the patch was successfully applied.
Get Macports to compile Krusader again
sudo port install krusader
Congrats, it should go ahead and complete compilation of Krusader and install it as
Enable dbus Daemon
In Terminal, run:
sudo launchctl load -w /Library/LaunchDaemons/org.freedesktop.dbus-system.plist
launchctl load -w /Library/LaunchAgents/org.freedesktop.dbus-session.plist
If you run Krusader, it should run now, however, you might notice the interface blinking erratically. The fix is found below.
Configure QT/KDE Default Graphics System
Run qtconfig – Double-click qtconfig found in
Navigate to the Interface tab and select OpenGL for the Default Graphics System (found below the tab page). Close the app and click on Save when it asks you if you want to.
Double click in Finder:
Voila! Krusader runs in OSX 10.14 as advertised. Enjoy and stay safe.