Home » 2012

Getting ProFTPD to work on Ubuntu 12.04

For what I can remember it has always been possible (at least) since Ubuntu 7.04 to simply do a sudo apt-get install proftpd to get a working FTP server running. It seems that starting with Ubuntu 12.04 no more!

After installing proftpd on 12.04 (the package is now called proftpd-basic) you’ll be unable to start the service. I’ve tried it both as standalone and using inetd but neither would work. ProFTPD, or rather its init.d script will report ProFTPD warning: cannot start neither in standalone nor in inetd/xinetd mode. Check your configuration. Yes, that helps a lot.

Looking at the syslog I found the following message when trying to connect to the FTP server: error: cannot execute /usr/sbin/in.ftpd: No such file or directory. It turns out that this path is defined in /etc/inetd.conf and for Ubuntu 12.04 it appears that the proftpd-basic package doesn’t install these. If you don’t have the FTP service defined in inetd/xinetd it simply rejects any connection, giving less helpful error messages.

So the fix to this problem is rather easy. If the file doesn’t exist yet create /etc/inetd.conf (regardless if you use inetd or xinetd). Then, simply add the following line, or replace the existing one with the following:

ftp     stream  tcp     nowait  root    /usr/sbin/tcpd  /usr/sbin/proftpd

Now restart the service: sudo service inetd restart or sudo service xinetd restart.

So the only change you really need to make is change the path to the FTP server. This fix works for both inetd and xinetd. For a proper solution for xinetd please see the section below.

Proper xinetd fix

I reckon that the creators of xinetd decided to support inetd compatibility by supporting the /etc/inetd.conf file. If you want to configure xinetd the proper way you can create a config file for it in /etc/xinetd.d/ftp and stick the following lines in it:

service ftp
{
      disable = no
      flags                   = REUSE
      socket_type             = stream
      wait                    = no
      user                    = root
      server                  = /usr/sbin/proftpd
      server_args             = -c /etc/proftpd/proftpd.conf
}
  • socket_type: Sets the network socket type to stream.
  • protocol: Sets the protocol type to TCP
  • wait: You can set the value to yes or no only. It Defines whether the service is single-threaded (if set to yes) or multi-threaded (if set to no).
  • user: User who will run proftpd

And finally restart the service: sudo service xinetd restart.

(Source for setting up a service for xinetd).

Making PuTTY prettier and nicer to work with

PuTTY has been my go-to SSH client on Windows for years but I’ve found that it does require a couple of tweaks to turn it into the (almost?) perfect SSH client. Below are some tweaks to improve PuTTY.

Display characters the way it’s meant

For years I’ve put up with PuTTY displaying certain accented characters or other symbols in a bad and nasty way. This will cause tools likeĀ aptitude and tmux to look really awful. It was not long ago that I found that this behavior could be fixed by setting the proper charset. Go to Window > Translation > Remote character set and change it to UTF-8. Lines drawn by tmux have never looked so good. It also removed an annoying display glitch I was having with irssi.

If this doesn’t work make sure Bash is set to use UTF-8 by adding

export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
export LANGUAGE=en_US.UTF-8

to your .bashrc.

More about setting up an UTF-8 environment.

Change the default font

By default PuTTY uses Courier New but I’m not really fond of it. Instead I use Consolas bold at 10pt. Using this font with these settings gives fuller text that’s better readable and nicer on the eyes. At least in my opinion.

Use PuTTYtray

I use PuTTYtray so I can set a transparent background. Just set alpha to 220 and the transparency is just perfect. PuTTYtray also has support for hiding your terminal in the system tray, but I personally don’t use that. If you don’t need either then I suppose standard PuTTY will be good enough. I do recommend to install PuTTY along side PuTTYtray though as it ships with some useful tools for key generation.

Change right mouse-button behavior

By default a click on the right mouse-button pastes anything you’ve got on your clipboard to the terminal. If you’re aware of this than it’s fine, but sometimes it can cause some inconvenience. Instead, change its behavior so a right mouse click will show a context menu which aside from pasting from the clipboard also adds some other useful shortcuts. You can find this setting under

Window > Selection > Action of mouse buttons and set it to Windows. The default is Compromise.

