Firefox: disable the built-in PDF viewer

When the built-in PDF viewer arrived for Firefox, I was quite excited. However, I have to admit that it does not always work well. Sometimes fonts look weird and pictures distorted.

If it does not work well enough — let’s disable it! I searched and found the answer here. Open about:config and set the following to True:


Now, to make Firefox embed my preferred PDF viewer, I installed mozplugger from SBo. Its configuration file is /etc/mozpluggerrc and the PDF settings start at line 219 for this release (version 2.1.4). Edit to your liking, but even xpdf works very nicely, embedded into Firefox.

You may need to do one last thing. Go to Edit > Preferences > Applications, search for PDF and make Firefox use MozPlugger:

Screenshot - 09252014 - 08:14:04 PM

That’s it. Restart the browser if settings do not take effect.

By default, Adobe Acrobat (acroread) is commented out in /etc/mozpluggerrc. Since this is the particular PDF viewer I like to use, I uncommented it and proceeded as described previously. The instructions are for Seamonkey, but the steps work analogously for Firefox.

Leave a comment

Filed under network, office, SlackBuilds

Converting html

I need to convert a simple webpage to PDF and picture format. Usually, I would just take a screenshot, however it is too big. I searched and I found a nice little tool, called wkhtmltopdf. It can be easily installed from SBo. To convert a webpage to PDF, using default settings, is extremely easy. Just do the following in the terminal:

wkhtmltopdf example.html example.pdf

I was pleasantly surpised to find an additional program in the package, called wkhtmltoimage. It does what the name suggests — converts your html file to an image. Its use is also very easy:

wkhtmltoimage --format png --quality 100 example.html example.png

The above command will convert the html file to png, with high quality (100). Very nice!

Leave a comment

Filed under misc, office


I need to export gene coordinates and exon organisation as a figure. I have prepared the annotations in UniPro Ugene, which I have installed from SBo. A nice tool for graphical representation of such data is provided by the GenomeTools software. It can be easily installed from SBo, too.

So, what is the strategy?

First, in UniPro Ugene select the annotations you want to export, right click and go Export > Export annotations. Then, select the gff format for the exported file, e.g. “example.gff“.

Now, it’s time to convert example.gff to graphics with the help of GenomeTools. Open up a terminal, navigate to the folder where the example.gff file is and execute the following command:

gt sketch -format svg -style -start 1 -end 40000  output1.svg example.gff

Detailed explanations and instructions can be found in the corresponding section of the GenomeTools web-site.  Brief explanation below:

  • gt sketch will use the AnnotationsSketch library to create a drawing
  • -format svg specifies the drawing to be a SVG. Other formats include PNG, PDF or PostScript
  • -style tells the program to use a custom style file
  • -start 1 -end 40000 tells the program to render a sketch between nucleotides 1..40000
  • output1.svg is the name of the output file
  • example.gff is the name of the input, annotations file

Therefore, this will create a SVG output file from example.gff, called output1.svg, using a custom style for the region between nucleotides 1..40000.

The SVG file can be additionally edited with Inkscape, if necessary. And here’s an example of what GenomeTools can do (from the program’s site):


Beautiful, isn’t it?

Leave a comment

Filed under Academic, SlackBuilds

Clearing syslog

Due to some reason, my /var/log/syslog had grown over 500MB. Since I have /var mounted to a separate partition I noticed it easily. I had never had such an issue, so I googled around and found this very old post. Decided to give it a try and just renamed the file and restarted syslog as it says:

mv /var/log/syslog{,.`date +%Y-%m-%d`}
kill -HUP `cat /var/run/`

I saved the old syslog to another partition so I can check it later (still haven’t done it) and see what the problem was.

importantI just want to make it very clear, that I do not know if this is harmless.

So far I don’t seem to have any issues.

Leave a comment

Filed under misc, system

Amino acid sequence as a column

I need to present an amino acid sequence as a column, so I can paste it in a spreadsheet document (to serve as a reference to other analyses). There is a relatively straightforward way to do this. I have EMBOSS suite and the associated EMBASSY installed from SBo. I used the tool called SHOWPEP, with sequence only display format:



