TOPIC: LINUX
Looking at a few Operating Systems
19th February 2011The last few weeks have seen me poking around with a few different operating systems to see how they perform. While I am too sure what exactly has kicked off all of this curiosity, all the OS's that I have examined have been of the UNIX/Linux variety. With the inclusion of Unity in the forthcoming Ubuntu "Natty Narwhal" 11.04, I am mindful of the need to be keeping an eye on alternative options should there ever be a need to jump ship. However, a recent encounter with an alpha version has reassured me a little.
Forgetting the Ubuntu password (a silly thing to do, I know) for my Toshiba laptop meant a reinstallation that allowed these explorations to happen. Only for that, I may not have looked in amazement at the impressive minimalism of CrunchBang Linux before settling on Lubuntu to see how it did. Since these were Live CD runs, I was trying things out before committing to any installation. Since Lubuntu is based on Ubuntu as its name suggests, I wasted little name in finding my way around the LXDE desktop. By default, everything supplied with the distro is lightweight, with Chromium coming in place of Firefox. There's no sign of OpenOffice.org either, with offerings like Abiword coming in its stead. For the sake of familiarity, I started to add the weight of things without reducing the speed of things, it seems. Well, the speedy start-up wasn't afflicted anyway. Being an Ubuntu clone meant that it didn't long to add on Firefox using the apt-get
command. LibreOffice was downloaded for installation using the dpkg command, and it seems much more fleet-footed than its OpenOffice.org counterpart. As if these nefarious actions weren't enough, I started to poke in the settings to up the number of virtual desktops too. All in all, it never stopped me going against what be termed the intent of the thing. Despite what Linux User & Developer has had to say, I think the presentation of the LXDE desktop isn't unpleasant, either. In fact, I reckon that I quite like it, so the next thing to do is to restore the entry for Windows 7 on the GRUB menu. Well, there's always something that needs doing...
While I may have learned about it after the event, the release of Debian "Squeeze" 6.0 was of interest to me too. The new release comes on two kernels: GNU/Linux and FreeBSD. Regarding the latter, I did try having a look, only for it to lock up my main home PC when I tried booting it up in a VirtualBox virtual machine. Given that it's a technical preview anyway, I think it's better to leave it mature for a while, no matter how fascinating the prospect may be. Or is it VirtualBox 4.x that hasn't around long enough? Debian's latest Linux incarnations showed no such inclinations, though I found that the CD ISO image that I'd downloaded didn't give such a complete system when I fired it up after doing the installation. Being someone who knows his way around Linux anyway, it was no problem to add the missing pieces using apt-get
, though that'd stop it being an option for new users unless the DVD installation yields more complete results. Other than that, it worked well, and I quickly became comfortable with the OS, which has a much fresher feel than version 5.x ("Lenny"). In summary, I look forward to continuing my investigations of the new Debian release.
To round up my explorations of different UNIX/Linux operating systems, I have updated my test installations of Ubuntu 11.04. While initial looks at the next Ubuntu release weren't so encouraging, things are coming along by all accounts. For one thing, Unity can be switched off in favour of the more familiar GNOME desktop that we've had for the last few years. Messages warning about the lack of 3D graphics support have been replaced by graceful degradation to GNOME, which is definitely an improvement. In case it hasn't been so obvious, I am one of those who needs convincing by the likes of Unity and GNOME Shell, so I'll sit on the fence for a while. After all, there are always alternatives like LXDE if I want to decamp to something else entirely. One of the nice things about Linux is the amount of choice we all have; while it might be difficult to choose sometimes, it's always good to find alternatives when someone makes a decision that doesn't suit you.
Ubuntu 10.10 and Citrix
15th January 2011Many of us with the opportunity to work from home will have met up with logging via a Citrix server. With that in mind, I set to getting an ICA client going on my main Ubuntu box at home. There is information scattered about the web in the form of a question on the Ubuntu forum and a step-by-step guide by Liberian Geek. To summarise the process that I followed here, you have to download a copy of the Citrix Receiver installer for Linux from the company's website. There, you'll see DEB and RPM packages, along with a tarball for other systems. The latter needs a bit more work, so I got the x86 DEB package and installed that in the usual way, using Ubuntu's Software Centre to do the installation following the download. Needing to start the Citrix connection via a browser session meant that a browser restart was needed too. That wasn't the end of the leg work because Thawte certificate errors were to stop me in my tracks until I downloaded their root certificates from their website. Once the zip file was on my PC, I extracted it and copied the required certificate (Thawte Server CA.cer
from the thawte Server CA
directory) to /usr/lib/ICAClient/keystore/cacerts
on my system; it helped that the error message had told me which was the one I needed from the collection in the zip file. With that matter addressed, the connection happened without a glitch, and I was able to get to working without recourse to a Windows virtual machine. For once, Linux wasn't to be excluded from one of the ways of using computers that has been getting more prevalent these days.
Update 2012-04-14: On an equivalent installation on Linux Mint Debian Edition, I found that the installation location for the certificate had moved to /opt/Citrix/ICAClient/keystore/cacerts
. This was for the 64-bit edition.
Update 2012-12-17: The above applied to an installation of version 12.10 on 32-bit Ubuntu GNOME Remix too.
Ridding Fedora of Unwanted Software Repositories
4th November 2010Like other Linux distributions, Fedora has the software repository scheme of things for software installation and updating. However, it could do with having the ability to remove unwanted repositories through a GUI, only it doesn't. What you need to do instead is switch to root in a terminal using the command su -
and enter your root user password before navigating to /etc/yum.repos.d/
to delete the troublesome [file name].repo file. Recently, I needed to do this after upgrading to Fedora 14 or yum
wouldn't work from the command line, which is the way that I tend to update Fedora (yum -y update
is the command that I use because it automatically does all installations unattended until it is finished doing what's needed). The offending repository, or "Software Source" as these things are called in the GUI, belonged to Dropbox and even disabling it didn't make yum
operate from the command like it should, so it had to go. Maybe Dropbox hasn't caught up with the latest release of Fedora, but that can be resolved another day.
Taking the sudo command beyond Ubuntu
27th October 2010Though some may call it introducing a security risk, being able to execute administrator commands on Ubuntu using sudo and gksu by default is handy. It's not the only Linux distribution with the facility, though, since the /etc/sudoers
file is found in Debian and I plan to have a look into Fedora. The thing that needs to be done is to add the following line to the aforementioned file (you will need to do this as root):
[your user name] ALL=(ALL) ALL
One that is done, you are all set. Just make sure that you're using a secure password, though, and removing the sudo/gksu permissions is as simple as reversing the change.
Update on 2011-12-03: The very same can be done for both Arch Linux and Fedora, The same file locations apply too.
A look at Emacs
10th August 2010It's remarkable what work can bring your way in terms of technology. For me, (GNU) Emacs Has proved to be such a thing recently. It may have been around since 1975, long before my adventures in computing ever started, in fact, but I am asking myself why I never really have used it much. There are vague recollections of my being aware of its existence in the early days of my using UNIX over a decade ago. Was it a shortcut card with loads of seemingly esoteric keyboard shortcuts and commands that put me off it back then? The truth may have been that I got bedazzled with the world of Microsoft Windows instead, and so began a distraction that lingered until very recently. As unlikely as it looks now, Word and Office would have been part of the allure of what some consider as the dark side these days. O how OpenOffice.org and their ilk have changed that state of affairs...
The unfortunate part of the Emacs story might be that its innovations were never taken up as conventions by mainstream computing. If its counterparts elsewhere used the same keyboard shortcuts, it would feel like learning such an unfamiliar tool. Still, it's not as if there isn't logic behind it because it will work both in a terminal session (where I may have met it for the first time) and a desktop application GUI. The latter is the easier to learn, and the menus list equivalent keyboard shortcuts for many of their entries, too. For a fuller experience though, I can recommend the online manual, and you can buy it in paper form too if you prefer.
One thing that I discovered recently is that external factors can sour the impressions of a piece of software. For instance, I was using a UNIX session where the keyboard mapping wasn't optimal. There's nothing like an unfamiliar behaviour for throwing you off track because you feel that your usual habits are being obstructed. For instance, finding that a Backspace key is behaving like a Delete one is such an obstruction. It wasn't the fault of Emacs, and I have found that using Ctrl+K (C-k in the documentation) to delete whole lines is invaluable.
Apart from keyboard mapping niggles, Emacs has to be respected as a powerful piece of software in its own right. It may not have the syntax highlighting capabilities of some, like gedit or NEdit for instance, but I have a hunch that a spot of Lisp programming would address that need. What you get instead is support for version control systems like RCS or CVS, along with integration with GDB for debugging programs written in a number of languages. Then, there are features like file management, email handling, newsgroup browsing, a calendar and a calculator that make you wonder if they tried to turn a text editor into something like an operating system. With Google trying to use Chrome as the basis of one, it almost feels as is Emacs was ahead of its time, though that may have been more due to its needing to work within a UNIX shell in those far-off pre-GUI days. It really is saying something that it has stood the test of time when so much has fallen by the wayside. Like Vi, it looks as if the esteemable piece of software is showing no signs of going away just yet. Maybe it was well-designed in the beginning, and the thing certainly seems more than a text editor with its extras. Well, it has to offer a good reason for making its way into Linux too...
A look at Slackware 13.0
5th June 2010Some curiosity has come upon me and I have been giving a few Linux distros a spin in VirtualBox virtual machines. One was Slackware, which reminds me of a fellow university student using it in the mid/late 1990's. Since then, my exploration took me into Red Hat, SuSE, Mandrake and eventually to Ubuntu, Debian and Fedora. Since all of that bypassed Slackware, it was to give the thing a look.
While the current version is 13.1, it was 13.0 that I had to hand, so I had a go with that. In many ways, the installation was a flashback to the 1990's and I can see it looking intimidating to many computer users with its now old-fashioned installation GUI. If you can see through that, though, the reality is that it isn't too difficult to install.
After all, the DVD was bootable. However, it did leave you at a command prompt and I can see that throwing many. The next step is to use cfdisk
to create partitions (at least two are needed, swap and normal). Once that is done, it is time to issue the command setup and things look more graphical again. I picked the item for setting the locale of the keyboard and everything followed from there, but there is a help option too for those who need it. If you have installed Linux before, you'll recognise a lot of what you see. It'll finish off the set-up of disk partitions for you and supports ext4 too; it's best not to let antique impressions fool you. For most of the time, I stuck with the defaults and left it to perform a full installation with KDE as the desktop environment. If there is any real criticism, it is the absence of an overall progress bar to see where it is with package installation.
Once the installation was complete, it was time to restart the virtual machine, and I found myself left at the command prompt. Only the root user was set up during installation, so I needed to add a normal user too. Issuing startx
was enough to get me into KDE (along with included alternatives like XFCE, there is a community build using GNOME too) for that, but I wanted to have that loading automatically. To fix that, you need to edit /etc/inittab
to change the default run level from 3 to 4 (hint: look for a line with id:3:initdefault:
in it near the top of the file and change that; the file is well commented so you can find your way around it easily without having to look for specific esoteric test strings).
After all this, I ended up with a usable Slackware 130.0 installation. Login screens have a pleasing dark theme by default, while the desktop is very blue. There may be no OpenOffice but KOffice is there in its place and Seamonkey is an unusual inclusion along with Firefox. Though it looks as if it'll take a little more time to get to know Slackware, it looks good so far; I may even go about getting 13.1 to see how things might have changed and report my impressions accordingly. Some will complain about the rough edges that I describe here but remarks about using Slackware to learn about Linux persist. Maybe, Linux distributions are like camera film; some are right for you and some aren't. Personally, I wouldn't thrust Slackware upon a new Linux user if they have to install it themselves, but it's not at all bad for that.
Relocating the Apache web server document root directory in Fedora 12
9th April 2010So as not to deface anything that is available online on the web, I have a tendency to set up an offline Apache server on a home PC to do any tinkering away from the eyes of the unsuspecting public. Though Ubuntu is my mainstay for home computing, I do have a PC with Fedora installed, and I have been trying to get an Apache instance to start automatically on there unsuccessfully for a few months. While I can start it by running the following command as root, I'd rather not have more manual steps than is necessary.
httpd -k start
The command used by the system when it starts is different and, even when manually run as root, it failed with messages saying that it couldn't find the directory while the web server files are stored. Here it is:
service httpd start
The default document root location on any Linux distribution that I have seen is /var/www
and all is very well with this, but it isn't a safe place to leave things if ever a re-installation is needed. Having needed to wipe /var after having it on a separate disk or partition for the sake of one installation, it doesn't look so persistent to me. In contrast, you can safeguard /home
by having it on another disk or in a dedicated partition, which means that it can be retained even when you change the distro that you're using. Thus, I have got into the habit of having the root of the web server document root folder in my home area, and that is where I have been seeing the problem.
Because of the access message, I tried using chmod
and chgrp
, but to no avail. The remedy has to do with reassigning the security contexts used by SELinux. In Fedora, Apache will not work with the context user_home_t
that is usually associated with home directories, but needs httpd_sys_content_t
instead. To find out what contexts are associated with particular folders, issue the following command:
ls -Z
The final solution was to create a user account whose home directory hosts the root of the web server file system, called www
in my case. Then, I executed the following command as root to get things going:
chcon -R -h -t httpd_sys_content_t /home/www
It appears that even the root of the home directory has to have an appropriate security context (/home
has home_root_t
so that might do the needful too). Without that, nothing will work, even if all is well at the next level down. The switches for chcon
command translate as follows:
-R
: recursive; applies changes to all files and folders within a directory.
-h
: changes apply only to symbolic links and not to where they refer in the file system.
-t
: alters context type.
It took a while for all of this stuff about SELinux security contexts to percolate through to the point where I was able to solve the problem. A spot of further inspiration was needed too and even guided my search for the information that I needed. It's well worth trying Linux Home Networking if you need further details. Though there are references to an earlier release of Fedora, the content still applies to later versions of Fedora to the current release, if my experience is typical.
Command Line Software Management
2nd December 2009One of the nice things about a Debian-based Linux distribution is that it is easy to pull a piece of software onto your system from a repository using either apt-get
or aptitude
. While some may prefer a GUI, but I find that the command line offers a certain extra transparency that stops the "what's it doing?" type of question. That's never to say that the GUI-based approach hasn't a place, and I only go using it when seeking out a piece of software without knowing its aptitude-ready name. Interestingly, there are signs that Canonical may be playing with the idea of making Ubuntu's Software Centre a full application management tool with updates and upgrades getting added to the current searching, installation and removal facilities. That well may be, but it's going to take a lot of effort to get me away from the command line altogether.
Fedora and openSUSE have their software management commands too in the shape of yum
and zypper
, respectively. The recent flurry of new operating system releases has had me experimenting with both of those distros on a real test machine. As might be expected, the usual battery of installation, removal and update activities are well served, and I have been playing with software searching using yum
too.
One thing that has yet to mature is in-situ distribution upgrading, à la Ubuntu. In principle, it is possible, but I got a black screen when I tried moving from openSUSE 11.1 to 11.2 within VirtualBox using instructions on the openSUSE website. Not wanting to wait, I reached for a Live CD instead, and that worked a treat on both virtual and real machines.
Being in an experimental turn of mind, I attempted the same to get from Fedora 11 to the beta release of its version 12. A spot of repository trouble got me using a Live CD in its place. You can perform an in-situ upgrade from a full Fedora DVD, but the only option is system replacement when you have a Live CD.
Once installation is out of the way, YAST can be ignored in favour of zypper
and yum
is good enough that Fedora's GUI-using alternative can be ignored. It's nice to see good transparent ideas taking hold elsewhere and may make migration between distros much easier too.
Making Nautilus work like it does in Ubuntu for any other GNOME-using distro
26th July 2009While It's a personal preference, I like the way that Nautilus (GNOME's default file manager if you need to know) is set to work on Ubuntu by default. For some tastes, it might look too similar to Windows Explorer, but having all the action happening in the same window is a convenience that users of other GNOME using distributions may not realise is there at all. By default, Debian and Fedora use what is called spatial mode, with each double-clicking action on a folder icon firing up a new window. Personally, I think that clutters the desktop without good cause, yet it's easy to change. All that's needed is to go to Edit>Preferences in a Nautilus window, proceed to the Behaviour tab and toggle the Always open in browser windows tick box as shown below. Quite why this is not the default in all GNOME using distributions is beyond me, but others may prefer what I dislike and Linux is all about choice, after all. Well, you can decide to use Gnome Commander instead and there are times when I do the same along with being a command line user too.
Getting Fedora working in VirtualBox
12th May 2009After a hiatus induced by disk errors seen on start up, I have gone having a go with Fedora again. In the world of real PC's, its place has been taken by Debian, so virtualisation was brought into play for my most recent explorations. I could have gone with 10, the current stable version, but curiosity got the better of me and I downloaded a pre-release version of 11 instead.
On my way to getting that instated, I encountered two issues. The first of these was boot failure with the message like this:
FATAL: INT18: BOOT FAILURE
As it turned out, that was easily sorted. I was performing the installation from a DVD image mounted as if it were a real DVD, and laziness or some other similar reason had me rebooting with it still mounted. Though there is an option to load the hard disk variant, it wasn't happening, resulting in the message that's above. A complete shutdown and replacement of the virtual DVD with a real one set matters to rights.
The next trick was to get Guest Additions added, but Fedora's 2.6.29 was not what VirtualBox was expecting, and it demanded the same ransom as Debian: gcc
, make and kernel header files. Unfamiliarity had me firing up Fedora's software installation software, only to find that Synaptic seems to beat it hands down in the search department. Turning to Google dredged up the following command to be executed, which got me further:
yum install binutils gcc make patch libgomp glibc-headers glibc-devel kernel-headers kernel-devel
However, the installed kernel headers didn't match the kernel, but a reboot fixed that once the kernel was updated. Then, the Guest Additions installed themselves as intended, with necessary compilations to match the installed kernel.
The procedures that I have described here would, it seems, work for Fedora 10; well, they certainly have bequeathed me a working system. I have had a little poke and a beta of Firefox 3.5 is included, and I saw sign of OpenOffice 3.1 too. So, it looks very cutting edge, easily so in comparison with Ubuntu and Debian. Apart from one or niggles, it seems to run smoothly too. Firstly, don't use the command shutdown -h now to close the thing down, or you'll cause VirtualBox to choke. Using the usual means ensures that all goes well, though. The other irritation is that it doesn't connect to the network without a poke from me. Whether SELinux is to blame for this or not, I cannot tell, but it might be something for consideration by the powers than be. That these are the sorts of things that I have noticed should be telling you that I have no major cause for complaint. While I have mulled over a move to Fedora in the past and that option remains as strong as ever, Ubuntu is not forcing me to look at an alternative and the fact that I know how to achieve what I need is resulting in inertia anyway.