Guy Rutenberg

Keeping track of what I do

Archive for the ‘Tips’ Category

Using MusicBrainz when Ripping CDs in KDE

without comments

I guess this tip is Gentoo specific. By default KDE uses FreeDB for getting CD info when ripping CDs. If you want to use MusicBrainz native service (not via their FreeDB proxy), there are several steps you’ll need to take.
Read the rest of this entry »

Written by Guy

January 9th, 2010 at 10:37 am

Posted in Tips

Tagged with , ,

Disable Touchpad Tapping in Kubuntu

without comments

In Ubuntu (gnome) there is an easy graphical way to disable tapping on the touchpad. However, KDE lacks such thing. But lacking graphical configuration doesn’t mean this should be difficult. All you need is the gsynaptics package. The package provides a small utility called synclient. Now you can disable tapping by doing

 synclient TapButton1=0

To disable the tapping permanently you should use the following to run the command at the start of every KDE session.

echo "synclient TapButton1=0" > ~/.kde/env/disable-tapping.sh

Written by Guy

January 8th, 2010 at 11:13 pm

Posted in Tips

Tagged with , ,

Using Duplicity and Amazon S3 – Notes and Examples

without comments

Up until now I’ve been doing my backups to Amazon S3 using my s3backup script. While it’s simple and does what I needed at the time, I’ve decided to cut some of the costs by switching to incremental backups.
Read the rest of this entry »

Written by Guy

December 12th, 2009 at 12:00 pm

Posted in Tips

Tagged with , ,

Blocking IP Range using UFW

without comments

Uncomplicated Firewall (ufw) is one of the greatest frontends to IPTables I’ve encountered. It is very simple to use and I just wish it was also available for Gentoo. Up until recently everything went smoothly for me and ufw, but we hit some rough waters when I’ve tried to block an IP range.

To block an ip or I’p range in ufw you should do

sudo ufw deny from 188.162.67.197/21

Read the rest of this entry »

Written by Guy

November 7th, 2009 at 9:19 pm

Posted in Linux, Tips

Tagged with ,

\lyxframeend Undefined when Using Beamer with Lyx

with 8 comments

I’m using LyX for the first time with Beamer. Making the title page was smooth. But when I’ve tried adding a new frame (using BeginFrame) I was confronted with the following error

 \lyxframeend
                 {}\lyxframe{Outline}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

After comparing my document to example (working) beamer documents I’ve found out that you must have an EndFrame command after your last frame.Too bad it wasn’t documented anywhere I’ve found as this little thing drove me crazy.

Written by Guy

July 22nd, 2009 at 5:40 pm

Posted in LaTeX, Tips

Tagged with , , ,

Using Amarok Generated Playlists (m3u) on Sansa Clip

with 2 comments

Few days ago, for the first time, I’ve created a playlist using Amarok for files on my Sansa Clip player. To my surprise (and disappointment) when I’ve unplugged my Sansa Clip and powered it, the playlist showed up empty, unlike playlists which originated in Windows. As I keep my music collection organized in Amarok, the situation seemed to be very uncomfortable.

I’ve decided to compare one of the working playlist files and the “empty” Amarok generated playlist. Two things were noticeable:

  1. Amarok uses forward slashes, like in a Linux environment, and the working playlist used backward slashes.
  2. The working playlist used relative paths without any prefix – directly beginning with the path. Amarok prefixed the relative paths with a dot-slash (./).

After noticing those things I’ve modified my Amarok generated playlist to look like the Windows generated one, and voila, it worked. I tried going through Amarok’s configuration dialogs to find some option controlling the format of generated m3u playlists, but couldn’t find any (I’m using Amarok 1.4.10). So with my newly found wits I’ve looked for a way to make using the playlists easier. I’ve came up with the following one-liner:

find -name "*.m3u" | xargs -I{} sed "s/^\.\///;s/\//\\\\/g" -i'' {}

The command should be run in the MUSIC directory of the Sansa Clip’s filesystem. It recursivey looks for m3u playlists and for each one strips any leading dot-slash and replaces forward slashes with backward ones. It can be used to easily convert all your playlists to the format understandable by Sansa Clip.

Written by Guy

July 11th, 2009 at 9:23 pm

Posted in Linux, Tips

Tagged with ,

Emulating Kav-Mafrid (em-dash) for the David Font

without comments

The David font that is used in Culmus-LaTeX lacks support of Kav-Mafrid, the ligature that is created by two consecutive dashes, --. Because the regular Hebrew dash, Maqaf, is position near the top of the line, one can’t use it instead of the Kav-Mafrid and expect a graphically pleasant result (while Kav-Mafrid can replace Maqaf and the text would still look ok). To make things even more problematic, this ligature is supported by Culmus-LaTeX’s default font, Frank Ruehl, which means one can’t easily switch fonts without hurting the layout.
Read the rest of this entry »

Written by Guy

July 11th, 2009 at 9:37 am

Posted in LaTeX, Tips

Tagged with , ,

Algorithm Float Label for Hebrew Document

with 2 comments

For a while now I’ve refrained from using the very nice Algorithm environment for LaTeX papers I wrote in Hebrew due to the way it’s label was displayed. The English label was displayed in reverse.

algorithm-before
Read the rest of this entry »

Written by Guy

June 18th, 2009 at 7:00 pm

Posted in LaTeX, Tips

Tagged with , ,

Upgrading All KDE Related Packages in Gentoo

without comments

Yesterday, Gentoo marked KDE 3.5.10 as stable on amd64. I looked for a way to upgrade all of the KDE related packages, without manually specifying each one of them. Normally one could do

emerge -avu world

but I encountered some nasty conflicts that I didn’t have time, nor will, to resolve at that time. So I’ve looked for a different solution. To my rescue came qlist for the great app-portage/portage-utils package. This package provides a set of very fast utilities to query portage. I’ve used qlist to list all of my installed packages, grep‘ed the list and piped the result as arguments to emerge using xargs.
Read the rest of this entry »

Written by Guy

June 8th, 2009 at 9:24 am

Posted in Linux, Tips

Tagged with ,

Installing Lighttpd-1.4.22 on Ubuntu 8.04

without comments

I had some problems with the lighttpd-1.4.19 that comes with Ubuntu 8.04, mainly it’s problems of handling the HTTP header Expect: 100-continue (which older versions of Lighttpd return error 417). The problem was fixed in Lighttpd-1.4.21, but 1.4.22 is the newest version so I’ve decided to install it.

As I mentioned before, Ubuntu doesn’t have lighttpd-1.4.22 for 8.04, and it’s also not available in the updates or backports repositories. Fortunately, I’ve found that the package is available from Debuian Sid (unstable). Here are some instructions on how to install it.
Read the rest of this entry »

Written by Guy

May 31st, 2009 at 10:43 pm

Posted in Linux, Tips

Tagged with ,