Tag Archives: Linux

Years ago, I used to set up postgres on Debian servers. For a couple of test, I had to install Postgres somewhere: Installing on Windows is generally a breeze, but not needing the third-party tools, I decided to go back to Linux and install the database server on my Ubuntu box. While I didn’t have issues with importing test data/databases, there were minor things that had me briefly stumped. So, to install Postgres on Ubuntu and other Debian flavours, here we go:

First install postgres by entering ‘apt-get install postgresql’ in a bash-session/terminal

We need to properly initialize it and I would recommend to add your login user to Postgres: sudo -u postgres createuser -D -P arthur

I can’t recall the link to this specific page where I took that screenshot, but yeah, it’s about the colour red and the emotions it invokes in men. I think the link was originally coming from Reddit (or Digg), but I’m pretty sure it’s old news because I read about this a year ago. That said, red is for “Scarlett Johansen” and “meet local snowboarders”. Really.

There are rumours that Oracle might be willing to acquire Red Hat and this probably makes sense, because installing Oracle (XE) on Debian isn’t the administrative task you’d be wanting on your plate.

I run a mix of Gnome and KDE on one of my computers: for a couple of Mono related things, I ended up frequently running the Gnome desktop. Just today, I decided to follow-up on the notifications telling me that I needed to do a dist-upgrade (or rather a partial upgrade), which seemed to suggest that the latest KDE version was finally making it to me. Yay.

Everytime I re-open (or rather revisit) KDE I get surprised, and today was not an exception: once again, it looks like the KDE team seems to hammer out excellent releases. I don’t see a point to go through what has changed, this something you can probably find from the release notes, which, today, I don’t feel like pointing out where they are. OK, that was a joke.

But seriously, on this lowly laptop, windows zoom by, close up, roll down and all in a sober and subtle manner. There appears to be less disk activity, which suggests that performance has improved since the latest Neon release I was running here a while ago. I find Konqueror still clunky and not so flawless yet (there’s that evil non-Flash player bit), however, the spelling checker finally seems to be working. There are still too many unnecessary messageboxes popping up (the notifications are pretty good and useful) asking me to confirm too many things at times. I definitely (still) can’t stand the “Plasma” desktop windows. For some kind of reason, I can’t stand the way how the “close bar” seem to automatically appear on the right or left side of the window.

Seriously, this looks like a major release (or setback if you’re in the other camp), with features like KDE 3.5, OpenOffice 2 and, yeah, oh, dear, I know where this is going to, why, Debian, why? From the earlier mentioned/linked to interview with the Debian Project Leader:

TR: But have you ever considered a Gnome-like approach to releasing – that is, always release after 6 or 12 months, and stick steadfastly to that?

SM: So far within Debian we’re happy with the ‘release when it’s ready’ approach. We like to do stable releases, it’s very important for us and to our users, but we want to make sure that it’s right. We can aim for a particular date, but unless we get a lot of buy-in and know for a fact that it’s going to be ready, we’ll happily let it slip another couple of months and make sure it’s good.

On the flip-side, Debian’s careful release schedule at least ensures that users won’t get the KDE 4.0 and other bleeding-edge crap: By the time KDE has matured, Debian user will have a working desktop environment. And as they say, when packages land in Debian ‘stable’, they’re most likely stable.

Earlier, I was reminded of the typical run-levels on Linux systems, particularly on Debian-flavoured distributions. For future reference1:

Run level 0: System Halt

Run level 1: Single User/No networking (“Safe Mode” for Windows connoisseurs). In this mode daemons won’t be started.

Run level 2: Full Multi-user

Run level 3: Full Multi-user, same as two, but commonly used for text console login.

Run level 4: Full Multi-user

Run level 5: Full Multi-user, same as two, but commonly used for full-blown X-Server login.

Run level 6: System Reboot

