Better support for my server

Some stuff is missing on my server (because there is no X server) so add
some test before blindly running some commands.