And below, from the Advanced Options, I set “Width of sequence to display” to 1:

showpep1Press the GO button and it’s done. Now you can just copy and paste it.


Leave a comment

Filed under Academic

Sound in Skype 4.3

Since version 4.3, Skype for Linux requires PulseAudio. It is available from SBo, but since Skype is a 32bit program only, the necessary 32bit compatibility packages should be installed as well. I am running Slackware64 14.1 -multilib system and I have a virtual machine with Slackware 32. So what I did was:

First of all, PulseAudio needs its own group and user. You can add them like this:

# groupadd -g 216 pulse
# useradd -u 216 -g pulse -d /var/lib/pulse pulse

In the virtual machine, I compiled the following from SBo:
speex | an audio compression format designed for speech
json-c | JSON library in C
pulseaudio | PulseAudio Sound Server

I converted the m to compat32 packages on my host machine like this:

convertpkg-compat32 -i speex-1.2rc1-i486-3_SBo.tgz -e tgz

In case you have no virtual machine at hand, you can use sbotools which is capable of creating compat32 packages from, like this:

sboinstall --compat32 speex

However, with the above approach, the compilation of pulseaudio broke.

Then, I compiled the above packages on the host x86_64 system and installed them together with the ready compat32 packages and Skype. This worked for me right away. I had sound notifications, could hear the Skype test call and was able to record a message and hear it back.

There has been an active discussion about it on LQ where people reported various problems. There were also many suggestions, solutions and a user even prepared packages. From reading the discussion, I decided to configure an un-intrusive set up of PulseAudio. Following the Arch Linux Wiki article, I modified these files as suggested:

/etc/pulse/daemon.conf | Replace these with the proper values:

exit-idle-time = 0 # Exit as soon as unneeded
flat-volumes = yes # Prevent messing with the master volume

/etc/pulse/client.conf | Replace these with the proper values:

# Applications that uses PulseAudio *directly* will spawn it,
# use it, and pulse will exit itself when done because of the
# exit-idle-time setting in daemon.conf
autospawn = yes

/etc/pulse/ | Replace the entire content of this file with this:

    # Set tsched=0 here if you experience glitchy playback. This will
    # revert back to interrupt-based scheduling and should fix it.
    # Replace the device= part if you want pulse to use a specific device
    # such as "dmix" and "dsnoop" so it doesn't lock an hw: device.
    load-module module-alsa-source device="default" tsched=1
    load-module module-alsa-sink device="default" tsched=1 
    # Accept clients -- very important
    load-module module-native-protocol-unix

    # Publish to X11 so the clients know how to connect to Pulse. Will
    # clear itself on unload.
    load-module module-x11-publish

To be honest, I don’t know it this helps or makes things better…

Leave a comment

Filed under desktop, media, multilib, network, SlackBuilds, system

Multirow bookmarks toolbar for Firefox

Over the years, the amount of bookmarks that I like to keep in my toolbar has grown and they no longer fit n a single row. I searched a bit and found this very useful Firefox add-on, called Roomy Bookmarks Toolbar. It does exactly what it’s description says and does it well.

Once installed, I tweaked its settings (Tools > Add-ons > Preferences), to show only one row, which can be scrolled with the mouse wheel:

Screenshot - 08082014 - 08:59:56 PM

There was a glitch, that made the toolbar display a cut off part from the row beneath it. This was easily fixed by the following option:

Screenshot - 08082014 - 09:00:37 PM

Works like a charm!

Leave a comment

Filed under misc, network, office

Run an application with a specific GTK2 theme

I want to run an application with a GTK2 theme that is different from the global one. Searching the Arch Linux wiki, pointed me to their solution.

In my case, I am running Slackware64 14.1 with KDE 4.10.5. I am using the Oxygen QT4 theme and its GTK2/GTK3 ports that come with Slackware by default (oxygen-gtk2 and oxygen-gtk3). However, as mentioned before, I am experiencing problems with certain applications. Among them is the Zotero bibliography manager. A nice, Oxygen-like theme for GTK2 that does not have these issues is kde44-oxygen-molecule, available from SBo.

