setting locale to UTF-8 in Debian

If you have to deal with foreign languages and character sets (Cyrillic, Katakana, Hiragana, Kanji, etc) you need to have UTF support on your server. If you don’t already have it, here’s how you get it:

1. nano /etc/default/locale.gen and uncomment the line with en_US.UTF-8 (assuming your default language should be English)
2. locale-gen
3. edit /etc/profile and /etc/bash.bashrc and add the following: export LANG=en_US.UTF-8

When you next start a shell (exit, call bash manually, run sudo -s, whatever) you should then see UTF support available:

me@box:~$ locale
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

And you’re done.

RDP Client under Ubuntu

The performance of the built-in RDP clients in Ubuntu as of 10.04-LTS Lucid Lynx (and previous) is plagued with difficulties – Windows machines, among other things, frequently have events which refresh the local desktop every second or so which Windows’ native RDP client doesn’t trigger on, but for some reason the TS Client and Remote Desktop Viewer in Ubuntu does, making using same to control a Windows box a real hassle.

Fortunately, there’s a solution – as of 11.04 (Natty Narwhal?), Ubuntu will be migrating to Remmina as its RDP and VNC client. Better yet, Remmina is already available in the repos for 10.04 Lucid Lynx!

me@box:~$ sudo apt-get update && sudo apt-get install remmina remmina-gnome

After installation, you’ll find Remmina in Applications->Internet. Be sure to turn on the performance features “enable bitmap caching” and “enable compression”, they make a big difference. Also, you’ll find that Remmina supports transferring sound (leave it off if you don’t need it!), sharing local printers, and even sharing local drives! Pretty sweet. I’ve been very impressed with it so far. I haven’t experimented with the sound / folder / printer share options, but the performance difference is night and day.

setting a mail smarthost in exim on a Cpanel box

add a Router block to the end of /etc/exim.conf.local:

@ROUTERSTART@
            smart_route:
                driver = manualroute
                domains = !+local_domains
                transport = remote_smtp
                route_list = * host.name.of.smart.host.server

then run the scripts to update configuration and restart exim:

root@box:~$ /scripts/buildeximconf  
root@box:~$ /scripts/restartsrv_exim  

You’re done.

Solid State Drives

If you’ve never seen a machine equipped with a good Solid State Drive (SSD)… they’re pretty impressive.  In this clip, I’m putting an Ubuntu 9.10 workstation with an Intel SSD through its paces.

Some of the reason that machine is so fast is Ubuntu – the newest release has some pretty significant disk speed related enhancements – but the vast majority of it is the solid state drive.  (For those of you not familiar with Linux, it might help you to think of GiMP as “Photoshop” – both because it does pretty much the same job, and because both are notorious for being EXTREMELY slow to start up.)

You do have to be careful when you’re buying an SSD, though – they’re not all created equal.  In fact, some of them are absolutely atrocious, with significantly worse performance than conventional hard drives… so you need to know what you’re doing (or trust who you’re buying from) when you go that route.  In particular, anything with a jMicron controller in it is better taken out back and shot than put in a production machine.  You also need to be aware that you’re going to pay a lot more per megabyte for solid state – an 80GB SSD costs about as much as two 1.5 terabyte conventional hard drives.  So you probably don’t want SSDs (yet) for tasks involving large amounts of bulk storage.

But, as the video demonstrates… if what you need is performance, there’s nothing else in the same league; a few hundred bucks spent on a good SSD will give you more real-world performance benefit for most tasks than several thousand dollars spent otherwise.

It’s also worth noting that the current generation of SSDs are generally 2.5″ form factor, meaning they fit interchangeably in notebooks, netbooks, or desktop computers.  You typically won’t see as much of the top-end performance on a notebook or netbook – their SATA controllers usually bottleneck at a third of the top-end speed of the best SSDs – but they’re just as much (if not more) worth the upgrade, because conventional laptop HDDs perform much more poorly than full-size HDDs, so the speed boost is even more of a blessing.

10 PRINT “HELLO WORLD” : GOTO 10

Today I was telling my friend Chris about setting up Xrdp on Ubuntu Linux, and he said “you know, you really ought to write a blog for all the business stuff you do.” At first, it seemed redundant – I’ve been running technical wiki sites for years now – but after I thought about it for a while, it struck me as a really good idea. Wikis work well as a repository of knowledge, when you already know what you’re looking for and where to look, but introducing new ideas isn’t one of the format’s strengths.

So what will you see here? Day-to-day problems and solutions, covering most of the major platforms, with an emphasis on the needs you run across servicing power users and small-to-medium businesses.

Thanks for stopping by!