There are specific commands to tell the environment to go to any of the earlier mentioned run-levels: however, as a normal user, the only way you generally switch level is via the ‘shutdown’ command (which as you guess either changes the run-level to 0 or 6. As the Debian Administration mentions, this is probably a command you want to learn by heart. Well, at least you should be familiar with the following command:

shutdown -h “now”

So, yeah, you have a daemon that got stuck during boot-up and how do you get into Run-level 1? Most Linux distros nowadays use GRUB as a bootloader (without peeking at Wikipedia, I think that stands for ‘Grand Unified Bootloader’), so if you’re a LILO user, sorry. Anyway: GRUB allows you to interrupt the boot-process and issue extra command-line parameters (press the ‘e’ key) before booting the computer. On simple Debian-based systems (Damn Small Linux): To boot right into Run level 1 the only thing you need to do is to replace the last number of the main boot command (‘kernel’) to a 1 (most likely it will say either 3 or 5). You can also append ‘single’ to the commandline, apparently. Debian-based flavours that run X-Server and that (Ubuntu fellows, I look at you): to boot into single mode, just press ESC and select (any) of the recovery modes presented to you by GRUB.

1 Nowadays, Debian Administration is not one of the most stable sites it appears…

The last time I checked, was that Linux’s was actually taking out more bytes (ha-ha) out of the Windows Server market, which is basically because the open-source operating system is so easy to install on older hardware and that. Well, that is if you use Debian, of course.

A NASA team announced the discovery of cosmic radio noise six times louder than normal. Apparently, this noise happened in 2006 and after plenty of peer reviews, it appears that this (yet unknown) noise was not related to anything that humans do on earth. However, the researchers are still not sure what created this noise.

You thought we suffered economic hardship? In Zimbabwe, the government just introduced a $50 billion note, which (apparently) just buys you a loaf of bread in that same country. I am curious who’s portrait is prominently showing on that note, but on preview, I don’t think too many politicians (except for the dictator kind of types) would want to have his (or her’s) face on a bill that’s probably only usable for wiping one’s nose.

I‘ve been working so much on Vista and XP lately that I forgot about the release of the first beta for KDE 4.2, so naturally, I decided to download the latest binaries (“Neon”). Barring any bugs, I have to say I’m impressed. The following I felt were worth mentioning:

There’s an interesting fade out from initial boot-up screen to Desktop. It’s subtle but extremely effective.

The Taskbar is finally looking good, and yes, it does actually auto- hide. Grouped applications are shown actually better than in Windows: KDE shows them stacked with a number of open ‘grouped’ windows. There’s plenty of more settings you can finally set: however, I’m not sure if I like the way how you have to set and move sliders to resize the Taskbar.

The KDE Main menu has been overhauled (more ‘blackish’) and there’s a (once again) subtle change in the ‘hover over’ tabs in there

The ‘Cover flow’ like Screen Switcher works smooth and perfect, even on lower-end graphical system.

There’s a whole bunch of notification popping up when some actions finish. I don’t like them all (the less the better), but it’s (generally) visually ‘pleasing’.

Wallpapers can be made dynamic: actually, these are more or less plug-ins now, which means that you can have running slideshows and even running Mandelbrots…

If you happen to run KDE 4.1, the easiest way to upgrade is to add the following line to your sources.lst file:

deb http://ppa.launchpad.net/project-neon/ubuntu intrepid main

Then run a normal apt-update followed by an ‘sudo apt-get install kde-nightly’. Remember to log-out and select the KDE-nightly session at the boot screen and you should be good to go.

I read this article at SecurityFocus “Analyzing Malicious SSH Login Attempts”, which apparently was written over 2 years ago. The article goes over some statistics collected over a period of 22 days and points out interesting things I’ve seen before too (in a previous life).

Combined with an army of IRC bots, an attacker only needs 525 Zombies to scan the entire IP4 of today’s public Internet in just one day. If you have a publicly accessible SSH server, you are very likely to be targeted by one of these attacks

I used a combination of python scripts to hold off specific attacks: particularly the attacks that try hundreds of username and password combinations in only a couple of minutes (the brute force ones). The main script focused on keeping a count of attacks from a single IP (a maximum of 3 or 5 retries) and offenders were put on a 24 (or 48) hours waiting list, via the deny/accept host files. If I remember correctly it was based on BlockHosts. This worked extremely well and formed a good deterrent and first line defense, telling these script guys that (at least) someone cared about the server. Besides this, it is probably a good idea to only allow people who know SSH access to the server and consider enforcing a strict password policy.

Idecided to give KDE 4.1 a go on my current Ubuntu (Hardy Heron) install: There are many sites around with instructions how to install KDE on your Gnome-enabled installation, so I won’t go in too many details. The idea is to add specific Kubuntu sources to apt, log-out by choosing a different window manager (using a different session, particularly if you plan to keep Gnome) and then log-in as usual.

You still need the install applications of course: So, you may want to look for Konqueror (Firefox works OK, but, will look ‘GTK-ish’), Amorok (audio) and Kaffeine (video), KPhotoAlbum and yes, digiKam: Kubuntu uses the (KDE specific?) Adept application to install 3rd party software.

I’ve used KDE 2 and 3 in the past: KDE 4.1 is generally impressive but still shows inconsistencies so once in a while. For example, during the first startup, a default Folder View shows up empty (Desktop): The point (apparently) is that you’re supposed to drag your frequent used applications in there. There are other quirks, like non-hideable panels (what?) and that widget stuff: uh, don’t count on it working too well because, on the overall, it doesn’t feel thought out.

If you can live with that, there are a lot of excellent applications for KDE. Amarok feels like a work of love and makes all those Gnome music players look like Windows 3.1 applications. Kaffeine looks (a lot) less boring than Gnome’s ‘Movie Player’. Konqueror feels fast, but, be forewarned that you probably have to muck around with settings: for example, GMail refuses to work in Konqueror unless you set it to send the ‘Mozilla 1.7′ or ‘Safari 2.0′ identification strings. This is not entirely Konqueror’s fault: Google itself doesn’t (officially) support Konqueror.

Earlier, I was already surprised about Gnome/AWN’s minimal system requirements. The same is true for KDE 4.1: it runs excellent on the current system (a 512 MB Centrino based laptop with one of those crappy GMA video cards).

I found out that VirtualBox 1.6 (finally) supports Solaris: Earlier attempts were an exercise in futilism (that’s not a word, but I like the sound of it). I did install it on the Windows PC (that’s the one I haven’t touched for ages) and, hurrah (or huzzah). Thank Sun for that (after all, they bought up VirtualBox, in March or something. I was a kind of disappointed after I saw the ‘Java Desktop’ pop-up: Gnome. It’s fairly well organized though.

Via Metafilter, I was redirected to ‘OpenSourceFood’ (original Metafilter thread), which is a site where people share recipes under the Creative Commons license. I find it silly to have recipes ‘open sourced': many generations of people already shared recipes for free. Probably related is this entry at xsamplex (the videosite ‘I’mCooked’, which has everything about cooking too, or something).

Last week, I briefly checked out Nimblex, which is a site that allows you to make custom Linux distributions, via a (nifty) Javascript interface. If I’m correct, it’s all based on Fedora and it might fit what you’re looking for. For more finegrained (and complex) custom distributions, you’ll probably want to look at Linux from Scratch, or even better, Debian from Scratch.

Last night, I was installing CVS on my Debian box. Actually, it was already installed: the CVSROOT was ready to go and the service itself had been listening since the early days. However, I never finished assigning rights to myself, so, with that done and by adding myself to the cvs group, I was finally able to check in my latest Helios sources using WinCVS (I despise TortoiseCVS1).

For work, I had once added viewcvs to the CVS repository engine: Viewcvs allows developers to view the repository via a webserver. Easy as is: During its install (apt-get install viewcvs), I ran into the normal installation checks and changes for this specific script: Most of them can be resolved by Debian’s viewcvs installer but (as usual) you should prepare yourself for some old-handy typework. The first action on your list is to add a couple of Aliases to Apache’s httpd.conf file (in my case I was only interested in one, the viewcvs ‘docroot’ parameter: I don’t like graphics2).

Alias /viewcvs/ /usr/share/viewcvs/

The next step is to set the ‘docroot’ and ‘icons’ folder parameters in the viewcvs.conf file (/etc/viewcvs/): these folders refer to the folderstructure on the webserver and not to the physical folder structure on your Linux system (hint: check Alias). After this, you can set the use_cvsgraph and use_enscript variables in that same file to 1.

Enscript is a ‘source code highlighter’, but (obviously) it doesn’t come with a state file for C#: I found a good one at Adam Milazzo’s (Thanks Adam). This file should be copied to the enscript states directory (on Debian that is at /usr/share/enscript/hl). Also, you will have to make a couple of changes to the enscript.st file (which is in the same directory): add the csharp highlighter to the namerules section. The final step that needs to be undertaken is a change to the viewcvs.py file (you generally should be able to find this at or around /usr/lib/python2.3/site-packages/viewcvs/). Look for the enscript_extensions section. Notice the comment that one of the programmer left behind, just right above that extensions section:

### this sucks… we have to duplicate the extensions defined by enscript

You wouldn’t say.

1 Yeah, I was going to write something here, but I forget. Oh right, something about TortoiseCVS and how I hate it.2 Uh. Right. What was that again?

Earlier today, the WordPress developers released a fix for a security issue in the xml-rpc code. There’s no need to completely upgrade your installation: upgrading overhere is sort of painless and that’s not because of the fact that my host provides automatic upgrades. Bored as I ever am, I finished up a couple of update shell scripts, which, if I have time, I could poke online one of these days. This is actually so basic, that, well, maybe you just should stick to your command-line typing skills. If your host allows you to use wget via SSH, consider yourself extremely lucky.

Other stuff: over here, milk is getting a couple of cents more expensive a liter (70 cents 5 cents1 I believe, which is more than a couple). I’m not sure why I mention it here but maybe this is related to my hunt for moo-cows (I mean, my Internet hunt for the origins of the word moo-cow). I think I’ve mentioned ‘super cow powers’ before, haven’t I?

Normal cells should not be affected by the virus-killing lasers or sound waves because they have resonant frequencies much lower than those of viruses. Moreover, it is unlikely that viruses will develop resistance to mechanical shaking, as they do to drugs.

And last but not least is this Horizon episode (BBC/Video at Google): What on Earth is wrong with gravity? The documentary goes into details about the missing links between Newton’s (mechanical) laws and Einstein’s General Theory of Relativity.

Last week, Walmart (evil Walmart) started to sell the Everex TC2502 gPC for only 199.00 US (Thanks to the high Canadian dollar, that is in or about 50 dollars CDN1, or for Europeans, that is 5 EUROs: yes, approximately the price of an ordinary pack of cigarettes). It’s out of stock because of three reasons: it runs Linux (an Ubuntu/Debian variant), it carries an extremely low power VIA C7 processor plus, well, it’s cheap. About that Linux flavour: it’s running gOs, a somewhat heavily-web-orientated Linux focused on delivering Google Web applications to the desktop.

I’m not sure, how I ended up at this link (Probably via Linux Devices), but if you consider the above option not ‘green enough’, how about a 12 Watt computer (using an AMD Geode CPU).

And to top it off: Phoenix Technologies introduced a firmware product called HyperSpace, which allows PCs to run a number of applications separate from the host operating system. It’s obviously Linux based (“secure Linux environment”) and the idea is (obviously) to allow people to repair locked up (Windows) systems (sort of like, Knoppix in the BIOS).