Archive for November, 2006

Firefox 1.5 and 2 Coexisting on Fedora Core 6

Thursday, November 30th, 2006

Fedora has decided not to provide an update to Firefox 2.0 (FF2) for FC6. I personally want to use FF2 on my Fedora box and I set out to find a way. It’s not exactly straight forward, but it’s not difficult. There are many ways to do this. This is how I chose to make it work.

First, download the FF2 tarball from http://getfirefox.com/ to your home directory. Then extract the tarball to the /usr/local/firefox directory and rename it to firefox2 (to prevent confusion)

su -c 'tar -xzvf /home/[username]/firefox-2.0.tar.gz -C /usr/local'

su -c 'mv -v /usr/local/firefox /usr/local/firefox2'

You need to close any running instances of Firefox for the next step to work. If you’re viewing this with Firefox, you’ll need to print this page or copy the instructions into a file on your machine.

If you get errors complaining about libstdc++.so.5 when you execute the next command, perform a su -c 'yum install compat-libstdc++-33' then run it again.

To prevent potential damage to your existing profile/plugins, we need to create an FF2 only profile. Start FF2 with the profile manager;

/usr/local/firefox2/firefox -ProfileManager

    1. Click Create profile, then Next to create a new profile
    2. Name the profile FF2
    3. Click Finish
    4. Click Exit

There are now two profiles in your ~/.mozilla/firefox directory, the default profile will be used by Firefox 1.5, and we’re going to configure FF2 to use the one we just created.

su -c 'echo -e \#\!/bin/bash\\n/usr/local/firefox2/firefox -P FF2 |tee /usr/local/bin/firefox2'

su -c 'chmod a+x /usr/local/bin/firefox2'

Explanation:

The echo command uses tee to create a simple BASH script in /usr/local/bin. I put the script there so that it would already be in my path and easy to run via the command line (CLI) or a run application dialog. The script will execute FF2 and specify that we use the FF2 profile. To view the script, perform a less /usr/local/bin/firefox2.

The chmod command made the script executable by all users on the system.

Notes:

You now have FF2 running on your machine without mucking up your FF 1.5 install or the plugins. All of the dependencies were maintained so programs like yelp (which depends on FF 1.5) still work.

Your distro has no idea that you’ve just installed FF2, it doesn’t exist in the RPM database and therefore won’t be updated when newer versions of FF2 are released. You should run FF2 as admin (su -c firefox2) and choose Help > Check for Updates on a regular basis. If you don’t usually follow FF releases, I would suggest picking a day each week and just performing that task.

Here’s the less than good news. Your bookmarks, plugins, history, etc will not sync up between versions. If you want to use a particular plugin in both browsers, you’ll need to install it to each version. To be honest, I haven’t looked back since using FF2, all of the plugins I care about have been released for it and I dig the changes to the program.

If you have multiple users on your machine, each of them will have to create an FF2 profile. Because I specified that profile in the startup script, they will be presented with the profile manager the first time they launch firefox2. Just make sure they create an FF2 profile, else they’ll be facing the profile manager every time they launch the browser.

Finally, to set FF2 as your default browser in Gnome, choose System > Preferences > More Preferences > Preferred Applications and change firefox to firefox2. You could also answer yes when prompted by FF2 to make it your default browser.

Optional:

If you want to create a “Firefox 2 Web Browser” menu item for all users on the machine, paste the command below into a terminal window.

su -c 'echo -e \[Desktop Entry\]\\nVersion=1.0\\nEncoding=UTF-8\\nName=Firefox 2 Web Browser\\nGenericName=Web Browser\\nComment=Browse the Web\\nExec=firefox2 %u\\nIcon=firefox.png\\nTerminal=false\\nType=Application\\nStartupWMClass=Firefox-bin\\nMimeType=text/html\;text\/xml\;application\/xhtml+xml\;application\/vnd.mozilla.xul\+xml\;text\/mml\;\\nX-Desktop-File-Install-Version=0.10\\nCategories=Network\;Application\;X-Fedora\; | tee /usr/share/applications/mozilla-firefox2.desktop'

Install VMware Server on Fedora Core 6

Monday, November 27th, 2006

This wasn’t as easy as it should have been. FC6 isn’t generally considered to be a newbie-centric distro, I just wonder if the folks over at Fedora just want to hammer that fact home.

