In my quest to look for more On-Screen Displays (OSD) for showcasing framerates in OpenGL games on Ubuntu, I’ve come across Frapix.
Now, to get this up and running, we’ll need to build it from source code. It’s not that difficult, but I would put this at intermediate difficulty especially if you’ve never coded or compiled anything before.
Download the source code
To start, we’ll need the source code for two things. libimago and frapix.
Just click Download Zip for each. You’ll want to extract both of those onto your Desktop to make things easy.
Alternatively, if you don’t want to you use the Download Zip button but instead want to use git, we could do it like this. The following will clone (download) the source code to whichever directory your Terminal is currently in:
git clone https://github.com/jtsiomb/libimago
git clone https://github.com/jtsiomb/frapix
Installing the dependencies
Before compiling, we need a couple of things installed first. Go ahead and copy/paste this into a Terminal and hit Enter.
sudo apt-get install -y libx11-dev mesa-common-dev libjpeg-dev libpng-dev
Alright, we’re set, let’s first build and install libimago. After that we can build and install frapix.
First, cd into libimago’s folder wherever you extracted it to. For me, that’s on the desktop. This is what it should look like (ismail is my username).
Now, let’s start building it. Enter the following one-by-one.
This is what it should look like so far:
Hopefully, no errors turn up here. Time to install it system wide.
sudo make install
With that done, we can now build frapix. Open a new Terminal, and CD into the frapix source code folder wherever you extracted it. For me, that is on the desktop and looks something like this:
Now, let’s start building it.
sudo make install
That’s it, we’re done! You should now be able to run frapix with any OpenGL application or game and get a suitable fps OSD to display. The cool thing about frapix is that it changes the color of the numbers depending on the background color. If it’s a dark background, the OSD turns to a bright color to constrast it and vice versa.
To test if frapix is working, we can run it with glxgears like so:
You should see a neat little OSD with fps numbers on the top right like I do. If you want to run it with Steam games, that’s also possible. Just right click your favourite game in Steam, and add the following to the Launch Options for that game like so:
Click OK and now all you have to do is start the game, it should work! This is what I get in Cities Skylines:
There is one problem though. If you’re on a 32bit OS, you should be fine. However, if you’re on a 64bit OS like me, you’ll end up with the 64bit version of frapix. What does this mean? Any game or OpenGL application that is 32bit-only will not have the frapix OSD appear.
I’m not yet sure how to overcome this problem, as there doesn’t seem to be a way to have both the 32bit version and 64bit version installed at the same time unlike GLXOSD.
Additionally, I have been unable to get any OSD to work in Wine which is the ultimate goal I’m setting out to achieve here. So, sadly, this does not work in Wine.
This should work on any Ubuntu version, but I’ve only really tested it on Ubuntu 15.04 (both 32bit and 64bit versions). I hope this post was helpful to you in one way or another! 😀