Open a new window here in Ubuntu Linux

cmdline.png

One of the things I missed a long time ago in Windows completely was the handy “start” command I could type from a command prompt to open a new Windows Explorer window in whatever directory I was in. Can you still do that? Does anyone use Windows from the command prompt any more?

nautilus.png

I have since discovered you can do the same thing in Ubuntu Linux (and any other Linux for that matter of course!). I’m a big fan of Gnome, which uses the Nautilus file manager. If you’re fond of navigating your computer using a terminal, it’s really easy to open a Nautilus window in the current directory. Simply run ‘nautilus .‘ and a new window will open in that directory.

Don’t tell me you’re a keyboard junkie, I am too. I use Vim! Nautilus is still very useful though. Besides it’s obvious use as a file manager It’s dead handy for copying files to a remote server using any number of transmission protocols from ssh and SMB through to plain old ftp. But more on that some other time eh?

Ubuntu's useful apt-get hints

Ubuntu 7.04, or Feisty Fawn as it’s known to it’s friends, has added a neat upgrade to the apt-get tool. For those who don’t know, apt-get is the tool Ubuntu uses to install and remove software. A small problem in the past has been trying to figure out what the name of the package required was.

In Feisty Fawn, if you try to run a command that isn’t installed a small message will be displayed telling you how to install it! The software has to be in your repository, so typing notepad and expecting it to tell you to apt-get install windows isn’t going to happen!

This morning I needed to update my local WPMU work area so …

$ svn update
The program 'svn' is currently not installed. You can install it by typing:
sudo apt-get install subversion

apt-get moo still works too! :)

Filter spam through Postfix and Spamassassin

It has been a long time since I used and configured Sendmail, and I don’t miss it one bit now that Postfix is on the scene, but the amount of spam I receive does bother me. My Junk folder had reached 160MB, mostly due to some idiots sending huge spam attachments, but also because spam still works and a majority of the email circulating is spam and not legitimate.

Spamassassin is how we fight back. Unfortunately it needs a reasonably powerful server, gobs of memory and CPU when there’s a lot of incoming email and time to configure. Using spamd/spamc makes things easier on your server but it’s still a hefty price to pay for being spam free.

Here are a few pages I found useful this morning when getting things up and running on my Ubuntu server:

I also recommend running Postgrey to stop some junk mail before it gets into your system at all.

Now, if only there was a Spamassassin for the junk mail and clothes collection leaflets we get to the front door. How’s about a Defense Tower that would fire pellets when it noticed someone with leaflets calling to the door?

Edit: Justin talks about one of Spamassassin’s honeypot traps and about goings on at Blacklist.ie

Shutdown Ubuntu with ctrl-alt-delete

Power cuts are becoming a way of life for many people and here in Blarney we get our fair share of them unfortunately. The second in as many weeks happened this morning and before I could rig up a network cable between my laptop and desktop the UPS powered down and my big noisy desktop died with it. Thankfully without filesystem corruption.

Normally when you press the magic combo of ctrl-alt-delete the machine reboots but in this case it would be much better if the machine did a shutdown. In previous versions of Linux I had to edit /etc/inittab to get the desired effect but that file doesn’t exist in Ubuntu Edgy. Instead you must look at /etc/event.d/control-alt-delete. That file is fairly self explanatory which is all well and good because there’s very little information if you don’t know what to look for.

According to a post here, “Ubuntu replaced init with upstart event daemon”. It’s simple to change it to shutodown. Replace “-r” with “-h” in the following line:
exec /sbin/shutdown/ -r now "Control-Alt-Delete pressed"
No need to run inittab, just hit the magic combo to halt the computer!

PS. thanks so much for all the comments yesterday and the day before. I was bowled over by the response to both posts, especially the Daffodil Day one which struck a chord with many people

That mouse presses all the right buttons

Having just installed Ubuntu Edgy on a squeaky clean partition I’m still migrating some of my settings and programmes from my last Ubuntu install. Why did I reinstall when an upgrade from Dapper already went well? Unfortunately in the course of configuring my Wacom graphics tablet I broke my sound and for the life of me I could not remember how to fix it. That and I was running out of space and there was a nice 28GB NTFS partition doing nothing but taking up space..

Your mouse is probably luckier than some but if some of the buttons on it don’t work then look for the following line in /etc/X11/xorg.conf:
Option "Protocol" "ExplorerPS/2"
and change it to this:
Option "Protocol" "ImPS/2"

I hate middle mouse button clicking on a scroll wheel and this Microsoft mouse is worse than others. The side button works much better for me! Finally, I can press the right button again! :)

Oh and good luck if you have a widescreen monitor. My Dell 2405 LCD barfed every time I tried the graphical install. I had to look for the “alternate” cd and do a text install, and then install the proprietary Nvidia drivers and add a suitable modeline to /etc/X11/xorg.conf. I haven’t done that since I don’t know how long ago. Definitely in the last century.

Linux Ubuntu Dapper to Edgy – no problem

