Simulate the environment of Cron Jobs

Often you will find yourself in the situation that one of your cron jobs works perfectly if you execute it manually but fails as soon as is gets executed by cron. The root cause might be the different environment. To simulate the environment of a cron job add the following entry to your crontab using crontab -e:

This will create the file cronenv in your root directory and dump all available environment variables into it. Once the file was created remove the entry from your crontab and take a look at its contents:

This pretty much sums up the environment. To enter this environment use the following command:

Now you can execute your cron job command, see what happens and fix your error. Once you’re done simply type exit to leave the environment.

See this Stack Overflow answer for more information.

Posted in Debian, Ubuntu | Comments Off on Simulate the environment of Cron Jobs

Ubuntu: Mount encrypted home directory

After changing harddrives I needed to transfer some files from the old harddrive which had an encrypted home directory. The command

did not work: pointed me in the right direction. First mount the old hard drive in the new Ubuntu installation. Then run

to add the corresponding passphrase (32 digits). Remember the second sig and mount your directory with

You will need to answer some questions. The suggested default works except for the following two questions:


In my case some warnings were shown saying that encryption may not have worked properly and if mounting should continue. Despite those warnings all files were accessible.

Posted in Ubuntu | Comments Off on Ubuntu: Mount encrypted home directory

Debian 8: gdm3 crashes instantly with “Oh no! Something has gone wrong”

After upgrading several Gnome 3 (and other) packages and rebooting I was unable to get to the gdm3 login screen. It crashed instantly with the message “Oh no! Something has gone wrong”. After checking various log files and consulting the internet I found a bug report which provided a (very simple) solution:

That’s it.


Posted in Debian | Comments Off on Debian 8: gdm3 crashes instantly with “Oh no! Something has gone wrong”

seafile-cli: “waiting for sync” and “status unknown”

If you’re runing the latest version of seafile-cli (4.3.2) on Debian you might encounter the following error in your seafile.log:

This is because the client is built on CentOS where the CA certificates reside in a different location. Luckily there is an easy fix available (see

That’s it – restart your client and it should sync again.

Posted in Debian, Seafile | Comments Off on seafile-cli: “waiting for sync” and “status unknown”