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/syslogd.pid`

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:

showpep

 

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.

Great!

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 SlackBuilds.org, 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/default.pa | Replace the entire content of this file with this:

.fail
    # 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.
    
    # INPUT/RECORD
    load-module module-alsa-source device="default" tsched=1
    
    # OUTPUT/PLAYBACK
    load-module module-alsa-sink device="default" tsched=1 
    
    # Accept clients -- very important
    load-module module-native-protocol-unix

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

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 SlackBuilds.org (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 SlackBuilds.org. 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
MIRRORPLUS['msb']=http://slackware.org.uk/msb/14.1/1.8/x86_64/

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:
Screenshot

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:
Screenshot2

Leave a comment

Filed under desktop

Reboot instead of shut down

I have a Lenovo ThinkPad S430 laptop. Occasionally, when I want to shut down the machine, it would power off and a second later turn on again. Seems to happen more often when using the battery, but I am not sure. I am using XFCE and this happens when I select shut down from the Log out menu. This behaviour can be really annoying if you are on a hurry…

I did some searching and in the end, the solution found here seemed to work. I created this file /etc/rc.d/rc.local_shutdown and pasted the following in it:

for i in /sys/bus/usb/devices/*/power/control;
do echo on > $i
done

Then, I made the file executable:

chmod +x /etc/rc.d/rc.local_shutdown

I tested the shutdown process 10 times on battery and 10 times on power. There were no reboots and I hope this really fixed the problem. If this was the problem, here’s an excerpt from this post:

The problem seems to arise from incorrect work of pm-utils. But if you write on into /sys/bus/*/devices/*/power/control, the kernel takes control over power management at the specified devices – and somehow this makes the hardware to shut down correctly.

Here are some additional discussions of the same problem:
A thread on LQ, also a talk on the Ubuntu forums and some more on Ubuntu forums; there is this  discussion on the Arch Linux forum.

Seems people started having trouble using the above solution after their distro switched to systemd, but we don’t have this problem, do we?

Leave a comment

Filed under desktop, system

Two years for slackalaxy…

It has been two years. :)

This makes total of 71 posts, over 11,000 views and 30 comments, including my own replies.

Leave a comment

Filed under misc

Zotero bibliography manager

I have been looking for a good bibliography manager for Linux. I have used Bibus in the past, it it does not seem to work with the new versions of OpenOffice.org or LibreOffice. Luckily, I got a great tip from Ryan P.C. McQuen — Zotero. As their website states:

Zotero is a [zoh-TAIR-oh] is a free, easy-to-use tool to help you collect, organize, cite, and share your research sources.

Now it is available from SBo — the script just repackages the binaries provided from upstream. When you start the application, it will automatically search for an installation of OpenOffice.org / LibreOffice and install the appropriate office plugin. The plugin adds the following toolbar, which is very easy to use:

zotero

Zotero supports a variety of References styles, and in case you need something more — new styles can be easily downloaded.Simply go to Edit > Preferences > Cite > Styles and click on the Get additional styles... link. This will bring you to the Zotero Style Repository. Search the journal you want and download the cls file.

To import it, use the plus button:

zotero1

The only disappointing thing was that inserting in-text references would reset the double-spacing of the text.

Apart from that the program seems very nice.

1 Comment

Filed under Academic, office, SlackBuilds