Full screen

If you use multiple screens (or not) you may already be resizing your terminal to fit the screen. Instead of full screen with the window border, title and scrollbar there’s also a full screen mode that removes this and uses the entire screen as your terminal space. To do this you need to enable this in

Window > Behaviour > Full screen on Alt-Enter. Doing so will let you use Alt + Enter to go to full screen.

Other settings?

In case I’ve missed any useful tweaks that improve usage of PuTTY I’d like to hear about them in the comments.

Using the IRC client irssi

Ever since I got my Raspberry Pi I’ve been using irssi for my IRC needs. Pidgin used to be my favorite client of choice for IRC and almost any other protocol. What makes irssi great is that I can keep it running on my Raspberry Pi and can resume my chat sessions wherever I am on whatever device (phone, iPad, iPod Touch, Laptop, Desktop) thanks to SSH and tmux.

These are some of the common shortcut keys I use a lot:

  • alt + p for page up
  • alt + n for page down
  • alt + left/right for switching tabs
  • alt + 0..9 for switching tabs

Aside from alt + p and alt + n you can also use PageUp and PageDown, but when I use my iPad via iSSH and my Bluetooth keyboard those keys aren’t available, and command + up / command + down don’t seem to work in iSSH.

And some other commands:

  • /who to list the users in the current channel
  • /join for joining a channel
  • /server for connecting to a server, this will replace your current connection though
  • /connect like the above, but keeps other connections intact
  • /help to show most commands, if not all

You can do a lot more with irssi than this. For example, you can write your own plugins. I haven’t had the need for this and I only use IRC for basic chatting really. If there’s a cool feature I’m missing out on I’d be glad to learn about it, so leave a comment if it’s worth mentioning.

My required Windows software

I try not to do it too often, but every few years you’re faced with reinstalling your PC. The reason for this can be various, such as replacing your old PC or recovering from a crash. Of course, the remedy for crashes are backup images, but those can sometimes be out of date. I do a daily data backup but only about yearly a system state backup. And then there’s managing your different systems (PC, laptop(s) etc.) to contain the same software as well.

So a few months ago when I built my new PC I decided to list the software I was installing for reference and to make a blogpost about it. I’ve tried to group related software and for some I’ve added a little description describing its task it’s doing for me, but haven’t included links to their respective websites yet. I might add them in the future though.

Programming

Since I’m a programmer by profession I need to have access to several languages and tools. These tools and languages have several needs which can be either work, school or hobby, or and combination of these.

Visual Studio 2010 Pro

A most excellent IDE for developing C# projects. I’ve also used the Express editions which are as well, but for my school projects the Pro edition is more suitable. Thanks to the DreamSpark initiative I have a free student license.

Haskell Platform

This is the way to go to get the Haskell toolchain installed on your PC (be it Windows or Linux, there’s probably an OSX version as well). For now Haskell is purely a hobby language for me.

BlitzMax + BLIde + MinGW + Logic GUI + Maximus

Another hobby language for me is BlitzMax. If you want to really enjoy programming in BlitzMax you need BLIde; it’s the ultimate BlitzMax IDE available. MinGW is also required for being able to install 3rd party modules and for installing these modules I use Maximus. Maximus is currently the only module manager for BlitzMax and provides a single repository for hundreds of 3rd party modules. Logic GUI is used for building MaxGUI forms.

gVim

For years I’ve used Crimson Editor for most of my coding needs and it has served me well for several years. But development on CE had halted and the editor started to outdate. After that I’ve used Dreamweaver a lot at work and Notepad++ after that. I never really liked the last two and before I got to gVim/Vim I tried several others such as Aptana, Eclipse and NetBeans. I hated them all. I then decided to give gVim a shot and sure it took some time to get used to the (all) the key commands and shortcuts but the invested time has been worth it. With gVim I can do more with less key presses which is rather nice for someone who has ‘delicate’ hands.

Strawberry Perl

