Cisco Packet Tracer (ugly, horrid) Fonts

Posted: 11/08/2011 by professortech in Tools for the Network Ninja

Crossposted at Mint Leaves 4 Linux (mintleaves4linux.blogspot.com)

Greetings, Cisco Gurus! I’m Chris — or professortech — whichever you prefer. =) My first post will be a not-so-Cisco-technical post; it’s actually about getting Packet Tracer properly configured on Linux. If you install it right out-of-the-box, it works… but the fonts are rendered horribly! Below, I outline how to fix this so you can use this application pleasurably.

So, first thing’s first. I acquired PacketTracer53_Ubuntu.tar.gz from Cisco’s Net Academy website (cisco.netacad.net) after doing a search for Packet Tracer (while logged in).

Afterwards, I unzipped it (tar -xvzf PacketTracer53_Ubuntu.tar.gz) into my Downloads directory and did a sudo ./install from the directory containing the extracted files.

Everything is fine from here… until you open the application. Then, you are presented with a GUI that has the crappiest, most horrific looking fonts you’ll ever see in your life! Not to worry. This can be fixed.

The problem? Packet Tracer uses its own Qt4 libraries instead of using the ones that you already have on your system. From what I understand, any of the subpixel rendering that has been compiled into the libraries on your system are not present in the libraries for Packet Tracer. The Qt4 packet tracer libraries are located in the /opt/pt/lib directory, assuming you installed Packet Tracer in /opt/pt.

The solution? See below. THIS ASSUMES YOU ARE USING MINT LINUX 11 AND QT LIBRARIES 4.7.2. I am confident it will work on Ubuntu (and hopefully, other QT versions), but not so sure on other distributions (i.e. the directories may be different). Keep this in mind.

First, back up the lib directory where you installed Packet Tracer. This is /opt/pt/lib by default.

cd /opt/pt
sudo cp -r lib lib.bak

Second, you may need to install the following packages. Execute the following:

sudo apt-get install libqtwebkit2.2-cil libqt4-script libqt4-qt3support libqt4-sql

Copy the following files from /usr/lib to /opt/pt/lib, or wherever you installed Packet Tracer.

libQt3Support.so.4.7.2
libQtCore.so.4.7.2
libQtGui.so.4.7.2
libQtNetwork.so.4.7.2
libQtScript.so.4.7.2
libQtSql.so.4.7.2
libQtWebKit.so.4.7.2

So, for the first file, you’ll do:

sudo cp /usr/lib/libQt3Support.so.4.7.2 /opt/pt/lib
sudo cp /usr/lib/libQtCore.so.4.7.2 /opt/pt/lib
[... and so forth, for the remaining Qt files on the list above.]

Then? Go ahead and delete the 4.4.3 counterparts in the /opt/pt/lib directory. For example:

sudo rm libQt3Support.so.4.4.3
sudo rm libQtCore.so.4.4.3
sudo rm libQtGui.so.4.4.3
[... and so forth, for the remaining Qt files on the list above.]

Now? Well, Packet Tracer will be looking for the 4.4.3 files! We need to trick Packet Tracer into using the higher version Qt libraries.

The trick? Symlinks.

sudo ln -s [TARGET] [SYMLINK_FILE_NAME]

So… (do this in the /opt/pt/lib directory, or wherever the PT library directory is)

sudo ln -s libQt3Support.so.4.7.2 libQt3Support.so.4.4.3
sudo ln -s libQtCore.so.4.7.2 libQtCore.so.4.4.3
[... and so forth, for the remaining Qt files on the list above.]

As a result, when Packet Tracer tries to access the 4.4.3 libraries, they’ll actually be using the 4.7.2 libraries.

Finally, you’ll want to make all of the libraries we’ve copied over from /usr/lib executable. To do this, perform the following:

sudo chmod +x libQt3Support.so.4.7.2
sudo chmod +x libQtCore.so.4.7.2
[... and so forth, for the remaining Qt files on the list above.]

Now run Packet Tracer. You should be good to go.

You’ll notice that there are two Qt files we didn’t touch.

libQtAssistantClient.so.4.4.3
libQtXml.so.4.4.3

There’s a reason. First, when I was doing all of this for myself, I initially didn’t find the 4.7.2 counterpart for libQtAssistantClient library in the /usr/lib directory. So, I tried to perform the above steps without this file.

Second, there is a libQtXml.so.4.7.2 file in /usr/lib. However, if you use this file in /opt/pt/lib and run Packet Tracer, it will segfault when you try to do things like delete devices. I think this has to do with methods/functions in the code that can change from some versions to others, but don’t quote me on that. So, as a result, I avoid using this file.

If you’re a savvy user, you may see other ways to perform essentially what I have done above. No problem. I just posted what I did so you get the idea of what I accomplished.

And the result? Look… pretty!

Look! Pretty Fonts! =)

If you want to contrast my steps with the troubleshooting steps that others have taken, see the links below:

http://forum.kde.org/viewtopic.php?f=43&t=87983#p158833

http://ubuntuforums.org/showthread.php?t=1444924

http://sonniesedge.co.uk/2010/02/03/fuckin-ugly-fonts-on-ubuntu-version-of-packet-tracer/

http://pvradu.blogspot.com/2010/04/packet-tracer-52-font-problem.html

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s