Posts Tagged ‘ Linux ’

How to Get back the ctrl-alt-backspace behavior in Ubuntu

Posted in How To, Linux on August 1st, 2009 by admin – Be the first to comment Tags: , , , ,

In the most recent release of Ubuntu (9.04) the developers decided (after a very lengthy discussion) that the old tried-and-true Ctrl-Al-Backspace key combination would no longer kill the X server. Their justification for this (in a nutshell) was that this combination could be accidentally hit causing the user to lose data. This was not something they wanted on their hands. To me this is a feature that I would miss. There have been instances where a poorly written application decided it needed to take up all of my memory thereby making the desktop unusable. Of course you could always go to a virtual terminal but for new users this is more of a hassle than just being able to hit Ctrl-Alt-Backspace.

Now the problem with Ctrl-Alt-Backspace is that you can, in fact, lose data. But as a last resort, having this behavior back can really be helpful. And fortunately, it is possible to get the old standby behavior back. This tutorial will show you how.

There are two ways to get this behavior back into Ubuntu. You can either install the dontzap application or you can edit your /etc/X11/xorg.conf file. We’ll examine both.

Dontzap

The dontzap application does one thing – it sets the DontZap value in xorg.conf so you don’t have to. To install the application open up a terminal window and issue the following command:

sudo apt-get install dontzap

Now to set the value in your xorg.conf file you have to run the command with one of two switches:

–enable

or

–disable

To enable the Ctrl-Alt-Backspace behavior you use the –disable switch and to disable the Ctrl-Alt-Backspace behavior use the –enable switch. It seems backwards, but remember the command is dontzap not zap.

So the full command would be either:

sudo dontzap –enable

to disable Ctrl-Alt-Backspace. Or

sudo dontzap –disable

to enable Ctrl-Alt-Backspace.

Once you have run this command you will need to log out of X and log back in, in order for the behavior to finalize.

Manually enabling

If you don’t want to install the dontzap application you can hand-edit your xorg.conf file to include the correct DontZap entry. To do this enter the following command to open up your xorg.conf file for editing:

sudo nano /etc/X11/xorg.conf

What you want to do is add the following lines to the end of your file:

Section “ServerFlags”
Option “DontZap” “off”
EndSection

Just as you would have to using the dontzap command, you will have to log out of X and log back in for this to take effect.

Final thoughts

There was a lot of thought and discussion that went into the decision to disable the Ctrl-Alt-Backspace behavior by default. I give the Ubuntu developers a hand for really going out on a limb and thinking more of the new end users than of the old school users like myself. I guess the developers figured it would only be a matter of time before the old school guys would figure out a way to enable this behavior on their systems.

How to see a detailed history of the commands run in Linux

Posted in How To, Linux on July 26th, 2009 by admin – Be the first to comment Tags:

If you use or administer a Linux machine it can be quite useful to be able to take a look at the history of commands that have been executed on a machine. This can be pretty useful when debugging and issue. I usually use the command history to help me with this.

# history

946 rpm -R mutt-1.4.1-11.rhel4.i386.rpm
947 rpm -qR mutt-1.4.1-11.rhel4.i386.rpm
948 sudp rpm -qa | mail
949 sudo rpm -qa | mail
950 sudo rpm -qa | grep mail
951 rpm -qR sendmail-8.13.1-3.2.el4
952 cd scripts/log_parse/

This command gives me a straightforward list of the commands executed on this machine by the user I’m currently logged in as. However, sometimes I need a lot more information than just this. I need to know which command was executed at what time. For this I make a small modification to the commands settings, adding the date and time to the information output by the command:

# export HISTTIMEFORMAT=”%F %T “

Now run the history and see the difference:

# history

946 2009-07-20 08:12:33 rpm -R mutt-1.4.1-11.rhel4.i386.rpm
947 2009-07-20 08:09:33 rpm -qR mutt-1.4.1-11.rhel4.i386.rpm
948 2009-07-20 09:49:44 sudp rpm -qa | mail
949 2009-07-20 10:37:33 sudo rpm -qa | mail
950 2009-07-20 10:17:13 sudo rpm -qa | grep mail
951 2009-07-20 10:12:23 rpm -qR sendmail-8.13.1-3.2.el4
952 2009-07-20 10:22:43 cd scripts/log_parse/

Add this command to your users .bashrc file to make the change permanent.