There are some problems when installing VMware server on FC. Firstly, there’s the 2.6.18 kernel, it seems that config.h was removed from the source. This is a file needed by some programs at compile time. If the file doesn’t exist, the compilation can’t complete. I’m guessing that VMware will just need to update its build script for 2.6.18+ kernels. That one can’t be blamed on Fedora, it’s a change in the kernel and I expect the VMware installer to account for the change in a future version.

This one I blame on Fedora, my understanding of the problem is that the installed kernel is based on i586 architecture but the kernel-devel package is based on i686. If you install kernel-devel from the Fedora repos and want to use VMware, you can just forget about it. The fact that the kernel and dev packages are out of sync will prevent the installer from creating the appropriate (and necessary) modules. Does this make sense? Is this something that shouldn’t surprise me? I really don’t understand the logic behind this and any info that you could give me would be greatly appreciated.

Anyway, after some googling, I was able to work around the problem.

Firstly make sure you’re running the latest Fedora kernel, open a terminal session and enter uname -r. At the time of this writing, the latest version is 2.6.18-1.2849.fc6. If you’re running an older kernel, perform an su -c ‘yum update’ before continuing. You will need to restart your computer after installing the latest kernel.

Before going any further, I should tell you that I have SElinux disabled on my box. I don’t know the first thing about managing a machine with SElinux. If you have it on, you may have to do some additional googling to get things working properly.

Download the VMware Server for Linux TAR Binary installer from http://www.vmware.com/download/server/. While your there you should also register to receive your serial number (it is required to complete the install of VMware Server). Once ready, open a terminal session and extract the tarball.

tar -xzvf VMware-server-1.0.1-29996.tar.gz

Download the i586 kernel-devel package from the updates repo and install it:

wget http://download.fedora.redhat.com/pub/fedora/linux/core/updates/6/i386/kernel-devel-2.6.18-1.2849.fc6.i586.rpm

su -c ‘rpm -ivh kernel-devel-2.6.18-1.2849.fc6.i586.rpm’

Create a symbolic link to the headers directory in /usr/src/

su -c ‘ln -s /usr/src/kernels/2.6.18-1.2849.fc6-i586/ /usr/src/linux’

I got the fix for the config.h problem from this post on VMTN

su -c ‘cp -v /usr/src/kernels/2.6.18-1.2849.fc6-i586/include/config/i2o/config.h /usr/src/kernels/2.6.18-1.2849.fc6-i586/include/linux/’

Here’s where things start to work as expected. You need to install GCC and xinetd

su -c ‘yum install xinetd gcc’

Now start the installation; accepting the default answers to all of the questions (save for the location of the kernel headers, see below) is a perfectly acceptable way to get VMware Server installed.
cd ~/vmware-server-distrib/

su -c ./vmware-install.pl

Important: When asked for the headers, make sure the path is /usr/src/linux/include

Notes:

Since Fedora installs and enables a firewall by default you won’t need to worry about unauthorized users connecting to your VMware server.

If you’re reading this after a newer kernel has been released, you’ll need to change any instance of 2.6.18-1.2849.fc6.i586 to whatever kernel revision you’re working with.

Adding “Open Terminal” to Gnome Context Menu

Thursday, November 23rd, 2006

Ever wish that you could right-click the Gnome desktop or a folder and open a terminal window? It’s a simple installation away in both Ubuntu and Fedora. I do sorta wonder why this isn’t included in Gnome by default.

Ubuntu:

Open your package manager and locate/install nautilus-open-terminal or alternatively open a terminal prompt and enter the command sudo apt-get install nautilus-open-terminal

Now restart Gnome (log out and back in) or open a terminal and enter ps aux |grep nautilus then locate the PID for nautilus and issue a kill -HUP [pid]

Fedora:

Open a terminal prompt and enter the command su -c ‘yum install nautilus-open-terminal’

Now restart Gnome (log out and back in) or open a terminal and enter ps aux |grep nautilus then locate the PID for nautilus and issue a kill -HUP [pid]

Happy Thanksgiving! Food, football and naps. Who doesn’t love this holiday????

Print to PDF: cups-pdf

Monday, November 20th, 2006

Something I’ve been missing since my migration to Linux is the ability to print whatever I want to a PDF. I find it insanely useful when I want a copy of purchase receipts or just about anything else that I should have a record of. I usually don’t print anything to paper, simply because I’ll just lose it or recycle it and then regret it 6 months later when I need a copy. Enter cups-pdf, a super easy way of outputting “stuff” to PDF.

