scrub: -X argument cannot exist

I’ve been looking for a utility that will clean disks for me – and I do realize this is no real substitute for shredding them. Anyway, scrub seems to do the job. However, when I tried to run it I got:

scrub: -X argument cannot exist

This had me stumped because I read it as “the -X argument cannot exist”, which seemed to make no sense whatsoever. And indeed it means “the argument to -X cannot be a directory that exists”. Simply running it with a new directory, like so:

root@server:/home# scrub -X /home/scrub
scrub: using NNSA NAP-14.x patterns
scrub: scrubbing /home/scrub/scrub.000 1073741824 bytes (~1GB)
scrub: random |..^C |

works.

It is notable that more current versions of scrub fix the error message to be more intuitive (mine was still 2.2).

Adding Blog as a Menu Item in WordPress

On my personal blog, I set the main page to a static page. However, I also wanted a menu item to the blog posts. There was nothing in the Menu editor, but the solution is quite easy if you know how.

  1. Create and publish an empty page. I called mine “Blog”.
  2. In (Dashboard) -> Settings -> Reading, there is a drop down called “Posts page”. Select the empty page you just created. Save your changes.
  3. Under Appearance -> Menu add the Posts page to your menu. Save the menu.

When you now click on this menu item (or navigate to the page some other way) it will show the blog posts list as normal.

Apache: How To Redirect http to https

If you want to direct traffic from your http so that it gets encrypted, this is really easy to do in Apache:

Step one: Set up your https vhost:

<IfModule mod_ssl.c>
<VirtualHost 10.1.1.1:443>
DocumentRoot /var/www
# other server options go here as needed
# – logging for example
SSLEngine on
SSLCertificateFile /etc/ssl/certs/example.cert
SSLCertificateKeyFile /etc/ssl/private/example.key
# Add other SSL specific options as needed</pre>
</VirtualHost>
</IfModule>

Step two: Set up your http vhost:

<VirtualHost 10.1.1.1:80>
ServerName my.example.com
RedirectPermanent / https://my.example.com/
</VirtualHost>

We have previously posted more information on enabling SSL in Apache.

Obviously, instead of 10.1.1.1 and my.example.com you’ll have to use your own IP and hostname, whatever they may be.

Note that this will redirect everything from http to https. Finer control is possible, for example you could do:

RedirectPermanent /secure/ https://my.example.com/secure/

Or you could use RewriteRules for even more control. However, in the age of mass surveillance and constant threats from hackers, a general redirect to https is a good idea.

Could not perform immediate configuration on ‘python-minimal’

When I tried to update my Debian box, I got the following ominous error:

E: Could not perform immediate configuration on ‘python-minimal’.Please see man 5 apt.conf under APT::Immediate-Configure for details. (2)

It turns out that the fix is fairly simple. The following worked for me:

apt-get install -o APT::Immediate-Configure=false -f apt python-minimal

Creating New Outlook .PST Files in Office 2010

Back in the good old days, I am pretty sure, all the PST related stuff was in the normal file menu. Not anymore. I wanted to create a new PST file and I had to look quite a while before I found it – Microsoft has it hidden quite well:

It’s in the Home ribbon, under “New Items -> More Items -> Outlook Data File”.

I never liked those Ribbons, but anyway, maybe this will save someone else ten minutes.

WordPress: Images not displaying, Redirects not working

Moved my WordPress installation to a new server. I kept all paths etc intact, copied my VirtualHost and permissions were good, so I was at first surprised when my images didn’t show and redirects didn’t work. The cause was quickly found, however; it seems my old install had different default settings hidden somewhere in the Apache configuration.

I guess there may also be different causes, but in my case I fixed it by adding this to my WordPress VirtualHost:

<Directory “/var/www/wordpress/”>
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>

/var/www/wordpress is obviously the DocumentRoot of my WordPress install.

Lo and behold, my WordPress site wasn’t broken anymore.

OpenVPN Connect doesn’t work at all on iPad Air / new iPad Mini

Yeah this had me puzzled for a while. Basically, I configured the OpenVPN client correctly (I thought so anyway). When I attempted to connect to my server, both the in-App log window and the log of my server remained empty: From what I could tell, OpenVPN didn’t even try!

Well, it turns out that as of early December 2013, OpenVPN Connect does not work on 64bit architecture on an iPad or an iPhone. The developers expect an update in mid-2013 to fix this. So until then there is nothing that we can do about it. Too bad.

Update: Problem has been fixed in current versions of OpenVPN Connect.

Subversion: Dealing with Umlaute

I had a very annoying problem with my subversion today: A file had an ‘ö’ in it. I checked it in on Windows without noticing it, and when I checked the file out on my Mac it immediately caused a conflict:

A    Life/Jeppe Family History/Old &amp; Junk/jeppe neu
C Life/Jeppe Family History/Old &amp; Junk/Die Köter, auch Kotsassen ge.textClipping
A    Life/Jeppe Family History/Old &amp; Junk/jeppefamily.backup.gramps.old

Updated to revision 41.
Summary of conflicts:
Tree conflicts: 1
Nilss-MacBook-Air:docs nils$ svn up
Updating ‘.’:
At revision 41.

I attempted to delete the file, and at first this seemed to work:

$ svn delete Die Köter, auch Kotsassen ge.textClipping
D Die Köter, auch Kotsassen ge.textClipping

However, the conflict remained:

$ svn commit -m “Koeter”
svn: E155015: Commit failed (details follow):
svn: E155015: Aborting commit: ‘/Users/nils/Documents/svn/docs/Life/Jeppe Family History/Old & Junk/Die Köter, auch Kotsassen ge.textClipping’ remains in conflict

Interestingly, the file was now also missing on my local system. It may be my fault; but anyway, I was a bit lost.

In the end, the following worked:

$ svn remove –force ‘/Users/nils/Documents/svn/docs/Life/Jeppe Family History/Old & Junk/Die Köter, auch Kotsassen ge.textClipping’
$ svn resolve –accept=working ‘/Users/nils/Documents/svn/docs/Life/Jeppe Family History/Old & Junk/Die Köter, auch Kotsassen ge.textClipping’
Resolved conflicted state of ‘Life/Jeppe Family History/Old & Junk/Die Köter, auch Kotsassen ge.textClipping’

$ svn commit -m “Koeter”
Adding Life/Jeppe Family History/Old & Junk/Die Koeter, auch Kotsassen ge.textClipping
Deleting Life/Jeppe Family History/Old & Junk/Die Köter, auch Kotsassen ge.textClipping
Deleting Life/Jeppe Family History/Old & Junk/Die Köter, auch Kotsassen ge.textClipping
Transmitting file data …
Committed revision 42.

Notice the interesting double delete there…

Anyway, the moral of the story – as if I didn’t know already – avoid special characters like the plague they are.