I used ActiveState Perl before but made the transition to Strawberry Perl a couple of years ago. I use Perl both professionally and personally. Perl for Windows had always been behind on *nix but with Strawberry Perl there’s finally decent support for XS modules (that are cross-platform compatible) as it comes with MinGW. ActiveState always had PPM but it had always been behind or lacking some (crucial) modules. I’m not sure on the current state of ActiveState Perl but I guess it has improved over the years. For me Strawberry Perl gives me a very decent and robust Perl compiler for Windows.

NetBeans

I don’t like Java. I really don’t like it. I prefer C# over Java. The reason I need to use Java is because of school. I’ve had very bad experiences with Eclipse so I gave NetBeans a try (it was also the preferred IDE of my teacher). NetBeans is OK and so far I can manage with it. It’s also not as slow as I had expected of a Java application.

Virtualization

This has been possible for several years but only since the last 5 years or so I’ve found performance on normal consumer PC’s to be acceptable. I think virtualization is awesome and I use it all the time to run a private home server as well as setting up project specific virtual machines.

Virtual Box

Virtual Box is free and very performant, at least for home usage. It’s also free. I’ve used VMWare Workstation and VMWare Server (free) in the past and they’re good alternatives. My issue with the Server edition is that you’re required to have a password protected account on your Windows machine (not sure if this is still the case though). Its website interface is a tad bit slow as well. Virtual Box doesn’t have these issues and has a clean and responsive GUI. On my new i7 PC the virtual machines run very fast. So far I’ve been able to run Windows 7, OSX Snow Leopard and several Linux distributions, all at the same time and still very performant.

Vagrant

If you don’t know Vagrant yet you really should look it up. It’s an application for quickly building a customized virtual machine which can be automatically provisioned by a tool such as Puppet or Chef. I use Vagrant for Maximus and work related projects. Thanks to Vagrant it doesn’t matter on which machine I’m working on. All I’ve got to do is execute a vagrant up command and the virtual machine is being configured, booted and provisioned for my project so I can start developing. Thanks to Vagrant you no longer need to spend time on getting your development environment in a similar state as your production environment.

Office

I really only use office suites for text processing.

MS Office 2012

I’ve never really liked MS Office. It has become better ever since they introduced the Ribbon interface. Some hate it, but I like it. The only problem I’ve still got, even after all these years, is that MS Office always messed up my markup. Paragraphs get converted to headings, or the other way around and messing up the auto-generated index. I really only use MS Office at work or when my fellow students use it for writing project reports.

LibreOffice

I always used to have OpenOffice installed, but switched to LibreOffice due to all the commotion around it. I enjoy the auto-suggestion for earlier used words when typing as it can speed up writing your text. One thing that has started to annoy me though is that, just like MS Office, LibreOffice is starting to mess up markup as well.

Internet

A bit of a general category since most listed applications connect to the internet someway.

Dropbox

Dropbox is an awesome tool to have a shared directory on all of your devices (PC’s, mobiles, tablets and whatnot).

Google Chrome

The fastest browser around to my taste. It has replaced Firefox as my main browser several years ago. It’s not perfect though. Memory usage can become quite high, but most if not all browsers share this same problem. When starting Chrome it can sometimes happen that a tab won’t display the website in the whole frame. Another annoying issue is that there’s a commonly used Flash video player that rarely works. The developer tools have surpassed those of Firefox as well.

Mozilla Firefox

Firefox used to be my favorite internet browser, but after version 3.5 the browser has become too slow to be usable for me. I still use it a lot for developing websites for work, but Firebug has become more of an annoyance than an enjoyment. It occasionally happens to me that when editing a CSS property that the whole property disappears. This an only be remedied by reloading the entire page and to try again.

Thunderbird

This has been my e-mail client for years. At work I use MS Outlook but I find it to be too slow and clunky. The same can now also be said for Thunderbird though. I really enjoyed Thunderbird 3, but all versions after that are just horrible. On my i7 PC the latest Thunderbird runs fine, but that’s thanks to the CPU. I haven’t found an alternative to Thunderbird yet though. Till I find one I’ll stick with it.

PuTTY / PuTTYtray

A very decent SSH (and Telnet, and more) client for Windows. I use it all the time to manage the Linux servers I need to administer. I recently replaced PuTTY with PuTTYtray as it supports clickable links (useful whilst in IRC) and window transparency.

Skype