Installing on Ubuntu 6.10:

sudo apt-get install cups-pdf

Create the printer:

  1. From the Gnome System menu, navigate to System > Administration > Printing.
  2. Double click on New Printer
  3. PDF Printer should already be selected under Use a detected printer, click Forward
  4. Select Generic from the Manufacturer drop down menu
  5. Select Postscript Printer in the Model section, click Forward
  6. Name your printer (I chose PDF-Printer) and click Apply

All set, you can now opt to print web pages, or whatever else to your Cups/PDF-Printer. Ubuntu saves the PDFs to your ~/PDF/ directory (if you want to change the default location, use the last paragraph on this post as a guide).

Installing on Fedora Core 6:

Fedora keeps this package in the extras repo, you can install it using the command below.

su -c ‘yum install cups-pdf’

A few seconds later I had a new printer named Cups-PDF, that when selected would print whatever I wanted to a PDF on my desktop. I personally don’t want all of my PDFs saved to the desktop so I created a PDF folder in my home dir and made a change to the config file:

As root, edit /etc/cups/cups-pdf.conf, locate the line that reads Out ${HOME}/Desktop and change it to Out ${HOME}/PDF. I didn’t need to restart the CUPS service to apply the change, it just worked. :)

Linux Play Time: Beryl, VMware and Future Blogs

Friday, November 17th, 2006

I was able to leave work early today, I LOVE when that happens.. I took care of some personal responsibilities and came home to beer and some time with my desktop. I haven’t had a lot of time to really play since I installed Edgy.

Beryl:

I gotta say, the Beryl project is extremely cool. I had a great time picking out a skydome wallpaper and just tweaking out the desktop effects. I had to kill off the trailfocus plugin in beryl, I was getting annoyed with the fading out of apps. Other than that, I couldn’t be happier with the software. It’s just amazing. I have a nice fresh looking desktop with fun effects that just may help convince a few others to give Linux a shot (you KNOW anyone coming into this abode will be visiting my machine). Yeah, yeah, eye candy isn’t the reason to switch operating systems. That doesn’t mean that it won’t have an impact on some of those who are more reluctant to make the change. Who knows?

On the topic of Beryl, it seems that the folks over at Fedora are creating packages for it. That’s excellent news! I’ve noticed that Beryl core and Beryl devel have made it into the repos. I’m hoping that they’re planning to create packages for the plugins and extra toys as well.

*Note: if you followed the instructions for installing Beryl 0.1.1 in this post, and you update to the latest version in the Fedora repos, you WILL break Beryl. The good news is that it’s easy to fix. The RPMs referenced in the post have been updated to v 0.1.2. You can just download and install all of the packages except for core and devel (the post explains how if you don’t know what I’m talking about). After that, Beryl will be back, and up-to-date. Be sure to play with the “burn” animation. It looks NICE, but IMO it gets too annoying to use regularly. I wouldn’t mind seeing a “smoke” animation. Something that turns into wisps of smoke when you close an app could be pretty sexy :)

VMware:

I took some time today to set up some test VMware appliances for LinuxWorldNet. I’ll be using these “machines” to explore software and record my steps so I can post some how-to’s here. I’ve mostly completed the Fedora install, I’ll be working on Edgy shortly and I’ve created a Debian stable server for testing.

Upcoming Things:

I’ll be using the Debian VM to test out some FTP servers for Linux. I currently use Gene6 for Windows and would like to make the move to one of my Linux machines. I have no idea how well this will work out, I’ll post about my ups and downs here. Its going to be tough for any FTP server to beat G6, that’s just an amazing app. As I get into it, I’ll tell you what my requirements are and we’ll see how far I can get :)

I also plan on covering the configuration of OpenSSH server for both Fedora and Ubuntu. I’ll explain how to set them up in the most paranoid way I know how. I’m hoping that any newbies stumbling upon this blog will be able to open his/her SSH server to the evils of the Internet and still feel confident that they will be as safe as can possibly be.

That’s pretty much it for now. The only other thing I’d like to put out there is this; I’d like to hear from anyone that checks this blog out and has a few minutes to fire off a comment or email (matt at linuxworldnet dot com). Let me know what you think or if there’s a topic you’d like covered (I’ll do what I can, I’m still new to this Linux thing myself).