How to recursively copy files from an FTP server with Linux

Posted in How To, Linux on July 22nd, 2009 by admin – Be the first to comment Tags: ,

The other day I was migrating my hosting from one server to another. My previous hosting only gave me FTP access. The new host came enabled with SSH and a complete Linux environment. I wanted to migrate the data from my old host to the new one. Here’s how I moved all my data.

I used the following command for the migration:

# ncftpget -R -v -u “remoteuser” -p “password” ftp://remotserver.com /home/localdir /remotedir

NC FTP is a really cool FTP client for the Linux command line. It ships by default with most Linux distributions. It comes installed with a few command such as ncftpget and ncftpput. In this example we’re using the first of the two commands. Here’s a breakup of the command.

-R -v These two tell ncftpget to get the files recursively, and make the output verbose.
-u -p These two parameters are followed by the username and password for the FTP session.
ftp://remotserver.com This is the IP address or the domain of the remote FTP server.
/home/localdir This is the path of the directory in your local machine where you want to copy the remote files
/remotedir This is path of the directory you want to copy in the remote server

Just be careful not to mix up the local and remote directories when you run the command. Otherwise, it should be pretty straightforward.

How to get a list of files an RPM package depends on

Posted in Linux on July 15th, 2009 by admin – Be the first to comment Tags: , ,

Sometimes when you are trying to uninstall or upgrade some software on a Linux machine you run into dependency related issues. Just about everyone I know who works with RPM based distributions has experienced what is known as “rpm hell” at one time or another. Here’s something to help you a bit if you are stuck in one of those situations.

Let’s look at how to check what files an installed RPM depends on.

Say you are trying to upgrade or uninstall the RPM of sendmail from your Linux computer. You might run into dependency issues when you run the uninstall command:

# rpm -e sendmail-8.13.1-3.2

In such a case it might be useful to take a look at what files this package depends on. Use the following command:

# rpm -qR sendmail-8.13.1-3.2
/bin/bash
/bin/mktemp
/bin/sh
/bin/sh
/bin/sh
/bin/sh
/bin/sh
/usr/sbin/alternatives
/usr/sbin/useradd
bash >= 2.0
chkconfig >= 1.3
config(sendmail) = 8.13.1-3.2.el4
cyrus-sasl
fileutils
gawk
libc.so.6
libc.so.6(GLIBC_2.0)
libc.so.6(GLIBC_2.1)

Now you can see a list of files that the sendmail package depends on and you’ll be better equipped to debug the failed uninstallation process.

How to Setting up a Dual-Boot

Posted in Linux on July 15th, 2009 by admin – Be the first to comment Tags: , , ,

Until a couple of months ago, I didn’t know much about dual-booting. Yes, I knew it meant running two OS’s on one machine but beyond that, not much else. So when I decided to go ahead and set up a dual boot on my laptop, I definitely needed help.

I got it in the form of the Illustrated Dual Boot site. As the name suggests, the site is packed with tutorials to assist people with dual-booting their computer to run both Windows and Ubuntu. The tutorials help install Ubuntu versions right from Gutsy Gibbon to Karmic Koala (the upcoming release). For Windows versions, there are installation tutorials for everything from Windows 98 to Windows7.

What makes the Illustrated Dual Boot site so good? It’s the fact that the tutorials are really well written. Any tutorial you choose has exactly what you need to get a dual-boot system up and running, right from beginning to end. Within the tutorial is some information on the tools required for the dual-boot as well as some basic checks before you begin.

Every step within a tutorial is illustrated. This is extremely important because often a step might not make much sense but if you can actually see how it takes place, it becomes easier to do it yourself. Some steps are also accompanied by possible errors you might encounter and how to solve them, another necessity for an installation.

I used the Jaunty Jackalope / Windows7 Graphical Installation ‘C’ tutorial to successfully dual-boot Jaunty and Windows XP. The clear instructions in simple language were easy to understand and implement with no problems whatsoever.

Tech experts probably don’t need someone to tell them how to set up a dual-boot on a machine. However, the vast majority of people using computers are not tech-savvy and having a resource like the Illustrated Dual Boot site reduces their dependence on others to do things for them. This site is also perfect for people who want to take the plunge into Linux but are being held back by the fear of having to install their own OS.