A very nice solution for setting up voice chat during a game! I’m not too fond of its interface but it works. The chat system and history can be a bit confusing and for some reason my headset never stays the default audio device.

Pidgin

Aside from Skype I’ve still got some other IM accounts such as MSN Messenger. Pidgin supports lots of protocols and makes it possible to be signed on to them at the same time. I used to mostly use it for IRC but these days I run irssi on my Raspberry Pi so I hardly log in anymore. But it’s still nice whenever I need to get on MSN Messenger or Facebook Chat.

ĀµTorrent

A lightweight BitTorrent client. I don’t use it a lot but it never hurts to have BitTorrent client available.

Shrew Soft VPN

A free and OpenSource VPN client which I use to connect to my employer’s network. I also use The Greenbow Client for this, but only got one license for it and since I use several machines that doesn’t really work out. I’ve also found Shrew Soft VPN to provide more stable connections than The Greenbow Client does.

FileZilla

Lightweight and free FTP client. I also use a small application called FTP Sync which was developed at work to automatically upload changed files. It’s actually a simple Perl script, very useful but I can’t distribute it.

GrabIt + Spotnet + Quickpar

Usenet is a wealthy source of information and content. I don’t download a lot but when I do I use Usenet because of its speed. GrabIt is a nice and speedy Usenet client. Spotnet is used to quickly find something and Quickpar is for repairing damaged or incomplete files. All these applications are free to use.

Multimedia

Music, video and games.

iTunes

Probably not the best music player out there, but it’s required for my iPod Touch and iPad, so I have to use it.

VLC Player

The video player that plays all video formats. I used to install CCCP which came with Media Player Classic. That used to work well for me in the past but with new video codecs coming out and such VLC Player has proved to be better. I do wish that VLC Player wouldn’t rebuild the font cache as often as it did.

Steam + Desura

I’m not really a PC gamer and had to get used to the digital distribution of games. At first I didn’t want to use it as I used to like to own a hardcopy of a game. These days on PC I find availability on Steam the main reason to get a PC game or not. If it’s not on Steam I won’t get it as it means I need to store the installer of the game somewhere. For console games it’s the other way around though, I prefer a hardcopy.

Because some games from certain bundles only came on Desura I decided to install that client as well.

Maintenance

It’s not the most fun thing to do but it’s something that needs to be done. Thanks to the tools listed below maintaining my PC has become effortless.

Free Disk Analyzer

Whenever I’m in need of cleaning up my hard disk I use Free Disk Analyzer to index my hard disk and then sort on file size. Doing so you can list big files fast, regardless of their location. It’s a nice method to delete that lost .iso file you forgot about. Though these days having a huge disk drive of 2TB this has become less of an issue.

Defraggler

With the Windows file system NTFS you’re required to defrag your hard disk from time to time. Whilst Windows has had this tool built in for years, the software shipped with Windows Vista and 7 doesn’t indicate how fragmented your data is, or show any progress. Defraggler solves this issue.

MS Security Essentials

For me this is the only tool I need to keep my PC clean from viruses, spy- and adware. I’ve used McAfee, Norton and AVG in the past and even though they’ve always kept my system free from junk I found them to be too heavy. MS Security Essentials is a lightweight and no-nonsense solution. It’s also free of use.

Acronis True Image Home 2012

I’ve been using Acronis for imaging (Linux) servers at work for years as well as my own PC. For my PC I’ve scheduled a daily data backup. I used to do a incremental with a maximum of 30 days backup but decided to have this limit removed. Whenever it needs to rotate backups it’s using up twice as much of disk space and it takes a lot of time to get this task done. Instead every now and then I move all the incremental backups to a separate directory, let the backup task run and have it create a new incremental backup. Afterwards I can simply delete the other backups.

Other

More general software I require.

Adobe Reader

For reading PDF files of course. I’m sure there are decent alternatives available but Adobe Reader has always worked well for me

KeePass

A password database that’s also available on iOS (and I think Android as well). You can and should password protect your KeePass file and store all your user credentials in this file. I use the password generation tool in KeePass all the time when signing up for a new account somewhere. Thanks to KeePass practically all my passwords differ from each other as they are generic. In case on of the websites I’m signed up with gets hacked only that account needs to get its password changed.