I need to get back to my beer and play, laydah!

Fedora Core 6 – CIFS Problems RESOLVED

Wednesday, November 15th, 2006

This week the Fedora folks released A LOT of updates for Core 6. Among them was an updated kernel and thankfully, it addressed one of the problems I blogged about in this post.

I can now mount CIFS shares to a genuine mount point and access them via the GUI or the command line. This REALLY makes my day. Its now possible to transfer files to my home machine, update them and send em’ back. Hallelujah!

The annoying SATA startup probe hasn’t been resolved. I suppose I’ll suffer with this a while longer. I should probably take some initiative and register a bug report.

In other news, I finally know how to view the changelogs on a Fedora box. I should have read a little more on the rpm command, I might have known about it sooner…

Entering rpm -q kernel-2.6.18-1.2849.fc6 –changelog |less displayed the changelog for the current kernel. Seems the CIFS fix was implemented on November 9th.

sendEmail, A light and simple command line mailer

Monday, November 13th, 2006

I’ve been working on backing up my home directory automatically, generally when I automate a process I like to get an email notification of completion and perhaps a log file as proof. Ubuntu doesn’t seem to have a command line mailer installed by default and many of the apps in the repos have heavy dependencies (such as exim or postfix). I don’t plan on running a mail server, and these programs add a level of complexity that just isn’t necessary (not to mention I’m just not ready to mess with them). I found a small script that does exactly what I need, sendEmail. It’s only dependency is perl and that should already be installed on your system.

sendEmail -f [from address] -t [to address] [another to address] -u ['subject'] -m ['body'] -a [attachment] -s [your SMTP server]

As the example above shows, you simply call the script, specify your from address, specify the to address (one or many), define a subject and body (if you are including spaces in the subject or body wrap them in quotes), attach a file if you like, and then give it the address of your SMTP server (which was provided to you by your ISP). It’s just that simple and it just works.

I couldn’t locate sendEmail in the Fedora repos (Ubuntu has it in the Universe repo) but it’s VERY easy to install yourself. Download the official release from http://caspian.dotconf.net/menu/Software/SendEmail/ to your home directory, then enter the commands below.

Note: At the time of this writing the current version is 1.54 and the downloaded filename is sendEmail-v1.54.tar.gz. The filename may change later so you’ll have to adjust the commands below accordingly. You will need the root password to install this script to the locations below.

Open a terminal window and go to your home folder (or the location of the downloaded file)

su -c ‘tar -xzvf sendEmail-v1.54.tar.gz -C /usr/lib/’
su -c ‘ln -s /usr/lib/sendEmail-v1.54/sendEmail /usr/bin/’

The first command will extract the files to /usr/lib/sendEmail-v1.54/. The second command just creates a symbolic link in /usr/bin/ that will allow you to call sendEmail from the command line. For those interested, su -c switches user to root, executes the command following the -c and then returns you to your normal user level. I tend to use this method so I don’t forget to log out of the root account and accidentally break something.

Fedora Core 6 – SATA & CIFS Problems

Thursday, November 9th, 2006

I’m having two problems with my FC6 install at work (I’m running a Dell OptiPlex GX270, ya know, a basic office machine). One of the issues is more of an annoyance, the other limits my capabilities and I’m bothered that it’s still a problem on this machine.

The lesser of the issues causes slow boot times. While the kernel is loading and before the GUI boot screen, Linux is probing my SATA ports and not finding any drives. That makes sense since there aren’t any SATA drives in this box. I found 2 posts about this issue on Red Hat’s bugzilla, ID 212581 & ID 212737, I see no confirmation of the problem, so who knows when there will be a fix. Its not really a show stopper as the scan times out, gives up, and eventually boots normally.

This issue is the bugger! CIFS mounts with roughly 100 or more files cannot be read. If you’re unfamiliar with CIFS, its the filesystem type used when mounting Samba/Windows shares. As I’m using this machine at work, this one makes me growl. I have up to 15 shares I need to mount from time to time in order to get my work done. Most of them have well over 100 files just in the root of the share. When attempting to navigate offending mounts with Nautilus, I receive an error that reads “The folder contents could not be displayed“. The error I receive when trying to list the contents of the folder via the command line reads “ls: reading directory .: Invalid argument”. This is a real problem for me as I’m responsible for a lot of documentation, I sort them by directory, I have thousands of folders/files (I’m anal about it and document everything) and I can’t access them through file system mounts.