Have you used the Illustrated Dual Boot site anytime? Do you know of any similar resources? What do you think of computer novices using online tutorials to install an OS? Let me know in the comments.

A standard compliant web browser and editor: Amaya

Posted in Software on July 13th, 2009 by admin – Be the first to comment Tags: , , , , , , , , , , , , , ,

Some web browsers don’t fully respect web standards and many WYSIWYG HTML editors produce absolutely revolting code. W3C set out standards as to how HTML (and XHTML etc) should appear and whilst some choose to ignore these, some are devoted to the following of these standards.

Sticking to standards can therefore lead to issues with certain web browsers, which lack support for the latest tags or render pages wrong.

The W3C therefore has its own web browser and editor which adheres to standards more than many browsers and supports certain new technologies others don’t, such as RDF annotation. This browser is Amaya, an open-source and cross-platform browser.

Amaya can handle a wide-range of open file formats, including HTML, CSS, XHTML, SVG and MathML.

The software integrates the browser and web editor: when you go to a web page, it can be edited inside the browser. It also instantly displays syntactic errors.

It also integrates the mark-up languages. For example, in a web page, one can write formulae utilising MathML or add SVG shapes inside the software.

Amaya is a reasonable WYSIWYG editor and a good web browser for developmental purposes. It is also good to produce rich web-pages, which include other pieces of mark-up than HTML.

Conduct your courses on line with ATutor

Posted in Linux on July 8th, 2009 by admin – Be the first to comment Tags: , , ,

ATutor is an open source Content Managment System (CMS) focused on education and the class room. If you think about it, a CMS is the perfect springboard for the creation of a tool designed to manage a class. With a CMS you get: Communication, Content management, file storage, feedback, FAQ, forums, news and announcements, and more. And natrually there are plenty of tools out there to handle this task: Drupal, Xoops, Joomla for instance. Althought these tools could work as course management tools, there are certain features you will eventually find missing.

So where do you turn when you need an open source solution for course management? ATutor is one of the best and easiest tools available.

Of course many would wonder what can be added to a CMS tool to make course management easier. That answer is simple:

* Assignments
* Blogs
* Chat
* Course Email
* Profile Pictures
* Reading Lists
* Statistics
* Student Tools
* Syndicated Feeds
* Tests and Surveys
* TILE repository search
* Web search
* and much more

So ATutor is not just a re-write of a standard CMS. ATutor is a serious tool to help serious educators.

Getting and installing

Installing ATutor isn’t really that difficult. It will require a running LAMP server and root (or sudo) access to your web servers’ document root. You will also have to create a database for the installation. I like to use PhpMyAdmin for creating databases on my LAMP servers. Create a database named “atutor” (no quotes) and you are ready to install.

Download the archive from the ATutor download page and save it in your servers’ document root (on a Ubuntu server this would be /var/www). When then file is in place unpack the archive with the command:

tar xvzf ATutor-XXX.tar.gz

Where XXX is the release number. This command will create a new directory called atutor. Before you point your browser to the ATutor installation issue the following commands (from within the /var/www/atutor directory):

sudo mkdir content

sudo a+rwx content

sudo chmod a+rw include/config.inc.php

Now you’re ready to rock.

Point your browser to:

http://ADDRESS_OF_SERVER/atutor

and the installation will begin.

The installation of ATutor is incredibly simple. You will walk through a few pages where you will enter the necessary information unique to your installation. The final step is to send the information collected during the installation to the ATutor site. You do not have to do this, but it will help the developers know what their application is installed on. You can also submit your installed URL if you like, but you can uncheck this option if you are uncomfortable sending this information.
Conduct your courses on line with ATutor

Figure 1

When you are finished you should go back and remove the /var/www/atutor/install directory for security.

Figure 1 shows the main window for ATutor. As you can see this tool offers quite the amount of tools. Your best bet to get up to speed with ATutor is to simply start poking around.

The first place you will want to look is the System Preferences tab. Within this tab you can enable self registration (which will save you a good amount of time.) Take care of this tab and then head on over to the Course tab where you can begin to set up your courses.

Final thoughts

ATutor is perfect for anyone needing a course managment tool but doesn’t want to either have to do any development or spend a lot of money. If you are looking for a single tool to handle all of your course management tasks, ATutor is the tool for you.

Linux console RSS reader Snownews

Posted in Linux on July 6th, 2009 by admin – Be the first to comment Tags: , , ,