In order to use this theme only for Zotero, I copied /usr/share/applications/Zotero.desktop locally to ~/.local/share/applications/. Then, I edited the Exec line of the local copy of the .desktop file as the Arch Linux wiki recommended:

Exec=GTK2_RC_FILES=/usr/share/themes/kde44-oxygen-molecule/gtk-2.0/gtkrc zotero %f

Save and it runs without problems (so far). It looks a little different compared to the rest of the desktop but it does not bother me that much. Yet.

Leave a comment

Filed under desktop, system

MSB and SBo common entries

I decided to make a quick check of the common entries between MATE SlackBuilds (MSB) and (SBo). The following packages provided by MSB 1.8 (as “base” and “extra”) for Slackware 14.1 are available at SBo 14.1 repo:

MSB (base)
gtk-engines | Theme engines for GTK+2
libunique | a library for writing single instance applications
murrine | Gtk2 Cairo Engine
pangox-compat | X font support for Pango
rarian | documentation metadata library
yelp-tools | documentation checker
yelp-xsl | stylesheet for Yelp

MSB (extra)
atkmm | C++ bindings for ATK
cairomm | C++ wrapper for the cairo graphics library
gksu | Gtk+ frontend to su and sudo
glibmm | C++ bindings for glib
gssdp | GObject-based API for handling resource of SSDP
gtkmm | C++ interface for GTK+
gtksourceview | a GTK+ framework for source code editing
libgksu | library for gksu
libgtop | a top-like library
libsigc++ | typesafe callback system for standard C++
mm-common | build infrastructure and utilities for GNOME C++ bindings
pangomm | C++ API for Pango
perl-net-dbus | Net::DBus perl module
perl-xml-twig | Perl XML transformation module
pygobject3 | GObject bindings for Python
pygtksourceview | Python bindings for gtksourceview

So, whenever I install something from SBo, I should keep in mind that these are already present.

Leave a comment

Filed under desktop, SlackBuilds, system

MATE SlackBuilds

I have been following the development of the MATE SlackBuilds (MSB) project for quite some time. Finally, I decided to give MATE a try. I wanted to have a relatively clean system before I install, since some of the packages provided by MSB are also available at I say “relatively”, because I wanted to keep the -multilib packages from AlienBob and sbopkg. So, I did

slackpkg clean-system

and removed anything that had the _SBo extension. Then, I run sbopkg and went to the Packages menu, just to make sure… I also removed the XFCE series, since I do not need two GTK based desktops:

slackpkg remove xfce

I am using the slackpkg+ extension, so I opened and modified /etc/slackpkg/slackpkgplus.conf, as suggested at the MSB howto:

# List repositories you want to use (defined below)
# remember to launch 'slackpkg update' if you modify that row.
REPOPLUS=( slackpkgplus restricted alienbob multilib msb )

Add this, too:

# MATE SlackBuilds

Then just run:

slackpkg update gpg
slackpkg update
slackpkg install msb

It installed like a breeze! I then selected it as the default desktop for my user from xwmconfig:

There are many reasons to like MATE. It is visually appealing, uncluttered and overall feels complete out-of-the-box. Here is an excerpt from the ChangeLog (Sun May 4 07:32:09 CEST 2014) of Microlinux:

The MATE desktop environment has proven to be as rock-solid as Xfce. The Caja file manager offers more functionality than Thunar while being visually more appealing. Basic desktop applications like a simple text editor, a document viewer or an archive manager are already shipping with the base desktop. Multimedia hotkey support is perfect, as well as a number of tiny details. With all this, MATE stays light on system resources and runs perfectly even on very old hardware.

One problem that I encountered was that playing with the icon sizes of the file manager is a bit buggy. I had to log off and back in for the changes to take effect. Otherwise, the desktop is very responsive. Many thanks to Willy Sudiarto Raharjo and Chess Griffin for their work!

There are many already enough screenshots at the MATE and MSB web-pages, but here we go:

Leave a comment

Filed under desktop