Mar 08

I’ve been being extremely careful with my files, I’m not 100% convinced that moving files between my Linux and Windows machines via Samba is flawless. As it turns out, there is a problem…

I’m copying FC-6-i386-DVD.iso, which is 3.3G (3525195776 bytes) from my home dir to a Samba share (hosted by a fully patched XP box). Before I copy the file, I create an md5 sum of the ISO. After the copy, I compare the file to the sum and it always fails :(

I can transfer the file from the Linux box to the XP box via FTP without issue. So what the hell is happening when I copy it to the box via Samba? The only difference I’m seeing is that the date and time on the file after the transfer has changed. That’s perfectly normal. Just comparing the file sizes doesn’t tell me anything, they match. The only indication that there is a problem with the file is that the md5 hash is not passing.

It’s not just this file either, it seems that most but not all (???) large files fail when I check them after copying. It also seems to be limited to this install (Edgy). For fun, I tried mounting the same share using the same options (rw,guest,file_mode=0660,dir_mode=0770,uid=<myuid>) and was able to transfer a large file from a machine running Dapper without issue. Both machines seem to be running the same versions of the samba tools. This is FRUSTRATING.

Before I post this, I’m going to poke around and see what I can find out about the issue.

…………………………… (<– those dots are an indication of time passing)

Well! I think I have a work-around. I ran the command dmesg and found “alotta” errors that read “CIFS VFS: No writable handles for inode”. I popped that into Google and found this page with a “fix”. I remounted the share with the “forcedirectio” option and things seem to be working as expected! Damn glad I found this. I’ll continue to monitor my copies for a while, but at the moment I feel pretty good about the fix.

Here’s what scares me, how many people are ending up with damaged files and don’t know it? I haven’t tested the ISO I used in the example after learning that it failed verification, for all I know it’s useless. What if somebody is copying files from his Linux box to his Windows box for backup? How many people are using md5 to compare files copied across the LAN? This could be really ugly for some. :(

written by M@ \\ tags: ,

Jan 30

I mentioned in a recent post that I had installed KDE on my lappy, when I did it, I used the recommended Ubuntu method; sudo aptitude install kubuntu-desktop. If you don’t know, that installs all of the apps and settings that you’d have if you installed from the Kubuntu CD. That’s all fine and good with me save for one thing; I don’t want the Kubuntu boot/shutdown splash screens. I really like the sexy black/orange splash that comes with stock Ubuntu (which is what I installed back in the day). I used the following method to restore the default usplash.

Get to a shell prompt, and execute the following commands:

sudo update-alternatives --config usplash-artwork.so

You’ll be prompted with the following:

There are 2 alternatives which provide `usplash-artwork.so’.
Selection Alternative
———————————————–
1 /usr/lib/usplash/usplash-theme-ubuntu.so
*2 /usr/lib/usplash/usplash-theme-kubuntu.so
Press enter to keep the default[*], or type selection number:

I entered 1 to select usplash-theme-ubuntu.so and hit Enter.

Now enter the command below:

sudo dpkg-reconfigure linux-image-$(uname -r)

You’ll receive a few status messages, and then a few moments later you’ll have your prompt back. Now go about your business, you’re done! The next time you boot, you’ll have the default Ubuntu boot splash staring back at you.

written by M@ \\ tags: , , , ,

Jan 07

Installing DD-WRT on the Linksys WRT54GL went pretty much as the installation instructions said it would. I made it a point to follow them EXACTLY. Before getting started, I reviewed a lot of the info on the wiki pertaining to my particular router model as well as others.

Firstly, I powered up the router and performed a hard reset (hold the reset button down for 30 seconds). This just ensures that the router is using its factory default configuration. I then unplugged my Ubuntu Edgy machine from the old router and connected it to the WRT54GL. I reconfigured my network interface from a static address to DHCP and renewed my IP. I did this from the command line so it looked like sudo ifdown eth0 ; sudo ifup eth0.

The firmware installation is done from the router’s web based administration panel, so using Firefox 2.0.0.1 I logged in and navigated to the firmware upload administration tab. I used the browse button to locate dd-wrt.v23_generic.bin (which I had downloaded and extracted when I ordered the router) and clicked upgrade. After a few moments, I received a page telling me that the upload was successful and I walked away from the whole project for 5 minutes (as the wiki instructed me to. I wanted a beer anyway).

Time passes…

Back at the keyboard now, I click the Continue button and I’m presented with a white page and some fields asking for my username and password. I close Firefox, perform another hard reset of the router, open Firefox again and enter the address of router. Just like magic, I’m presented with the DD-WRT configuration pages of the router. Success!

Since it’s late and I just want to get things working, I’m only doing the basics, setting up static DHCP and a new wireless SSID.

Step one, change the default password from “admin” to something much, much better. Next, I collect all of the MAC addresses from the machines on my network and make my way to the Administration/Services tab. There, I assigned the MAC addresses to host names/IP addresses and configured my LAN domain name (just something I like to play with). I started testing DCHP by connecting to each of the Linux machines, changing them from a static to a DHCP configuration and renewing the IP address (same commands as above). Flawless! With the Linux machines done I configure the rest of the machines on the network the same way.

Next, I create a new wireless SSID and configure my two wireless machines to associate with it. This is where I had a little trouble. Everything but the Ubuntu install on the laptop connected without issue. For whatever reason I just can’t get the bcm4306 based wireless card to associate with the router using manually configured NDISwrapper. I’ll revisit this when I’m not so tired :)

Update: I think I have this fixed, I’ll tell you how in another post

I know I said I was only doing the basics, but I had to try SSH. So back to the Services tab, I enable SSH management (and disable Telnet as I’ll never use it) and click the Reboot Router button. Next, I open a terminal session and enter ssh dd-wrt. I log in with my user/pass and I’m at an ASH shell prompt. The output from a uname -r reads like Linux DDWRT 2.4.34-pre2 #170 Fri Sep 15 20:10:21 CEST 2006 mips unknown. Pretty sexy :)

All in all it was a satisfying experience. I’m running Linux on my router and there’s a LOT of cool things I can do. I haven’t scratched the surface yet, I’ll be exploring options for a while and when I come across something sweet I’ll post about it here. If you’re at all interested in exploring DD-WRT, start by checking out the compatibility list and reading up on the features. The wiki is a great place to start. I had no trouble ordering a 100% compatible router for around $55.00 US (there was a rebate).

If you’re new to Linux and don’t want to have to manage your router from a command shell, no worries. The web configuration pages are extremely useful and cover the full configuration of the router in a point and click fashion. You just can’t go wrong :)

written by M@ \\ tags: , , , , , ,

Jan 03

I’m still following the course over at LinuxBasics.org (and I’m waaaay behind at the moment). Chapter 6 is all about editors, and specifically the Vim editor. So for a least the next few posts, I’ll be composing in Vim and then pasting into Wordpress.

Vim is the editor I’ve been forcing myself to use since jumping into the Linux ring. I chose it because I had heard of it before, I had actually used a GUI version of it in Windows for a while to maintain a Windrop IRC bot, and because everything I had read online made it clear that Vim was a very common and powerful UNIX editor.

There are tons of sweet commands in Vim that allow you to keep your fingers on the keyboard at all times. IMO, much preferable to mousing around an editor (even when I couldn’t type, I still found the keyboard faster). The commands do (of course) require a little practice to really nail down. The good news is that there’s an extremely simple to follow tutor built into the program. To run it, simply enter vimtutor at the command line and follow the on-screen instructions. I did find this tutor back when I started using Vim, I went through it once to collect enough information to make using the editor bearable, now I’m actually taking some time to get this down. Unless you’re an elephant, you’ll probably need to run the tutor a few times.

I’ve re-read the last two paragraphs, it almost sounds like I dislike using Vim. That couldn’t be further from the truth. It’s got a learning curve to it, it requires some thought in the beginning and (fortunately) that eventually leads to muscle memory. It was a moderately tough road at the start. So indeed, in the beginning I had to force myself to use it and at times it was as frustrating as hell. That ends, and I’m very comfortable using it on a daily basis now (I admit that I’m still looking up commands from time to time). The more you use it the better it gets. :)

Whatever you do, don’t go starting up Vim without (at the very least) going through the tutor or checking out some online tutorials. One of the things that make it such a powerful editor is that it has two modes, command and input. When you first launch it, you’re in command mode. Unless you happen to enter an i, a or o as the first character, you’re going to find yourself a little confused and probably annoyed.

Vim is certainly worth snuggling up to if you want to hone some of your skills. If you’ve been exploring your system, you know that almost every configuration file is comprised of plain text and you need an editor to make changes to them. Since you’ll find Vim on just about any distro, you’ll want this weapon in your arsenal.

Note: If you’re using Edgy, perform a sudo apt-get install vim before getting started, it seems that Ubuntu defaulted to Vi (the inspiration for Vim) and IMO, it’s just a bit more difficult get used to.

For more help with Vim check out the links below:

*http://www.apmaths.uwo.ca/~xli/vim/vim_tutorial.html

*http://www.viemu.com/a_vi_vim_graphical_cheat_sheet_tutorial.html (neat cheat sheet)

written by M@ \\ tags: , , , , , ,

Dec 15

I was wondering what nifty utilities were available for monitoring my bandwidth from the console. After a few minutes of googling I found my answer. There were two options that I found right away, bwm-ng and nload. Both programs have similar features so it really came down to look. Since I was slightly happier with nload, I installed it on all of my full-time Linux machines, this included Fedora 6, Ubuntu Edgy and a Debian Sarge server. Don’t take my word for it though, if you have a hankerin’ to monitor your bandwidth, check them both out.

The screen-cap below is shows nload and a few other programs running. The first row is the local machine (FC6), the second row is (from left to right) a Debian Sarge server and an Ubuntu Edgy desktop. The third row shows an available console and an scp command transferring a file from the Fedora box to the Debian box.

Bandwidth Monitor

Installing on Ubuntu:

Be sure that you have the Universe repo enabled (click here for help)

sudo apt-get install nload bwm-ng

Installing on Fedora:

Installing an nload package on Fedora requires adding another repo to your yum configuration. The steps are below.

1: First create the dries.repo file as root. If you aren’t a Gnome user, you can substitute gedit with kwrite or kate below.

su -c 'gedit /etc/yum.repos.d/dries.repo'

Paste the four lines below into the editor, save and exit:

[dries]
name=Extra Fedora rpms dries - $releasever - $basearch
baseurl=http://ftp.belnet.be/packages/dries.ulyssis.org/fedora/linux/$releasever/$basearch/dries/RPMS/
enabled=0

2: Download the GPG key, install it and then remove the local copy (once it’s imported, you don’t need the key file any longer)

wget http://dries.studentenweb.org/rpm/RPM-GPG-KEY.dries.txt

su -c 'rpm --import RPM-GPG-KEY.dries.txt'

rm RPM-GPG-KEY.dries.txt

Done, now you can install the programs via yum. The Dries repo isn’t enabled by default (I only leave official yum repos enabled on my machine). The command below will enable the repo for this install only. If you want to enable dries full-time, edit the dries.repo file and change enabled=0 to enabled=1.

su -c 'yum --enablerepo=dries install nload bwm-ng'

written by M@ \\ tags: , , , , ,

Dec 03

Grumble! For whatever reason, I started receiving a “Failed to Initialize HAL!” error whenever I started my notebook and launched Gnome. The result was that powersaving features were disabled. There may have been other issues but I didn’t have time to explore. This machine is primarily used by the Mrs. and her user experience with the computers in this house needs to be perfect, that’s a hangup of mine, she’s actually pretty relaxed when it comes to the machines. As long as they work when she needs them she’s cool.

The good news is that there’s an easy fix for it. https://launchpad.net/distros/ubuntu/+source/dbus/+bug/19577 gives you all that you need to get fixed up. However this shouldn’t really be a problem.. It seems that this fix was for Breezy and it shouldn’t have been a problem in Edgy. *shrugs*

Anyway, to fix this problem, enter the commands below. After that, all should be fine. Oh, I just rebooted after entering the commands, you may not need to do that.

sudo update-rc.d -f dbus remove

sudo update-rc.d dbus defaults 12

written by M@ \\ tags: ,

Nov 23

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????

written by M@ \\ tags: , , , , ,

Nov 20

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. :)

written by M@ \\ tags: , , , , ,

Nov 17

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!

written by M@ \\ tags: , , , , , , ,

Nov 13

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.

written by M@ \\ tags: , , , ,