I read a lot of news. One of the many ways I read news is via RSS feeds. If you don’t know, RSS stands for Really Simple Syndication. What an RSS reader does is collect summaries of news feeds from your favorite sites and places them in a simple, easy to read format. Most RSS readers are graphical applications such as Sage for Firefox, Straw for the GNOME desktop, or Akregator for the KDE desktop. But did you know there is a console-based RSS reader? There is and it’s called Snownews.

You may think the console isn’t a good place for RSS feeds, but it is. Using Snownews is fast, reliable, easy to use, and has a tiny footprint.

You probably have already noticed that ghacks has a few RSS feeds of its own. We’ll use those feeds to illustrate how to use Snownews. But first we must install Snownews. Fortunately this is a simple task. You can install from either your Add/Remove utility (do a search for snownews, select the results, and click apply) or you can install from the command line like so:

sudo apt-get install snownews

or

yum install snownews

Once installed just issue the command snownews from the prompt and you will see what looks like an empty window with the version number of Snownews near the top. Naturally Snownews won’t do you any good until you add a feed. Let’s see how this is done.

Adding a feed

In the main window, if you hit the “h” key (no quotes) you will get the Help window. This window will give you all of the keys you need to do your work. Here are the most important:

* a – Add a feed.
* D – Delete a feed.
* c – Rename a feed.
* R – Reload all feeds.
* r – Reload selected feed.

* m – Mark all feeds read.
* B – Change defalt browser.
1
Figure 1

There are more keys, but those are really the most important keys you wil need to know. So from the main window press the “a” key to add a feed. What you will see is a bar going across the screen. All you need to do is type (or paste) the feed URL into this space and hit enter. Figure 1 shows where the feed URL is entered. As you can see the ghacks Linux feed is being entered.

Once you enter the feed URL hit enter and the feed will be added. What Snownews has to do is download the feed to the cache.

Once the feed is added you will see the feed listed in the main window. To see the stories listed select the feed and hit enter.

Reading stories from a feed
2
Figure 2

From within the story reader window you will see the entire listing of stories from the feed your are viewing. To view a particular story use the up or down arrows to move to the story and then hit the Enter key. The story summary will be displayed in the same window.

In order to read the entire story you have to have a browser configured for Snownews. I tend to like to contain Snownews within the terminal window, so I will use Lynx. To configure Lynx as the browser go back to the main window (press “q”) and press “B”. In the browser configuration window you simply need to enter “lynx %s” (no quotes) to set Snownews up to use Lynx as your browser.

Now to read a full story do the following:

Go back to the story listing in the feed

Select a story and hit Enter.

In the story window hit “o” (no quotes).

The story will now open in the Lynx browser. To exit the browser hit “q” (no quotes) and you will return to Snownews.

Final thoughts

Snownews is an outstanding alternative RSS reader for anyone who prefers to do things from the console window. Give it a try and you will find it to be as easy as any of the GUI alternatives.

Picasa 3.0 for Linux (beta)

Posted in Linux on July 4th, 2009 by admin – Be the first to comment Tags: , ,

Download Picasa 3.0 for Linux (beta)

Picasa 3.0 for Linux (beta) New Features
* Improved integration with Picasa Web Albums
You can sync your Picasa 3 and Web Albums edits, change your online album settings from Picasa, and delete online albums from Picasa.
* Better uploading with the upload Drop-box and bandwidth throttling.
* New Retouch tool to remove unsightly blemishes and improve photo quality.
* Improved Collage tool lets you have total artistic control over your collage content and layout.
* Auto red-eye: same results, less work for you.
* Easily add text or watermarks to your photos.
* User data are now stored in ~/.google/picasa/.
* Camera/media detection integrated with Gnome/KDE.
* Mozilla/Firefox browser integration done via a plugin.
* picasa:// urls work in Firefox 3.
* Downloading albums from Picasa Web Albums launches faster.
* Better Xinerama support.

Picasa 3.0 for Linux (beta) Information
Picasa is free photo software from Google. This version is Linux compatible. Picasa won’t delete your pictures or put them online without your permission.

This is a preview of the upcoming release of Picasa 3 for Linux. We encourage you to try out this beta release and provide feedback to help us improve our product.

Please see http://www.google.com/linuxrepositories/testrepo.html for information on using Google’s Linux Software Testing Repository to install Picasa 3 for Linux.

