Downgrading Subversion from 1.9.3 to 1.8.13, Ubuntu 16.04

I needed to run tests and fix an issue with Subversion 1.8, and on my recently-updated machine running Ubuntu 16.04 (Xenial), Subversion was installed as 1.9.3, which was the only version in the xenial repository.

So, a quick post of what I did, since googling produced no clear answer.

Download the 1.8.13 .deb files for subversion and libsvn1.

Install the latest from xenial repository (probably no changes, if you have Svn 1.9.3 installed):

% sudo apt-get install libapr1 libaprutil1 libsvn1

Remove libsvn1, because it is 1.9.3:

% sudo apt-get remove libsvn1

Remove (uninstall) Svn 1.9.3

% sudo apt-get remove subversion

Install downloaded packages “manually”

% sudo dpkg -i ./subversion_1.8.13-1ubuntu3_amd64.deb ./libsvn1_1.8.13-1ubuntu3_amd64.deb

Check version (should be 1.8.13):

% svn --version

Check the package:

% dpkg -l | grep subversion

And that’s it.

Earlier anacron jobs

For whatever reason, anacron is set to run its daily jobs at 7:30 in the morning:

# /etc/cron.d/anacron: crontab entries for the anacron package


30 7    * * *   root	start -q anacron || :

The first time I encountered that was when I was working at that time of day and noticed the sluggishness of my machine. It seemed that locate was the heavyweight process, so I changed anacron to run at 4:30 a.m, modifying the last line in the file:

30 4    * * *   root	start -q anacron || :

No dots in cron scripts?

I added a little script to /etc/cron.daily,, while I sorted out how to integrate my backup script (tresync) into the list of cron jobs run daily.

The odd thing is, the script never ran. I could run it as “sudo /etc/cron.daily/“, but it didn’t run with the rest of the cron jobs.

Lo and behold, I found the answer, which is actually on the man page for run-parts:

If neither the –lsbsysinit option nor the –regex option is given then the names must consist entirely of ASCII upper- and lower-case letters, ASCII digits, ASCII underscores, and ASCII minus-hyphens.

Which means: you cannot have a dot in the file name.

That seems quite counterintuitive, but perhaps there is a reason that I just don’t understand.

Printing the middle N lines of a file in Linux

While working on my “e” alias in my aforalias project, I want the show only the entries of zip files, that is, without the header and footer sections. The “e” alias also shows the entries sorted by name, unlike the behavior of “unzip -l“, which displays:

  Length      Date    Time    Name
---------  ---------- -----   ----
---------                     -------
102761855                     9503 files

Thus I wanted to print lines[3 .. lines.length – 3].

Lo and behold, there’s a way to do that with “head” and “tail”, as follows:

unzip -l $1 | tail -n +4 | head --lines=-2

tail -n +X” means “start printing at line X”, where 1 is the first line of the file (not 0).

And “head --lines=-X” means “print all but the last X lines”.

Not the most intuitive pair of commands in this context, but they can be quite helpful.

RVM, Zsh and Konsole

Today I set up RVM with Zsh (Z shell) with Konsole (the KDE equivalent to gnome-terminal).

The RVM Konsole example shows it with bash, setting the “Command” field to “/bin/bash –login”. The line for Zsh is nearly the same: “/usr/bin/zsh –login”.

If you don’t have this, you’ll get the error:

% which ruby
% rvm use 2.0

RVM is not a function, selecting rubies with 'rvm use ...' will not work.

You need to change your terminal emulator preferences to allow login shell.
Sometimes it is required to use `/bin/bash --login` as the command.
Please visit for an example.

Note that you’ll need to have RVM as the first component in the PATH (“echo $PATH”).

With the “Command” field set to “/usr/bin/zsh –login” (that’s “dash dash login”), when you start a new terminal you should get:

% which ruby
% rvm use 2.0
Using /home/jpace/.rvm/gems/ruby-2.0.0-p598
% which ruby

Silencing Konsole Notification

Applications in KDE can send notifications, which result in popups on the task bar:


Highly annoying this is. The culprit is that control-shift-A is the shortcut to enabling this behavior, as is shown via “Konsole -> View -> Monitor for Activity”:


It’s fortunate that this is easy to disable. Right click on “Monitor for Activity -> Configure Shortcut”, then click on “Ctrl+Shift+A”, which will then display “Input”. Click on the left arrow graphic:


That should result in it showing “None”, which means that there will no longer be a shortcut. You might want to go back to “Konsole > View” and make sure that “Monitor for Activity” is not checked.

I seem to do this every time I set up KDE, so perhaps this will help others.

Review of LinuxMint 14 KDE

I finally upgraded my main personal machine to Linux Mint KDE 14. That machine was running Mint 11, for around two years, but when I began working with Scala, I discovered that Emacs 24 is much better for Scala support. Not finding Emacs 24 in the Mint 11 repositories, I finally took the time and effort to upgrade.

Now I wonder why I’d waited so long.

The first immediate improvement, albeit superficial, was that KDE uses blue as its primary color. It makes sense that that Mint would of course choose, well, a minty green as its color, but that is one of my least favorite colors, reminding me of a 1970s refrigerator. I didn’t care for the brown of Ubuntu, and missed the blue of Fedora, so now I’m back, in a way.

I switched to the Oxygen theme, which is nicely dark, mostly dark greys. The other themes I looked at seemed to be excessively noisy, and I like a minimal desktop experience, with no peripheral distractions.

As I complained before, when I temporarily switched from Gnome to KDE (and back again) in KDE the fonts look, in a word, horrible. Absolutely horrible, if you will permit me two words.

This time I googled around a bit, and found this thread.

The summary of that is to go to the Fonts settings and set them all to Ubuntu 10 Regular, except for Fixed Width (Ubuntu Mono 12), Small (Ubuntu 9), and Windows title (Ubuntu 10 bold).

Set the following:

  • Anti-aliasing: enabled
  • Exclude range: unchecked
  • Sub-pixel rendering: RGB
  • Hinting style: slight

Install Windows fonts via: “sudo apt-get install ttf-mscorefonts-installer”. The command line app is necessary because you’ll need to accept the license agreement, which has no equivalent for the GUI-based package managers.

That has made a huge difference in the appearance. I do not understand why these would not be the default settings in KDE, so mark that as one advantage in the favor of Gnome. One advantage. I haven’t found a second one.

I also installed the Inconsolata font (the package “ttf-inconsolata”), which I tried out with Emacs after reading about it as being highly recommended. After a while I went with (back to, actually) DejaVu Sans Mono, font size 9, since I found Inconsolata characters to be too wide.

The KDE UI takes a little while to get used to, especially seeing all apps in the panel, not just the ones for the current workspace. I also set the shortcut for the start menu to alt-F1, after trying to re-map the Windows key, with a modicum of success.

This upgrade makes me feel like I’m back in my early Red Hat / Fedora days, with the UI clean and responsive. I haven’t yet tried out activities under KDE, but I am planning to.

On that note, being a KDE neophyte, I’m looking for a KDE book, and would appreciate any recommendations.

How to Enable Toggling a KVM with Linux Mint

I just got this KVM from Monoprice (for only $27!), and had difficulty setting it up with Linux Mint 11. Specifically, when running under X, hitting the Scroll Lock key twice resulted in no response. However, when running in a VT (that is, switching from X via ctrl-alt-F1), it worked, so my guess is that there is some issue with Gnome misdirecting or misinterpreting the key event.

I eliminated the KVM itself as the problem by running a very long command (“find /”), and hitting Scroll Lock did not stop the output from scrolling, when running in a Gnome terminal. As with the KVM, Scroll Lock did stop the command output when I was running in a VT.

Online there were examples of using xmodmap to enable the Scroll Lock key, but these didn’t work for me. I tried to:

xmodmap -pm
xmodmap -e 'add mod3 = Scroll_Lock'

But neither the KVM nor the command-output tests worked. Then I found this snippet:

xset led 3 && sleep 0.2 && xset -led 3 

I ran it, and lo and behold, it worked. So I wrote it to a script:

echo "xset led 3 && sleep 0.2 && xset -led 3" > ~/bin/toggle_kvm
chmod +x ~/bin/toggle_kvm

Then went to Keyboard Preferences, added that command, and gave it a shortcut of “Scroll Lock”.

So the only difference now is that in Windows, the Scroll Lock key has to be hit twice, but only once in Linux.

… and Back to Gnome from KDE

I recently switched from Gnome to KDE, after a couple of Gnome quirks proved to be quite irritating. However, KDE became even more bothersome. Specifically the performance was dreadful. This is a new(ish) machine, just a few months old, with a six-core processor, 8 GB of memory, and an SSD, so I expect good if not extraordinary performance. However, under KDE the response within windows was very sluggish, on the order of a second or two to scroll down in applications.