WinRar

The lifetime shareware application for un-rarring, zipping and tarring.

VirtuaWin

One of the best thing that Linux OS’s provide are window managers that support several desktops, like Gnome and Xfce do. I really missed this on Windows but with VirtuaWin you can have virtual desktops as well. I only use 2 virtual desktops: 1 for personal stuff and the other one for work related stuff. On my work-desktop I’ve got my editor opened, Firefox, several command lines and other required tools. When taking a break I an easily switch back to my personal-desktop and when getting back to work the applications on my personal-desktop won’t distract me from work.

Adobe CS5

I only use Adobe CS at work really. I’m terrible at graphical design and only use the tools for processing designs which were handed out to me by a designer. Of the CS tools I mostly use Photoshop and Fireworks. Fireworks is actually a really nice application and if you’re in need of creating an HTML image map this is the tool to go with!

MySQL GUI Tools + MySQL Server

This package provides MySQL Query Browser and MySQL Administrator, two fine tools for working with MySQL. I use Query Browser for every query related action. I used PHPMyAdmin in the past but it’s inferior to Query Browser in so many ways. Administrator is for managing my local MySQL Server and I also use the built in backup/restore functionality a lot. I believe it generates the same output as mysqldump.

VirtualCloneDrive

I used to use DaemonTools Tile for mounting ISO’s but I’m not very fond of all the adware that gets installed when you’re not cautious. VirtualCloneDrive works just as well and is also freely available.

ImgBurn

These days I don’t burn .iso files or other images much but for the rare occasion I’m in need for it I use this tool.

TimelineFX

A particle editor which was written in BlitzMax. I’ve had it for a couple of years now and have yet to really use. One day I’ll be in need of particles and then this tool will be readily available!

Spriteforge

A Blitz 3D based product which I purchased several years ago. It’s a tool for creating spritesheets out of your 3D models. Just like TimelineFX I’ve not used it a lot but it’s a nifty tool.

SlikSVN

I hardly use Subversion but when required it’s available on my command line. Beats the cluttering that TortoiseSVN does to Explorer.

MSysGit

Git for Windows which I use all the time. Would be nice if it were a little bit more performant and Git GUI didn’t crash as much when staging files.

BatteryCare

One of my laptops doesn’t give me an indication on how much time my battery has left, but this tool does. It can also show the battery’s last full capacity and how far it has degraded. Under Linux this is usually achieved by doing a cat /proc/acpi/battery/info (or something similar) but Windows doesn’t provide this information out of the box. Thanks to this tool I’ve been able to mark two new batteries as faulty and get them replaced for a good one.

Why more people aren’t using Ubuntu

If you’ve ever wondered why you’re the only Ubuntu user in your office, or in your group of friends, then you’re not alone. The free, powerful operating system, built on the Linux framework, is not only available to everyone for the sum total of zero anything, but is also adaptable, fast, and capable of satisfying even the most demanding user.

However, there are a number of issues which may put people off, or are why they simply don’t even know about Linux, let alone Ubuntu.

1) Market visibility

The problem with open source is that not only are you not Microsoft, and therefore the default operating system for almost every pre-built computer in the world whether the user is a handset engineer for o2 or a novelist, but you’re also not able to put out advertising or push Ubuntu into people’s awareness.

2) Linux’s “complex” reputation

Linux is known for being the least simple and straight-forward operating system out of Windows, Mac OSX and itself. Whether or not this is actually true is highly debatable. However, its reputation isn’t being changed by the legions who use it, and as it is rarely introduced into office environments for use by staff who aren’t working in the IT department, it seems like it could do with a bit of a jumpstart in the “it’s actually quite easy” department, given that it is no more complex than any other OS.

3) Accessibility

PC companies, I’m sure, would love nothing more than to lose money by offering Linux installs instead of Windows. Sarcasm aside, Ubuntu is something you’d search for, but not something you’d be presented with. The tech press needs to do a better job of opening people’s eyes to the potential of open source platforms, and users helping out can never be a bad thing either. After all, it’s free, easier on your hardware, and extremely capable, scaling with your IT skill level. What’s not to like?