There is a workaround, I can mount using Gnome VFS (Places > Connect to Server), and I can browse using Nautilus (smb://server/share). This isn’t ideal, I would prefer to have a genuine mount. Not all programs are Gnome VFS aware and I don’t see a way to direct Gnome to mount to an actual file system location. That means that if I create a file with an app that can’t utilize Gnome VFS, I need to save the file to my home dir and then copy it off to the VFS mount. If you know of a way to force VFS mounts use a genuine mount point, PLEASE let me know.

https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=212123 says that this problem has been fixed in CVS and an update will be released shortly. That was posted on October 28th and I still haven’t seen an update addressing the issue.

When Looking at this from a Linux newbie point of view (and I do know that Fedora isn’t a newbie focused distro) this is a real problem. There is no fix for the CIFS problem, well, not unless you want to compile your own kernel from CVS (and that’s nothing more than a drug store chain to many people new to Linux) and the potential fix listed for the SATA problem (mentioned in bug 212581) isn’t something a newb would/should be comfortable doing. If I was just giving Linux a shot and started out with Fedora I might be tempted to just say that Linux is broken and go back to Windows.

Firefox: Address Bar “click selects all”

Monday, November 6th, 2006

If you’re a recent Windows to Linux convert, you might find the default behavior in Firefox’s address bar a little annoying. In Windows, clicking into the address bar would select the entire URL, you could then just start typing to wipe out what’s there and enter a new address. I’ve found that the Linux Firefox defaults to just dropping your cursor into the address bar and you either need to double-click to select all or use some other method of clearing the address bar. If you’re more comfortable with the “click selects all” method do the following:

  1. Open Firefox
  2. Enter about:config into the address bar and hit Enter
  3. In the Filter field enter the text clickselectsall
  4. Double-click the preference name browser.urlbar.clickSelectsAll entry (doing so will change the value to true)
  5. Restart Firefox

That’s all folks, single clicking in the address bar now selects all.

Note: some distributions may have have this set for you, I can only tell you that Ubuntu and Fedora do not.

Install VMware Server on Ubuntu Edgy

Friday, November 3rd, 2006

The installation of VMware server on Ubuntu Edgy is just like it was on Dapper, save for a potential little tweak to get things running. If you don’t know what VMware is and how it can help you, read on and then start Googling! VMware lets you create virtual machines (basically your setting up an operating system in a series of files instead of on physical hardware). You can create multiple VMs and use them to test out other Linux distros without having to take chances with your running operating system. I LOVE this technology, if you want to give it shot follow the steps below.

Download the VMware Server for Linux TAR Binary installer from http://www.vmware.com/download/server/. While your there you should also register to receive your serial number (it is required to complete the install of VMware Server).

I’m assuming that you have some type of firewall running, either a NAT router or software firewall. VMware server will be running as an Internet server on your machine. If you aren’t wearing a digital prophylactic get something on before performing this install.

Open a terminal and install some required packages:

sudo apt-get install build-essential linux-headers-$(uname -r) xinetd

Now change to the directory you downloaded the installer to:

tar -xzvf VMware-server-1.0.1-29996.tar.gz

cd vmware-server-distrib/

Note: In the next step you should feel free to accept all of the default answers. The only thing I ever change is one of the final questions, I keep my virtual machine files in my home dir instead of the default dir under /var.

Note 2: There may be an error creating the menu item for the program (don’t panic), you’re told that you’ll have to create it manually. I found that the VMware entry IS created normally under “System Tools” . If that’s not the case for you, you’ll just need to right click the Applications menu, choose Edit menus, and create a new entry pointing to vmware

sudo ./vmware-install.pl

After all of that, VMware should now be installed and working properly. You can navigate to the menu item created or type vmware into a terminal window to start the program and create a new virtual machine. :)

I’ve installed both VMware server and VMware Workstation on 3 different fresh installs of Edgy and I’ve had no problems creating and running virtual machines. There have been some reports that there is a library conflict in Edgy. If you find that you can’t run VMware on your machine, check out the links below for a work around.

https://launchpad.net/distros/ubuntu/+source/hal/+bug/59232
http://ubuntuforums.org/showpost.php?p=1702260