Fonts were also a problem, where the fonts under KDE, for both KDE and Gnome applications, lacking smoothness. Despite much fiddling of font preferences, I could not get them to look as good as they do under Gnome.

Switching back to Gnome hasn’t resolved its irritations, although it’s put them in context. The main problem is that to get the title and task bars working properly (showing the currently focused application) I have to restart the window manager after login, and after launching Gnome Terminal I have to switch in and out of each tab so that the focus of the cursor is correct.

Migrating from Fedora 5 to Linux Mint 10

My four-year-old system, castor, was in dire need of upgrading, so based on the pleasant experience of installing Linux Mint on my latest laptop, I decided to switch from Fedora to Mint.

I’ve been a long-time Fedora user (and before that, Red Hat, going back to version 4, as I recall). It has always felt very “solid” yet incomplete. By that I mean that after installing Fedora, I’ve had to go install all the various media packages, adding livna and rpmfusion (?) to the RPM configuration, finding the plugins, MP3 support, and whatnot.

I’ve wanted an out-of-the-box (“It Just Works”) distribution for a while, and Mint seemed to have it: all the media packages, plugins, proprietary drivers, etc. So that’s what I installed on my laptop back in January, with Mint 8, and I was willing to do it again, with the latest version, Mint 10.

Overall, Mint 10 looks much better than 9. Granted, that may be because this installation was on a 24″ monitor running at 1920×1200 resolution, but even the themes look better. My primary complaint with Mint is the usage of so much light green — probably my least favorite color — but that has been toned down for a background of metallic grey — my favorite color.

The out-of-the-box experience was great. There was some dorking around with setting up the disk partitions, since I prefer hardware- and software-independent disks, meaning that I can take (and have taken) a drive from a fail(ing) box, pop it into a good one, mount it, and pull all the files off, without the added stress of having to configure it via software. A failed RAID controller years ago set me on the path of resisting the easy of using LVM, and going the more difficult route.

One aspect of the older versions of Fedora was that I could choose the option to install every available package during installation, and never need to track down packages in the middle of working on a project that called for additional software. Of course, that resulted in many packages I didn’t need, cluttering up the menus, but I figured it was worth the long-term benefit. It also avoided the pre-yum hassle of RPM hell.

But that changed around Fedora 9, as I recall, where only a minimal set of packages were installed. So that was another strike against Fedora.

If you haven’t figured it out by now, yes, I have no lack of laziness (nor impatience nor hubris). I want to boot the machine with the installation DVD, click a couple of boxes, hit “next” a few times, walk away, and sit down an hour later at a machine ready to work and/or play (both the machine, and I).

Mint solves much of that issue. However, there is the need to find the correct packages, but the synaptic package manager is so easy to use that it’s essentially trivial.

So, some minor issues here, which others may encounter:


Running videos with mplayer -fs resulted in many errors such as:

X11 error: BadAlloc (insufficient resources for operation)

But this works properly: mplayer -fs -vo x11 -zoom


Listing directories with many entries became very time-consuming, a problem with dired.el. Additionally there was cruft at the end of the listing, evidently output from the change in how dired uses ls. So I added this to my .xemacs/init.el file:

(add-hook 'dired-load-hook
  (lambda ()
    (set-variable 'dired-use-ls-dired
      (and (string-match "gnu" system-configuration)
           ;; Only supported for XEmacs >= 21.5 and GNU Emacs >= 21.4 (I think)
           (if (featurep 'xemacs)
		(fboundp 'emacs-version>=)
		(emacs-version>= 21 5))
             (and (boundp 'emacs-major-version)
                  (boundp 'emacs-minor-version)
                  (or (> emacs-major-version 21)
                      (and (= emacs-major-version 21)
                           (>= emacs-minor-version 4)))))))))


One of the main reasons for my upgrade was to do Android development. However, after installing Eclipse and the Android Development Toolkit, there were errors when creating a new Android project:

…/platform-tools/adb: No such file or directory

Fortunately (for me) a friend had run into the same problem a few days ago, and this showed the fix to get the i386 compatibility libraries:

apt-get install ia32-libs


In short: Rails 3.0.3 (the current version) does not seem to run Rails apps written in 2.3, as is my site. So I downgraded by installing the 2.3.5 version of the Rails gem, and it works properly.