I upgraded my Ubuntu 6.06 install to the new Edgy soon after it’s release using the simple command gksu "update-manager -c". Several hours later, and after clicking on a few dialog boxes to update files in /etc/, I’m not running Ubuntu Edgy on my desktop box.

Initially I wondered where Firefox 2.0 was hiding, but on my upgraded system it’s /usb/bin/firefox.ubuntu so it’ll live alongside version 1.5. I also noticed that when saving files in the GIMP the filename would disappear when I clicked on a new folder in the “bookmark” folder of the Gnome file dialog. Once I noticed, ctrl-c to record the filename and ctrl-v to paste it in again worked fine. I rename my files when saving so it’s not much of a hardship.

My machine seems slightly faster but I haven’t delved too deeply into what has been upgraded but Firefox, xchat, terminal, GIMP and Gthumb all work fine! Did your upgrade go as well?

Xgl on a live CD

If you want to try Xgl to see what all the fuss is about, then you should download the Kororaa live CD. I downloaded the 441MB iso, burned it on CD and rebooted into Xgl.

Wow. All the eye candy looks great, the cube revolved when I switched desktops or dragged the background with CTRL pressed. Dragging windows from one side of the cube to another desktop was really cool, but not as much fun as watching a sticky window bend and deform as I dragged it!

As someone pointed out on digg, it’s not just eye candy. The openGL powered desktop uses my video card to move pixels around and feels responsive. I’m very tempted to upgrade to Ubuntu Dapper so I can install the Xgl binaries! (via)
Later… I updated my Ubuntu install to the latest Dapper release using apt-get dist-upgrade and after some minor fighting with a customized xorg.conf and following the instructions I have an Xgl powered desktop! Nice.
Slightly Later… I found a showstopper bug. It doesn’t do full screen image viewing. At least as far as gthumb or f-spot is concerned anyway. Gthumb just dies and F-spot displays a thumbnail in the corner of a grey screen.

Some people had the same problem playing movies and the solution was to use openGL as the full screen driver but I don’t think the same can be done with an image viewer, can it?
It’s alpha software so hopefully this will be worked around sooner or later!

Upgrading to Ubuntu Breezy

I resisted for as long as possible, but I finally upgraded to Ubuntu Breezy.
It was quite easy in the end. The upgrade notes and this page were of some help of course.
Be warned, that if you have GNUcash installed on Hoary, you should uninstall it. I didn’t and ran into these problems with libofx2. How to fix? Uninstall gnucash with the following command:

dpkg -r gnucash
dpkg -r gnucash-common

Now, run apt-get -f install and finally apt-get dist-upgrade again!

I can’t run GNUcash yet, I hope they get this fixed soon! (In an ironic twist, launchpad.net is down for maintenance, it’ll be back later!)

Later! I discovered how to fix the problem with libofx2! You need to remove libofx0c102 first!

# apt-get remove libofx0c102
Reading package lists... Done
Building dependency tree... Done
The following packages will be REMOVED:
libofx0c102
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
Need to get 0B of archives.
After unpacking 803kB disk space will be freed.
Do you want to continue [Y/n]?
(Reading database ... 84490 files and directories currently installed.)
Removing libofx0c102 ...
# apt-get install libofx2
Reading package lists... Done
Building dependency tree... Done
The following NEW packages will be installed:
libofx2
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0B/454kB of archives.
After unpacking 3731kB of additional disk space will be used.

Preconfiguring packages ...
(Reading database ... 84466 files and directories currently installed.)
Unpacking libofx2 (from .../libofx2_1%3a0.8.0-3ubuntu8_i386.deb) ...
Setting up libofx2 (0.8.0-3ubuntu8) ...
# apt-get install gnucash
Reading package lists... Done
Building dependency tree... Done
The following extra packages will be installed:
gnucash-common
Suggested packages:
gnucash-sql gnucash-docs
The following NEW packages will be installed:
gnucash gnucash-common
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 0B/4194kB of archives.
After unpacking 16.6MB of additional disk space will be used.
Do you want to continue [Y/n]?

Preconfiguring packages ...
Selecting previously deselected package gnucash-common.
(Reading database ... 84713 files and directories currently installed.)
Unpacking gnucash-common (from .../gnucash-common_1.8.10-18_all.deb) ...
Selecting previously deselected package gnucash.
Unpacking gnucash (from .../gnucash_1.8.10-18_i386.deb) ...
Setting up gnucash-common (1.8.10-18) ...
Setting up gnucash (1.8.10-18) ...

Mark sent me a mail entitled S …

Mark sent me a mail entitled Sun Linux this morning. Hmm.

Running Industry leading Linux on Sun: Sun brings a comprehensive systems approach to GNU/Linux-based operating systems. Sun provides Java technology, x64-based servers and workstations, Red Hat Enterprise Linux, and SuSE Linux Enterprise Server along with Sun’s Java Enterprise System and suites. Sun also works with Canonical Ltd. to certify and support selected x64 based systems and CoolThreads servers on Ubuntu Linux.