If you don’t want to use the repositories, or don’t have a compatible package manager, you may also download the packages directly from the following URLs:

* rpm, for Red Hat/Fedora/Suse/Mandriva i386 or x86_64:

http://dl.google.com/linux/rpm/testing/i386/picasa-3.0-current.i386.rpm

* deb, for Debian/Ubuntu i386:

http://dl.google.com/linux/deb/pool/non-free/p/picasa/picasa_3.0-current_i386.deb

* deb, for Debian/Ubuntu amd64:

http://dl.google.com/linux/deb/pool/non-free/p/picasa/picasa_3.0-current_amd64.deb

All downloads are approximately 30 MB: Picasa software (13 MB), Wine (11 MB) and Gecko engine (6 MB).

Install Linux with InstaLinux.com

Posted in Linux on June 28th, 2009 by admin – Be the first to comment Tags: , , ,

How many ways can you install Linux? Quite a few. You can install via:

* CD
* DVD
* Flash Drive
* Network Installation

or…

* InstaLinux

Technically InstaLinux is really just another way of doing a network installation. InstaLinux is a web-based service that allows you to choose some of the specifics of what you want on your installation and then it creates an ISO image that will handle the network install specifics. Using InstaLinux automates your installation so you just pop in the CD, boot the machine, and let the installation take place. Let’s take a look at the specifics.

Preparation

You don’t need much. You need to be able to point your browser to the InstaLinux site and you need to have a CD burner to burn the network-install CD InstaLinux will create. You will also need a DHCP server (or router) able to hand out DHCP addresses if you don’t want to set this machine up with a static address. Once you have everything you need, you can go ahead and start building your install CD.

Step 1

1

Figure 1

The first step (shown in Figure 1) asks the following:

* Select a hostname (not required, especially if you are building a desktop distribution or using DHCP).

* Select if you want to force DHCP and use the configured hostname (using DDNS).

* Select a distribution to build upon.

* Select the version of the distribution.

Select the architecture the distribution will be built upon.

Step 2
2

Figure 2

This next step is all about the installation method. In this step you need to configure:

* System profile: Most likely you will only have one option to choose here (Custom).

* Install method: Again, you will most likely have only one option (HTTP).

* Boot image: This will depend upon which distribution you have chosen. For example, if you choose Debian you will see the Debian preseed boot image as your only choice.

* Network Interface: Choose which networking interface will be used to download the install files.

* Proxy server: Configure your proxy if necessary.
3

Figure 3

Step 3

This step is all about localization for your installation. Here you will configure:

* Waystation: Where you will download from.

* Timezone

* Hardware clock set to UTC: Yes/No

* Console layout: Language for the console.

4
Figure 4

This step is where you choose the type of installation you will want as well as the individual packages you want to install. Note the lack of menus or clickables for packages. That’s right. In the text area you list the packages you want to install. Because of this you will need to know exactly what you want installed on your machine. You will really only need this feature if you know there are packages that are not on the default package list for your system. For example, here you can see a listing of the packages involved in a Ubuntu Desktop installation. You will also have to choose your partitioning method. If you want to have a fully automated installation you will need to select any of the methods but the last one.

Step 5
5

Figure 5

This is the final step before confirmation. Here you need to choose where the install will go. On my system this is hda or the first IDE drive. This choice will depend upon your hardware.

Once you have made this choice click the “Continue” button which will reveal to you the confirmation screen. Go over the information presented to you and, if it is correct, click the “Go for it!” button. Once the InstaLinux system is done creating your ISO image you can click on the link to download the image. This image should be less than 30 Mb.

Gotchas

I have used this for a couple of different distributions. For the Debian install image I was prompted to create a root and user loging/password. For the Ubuntu desktop I was not. So some of the distribution steps will be a little different than others. The steps you see above were for a Ubuntu Desktop image.

Also remember you will pulling a lot of packages down from the net, so make sure you have a fast, solid connection.

Installing

Once you have burned your image onto CD, put the CD into the drive you want to install the operating system on, boot the machine, and at the prompt type “install” (no quotes). The installation of your Linux distribution should be fully automated.

Final thoughts

If you are looking for a simple way to create an automated Linux installation, InstaLinux makes this process as simple as it gets. Give it a go and let us know what your experience is like.