Linux Blog

Mounting Remote shares with SSHFS

Filed under: General Linux,Quick Linux Tutorials — TheLinuxBlog.com at 4:47 pm on Wednesday, August 11, 2010

If you have ssh access to a remote machine and wish to browse the file system SSHFS is a great utility.
It can be easily installed by your favorite package manager, or compiled from scratch. It has been a dear friend of mine for at least a couple of years.

To mount a file system with SSH, it is almost simpler than making an SSH connection:

sshfs [user]@[host]: [mountpoint]

to unmount is just as simple. Either:

fusermount -u [mountpoint]

OR

sudo umount [mountpoint]

Once your remote file system is mounted, you may bask in its glory and take advantage of everything a local file system has to offer although you may notice a slight delay.

If you’re an mplayer user and wish to stream media, you can use the -cache option to give you a little bit of a buffer.

Making ISO’s with dd

Filed under: General Linux — TheLinuxBlog.com at 4:59 pm on Monday, July 26, 2010

Creating an ISO Image under Linux from the command line is a really easy process. Fire up your favorite terminal and type the following:

dd if=/dev/cdrom of=<iso image name>

The if is for input file and the of for output file. There are lots of options for dd so check out the man page.

To mount the newly created image (as root) you can mount it as a normal device with the -o loop option:

mount -o loop <iso image name> /mnt/<dest dir>

Things I can do before Windows Boots

Filed under: General Linux — TheLinuxBlog.com at 8:38 am on Monday, June 28, 2010

I guess I’m one of the lucky ones that gets to use Linux at work. The kicker is, I need Windows to do part of my work so I have two machines. After a recent power outage, I needed to boot both machines this morning. So, I thought I’d document what I did before Windows booted.

  1. Turned both machines on
  2. Cleaned 3 coffee mugs and came back
  3. Talked to my boss about the power outage
  4. Logged into my Linux machine
  5. Started all the software I thought I might need for the day (Pidgin, Thunderbird, Firefox, Eclipse, Tilda and screen)
  6. Checked my e-mail
  7. Approved some comments on this blog
  8. Wrote this blog post.

On that note, my Windows machine is about booted and I can load up the Word documents that were inconveniently sent to me in .docx format. What a Monday Morning.

Excuses, QLandkarte, BOFH and Devscripts

Filed under: General Linux — Owen at 8:32 pm on Monday, April 12, 2010

After not writing for a little while (I call it writers block, you can call it lazy) I decided to do what any Linux Geek would do. I searched two different distributions software repositories for excuses. Fedora and Debian had quite different but interesting outputs.

Fedora’s came up with QLandkarte GT which is a GPS tool that replaces .

QLandkarte GT is the ultimate outdoor aficionado’s tool for GPS maps in GeoTiff format as well as Garmin’s img vector map format. Additional it is the PC side frontend to QLandkarte M, a moving map application for mobile devices. And it fills the gap Garmin leaves in refusing to support Linux. QLandkarte GT is the proof that writing portable applications for Unix, Windows and OSX is feasible with a minimum of overhead. No excuses!

Debian on the other hand came up with two results one more entertaining than the other, but both useful. The first being a package called devscripts that are

scripts to make the life of a Debian Package maintainer easier

The second package is what I can describe as an awesome find for excuses “fortunes-bofh-excuses”. If you like BOFH or fortunes and have a twisted sense of humour I’m sure you’ll love this package.

If you get a chance and run a different distribution, I’d love to see the packages that come up for it. I was really trying to find something that would help me get a little more organized, or add a little more confusion to my workday. Mission Successful, feel free to flame.

Multi Tail – Multi Tail!

Filed under: General Linux,Linux Software — TheLinuxBlog.com at 6:28 pm on Wednesday, March 10, 2010

Multitail Gnome Terminal

A few weeks ago a new version of RSSTail came out. After reading the RSSTail page I found out that you can use RSSTail as a plugin to a fantastic application called multitaill. That is when I realized that multitail is actually written by the same person.

If you rely on tail, or have ever used tail you’ll probably enjoy this one. As the name implies it is a pager like tail except that it supports for more than one stream. Now, I know some of you have probably used some wizardry do get your favorite pager to show multiple streams, either in the same output or by using screen / splitvt but multitail really simplifies the process. It has all kinds of settings (such as color) and allows you to manage your tail’d files on the fly and even save the current view for later use. It does have a little bit of a learning curve but I think it is well worth it, especially if one of your hobbies includes log watching.

Ubuntu Unleashed 2010 Edition Review

Filed under: General Linux — TheLinuxBlog.com at 11:36 am on Monday, January 25, 2010

Irritated with my Desktop after an upgrade gone bad and an incident with the nvidia noveau driver that left me x less, I decided it was time to re-install. I turned to my bookshelf to find Ubuntu Unleashed 2010 Edition. Normally by the time a book hits my shelf the material is outdated, not necessarily useless, just not the most up to date. This is an exception. The Ubuntu Unleashed 2010 Edition was updated with an Ubuntu 9.10 DVD and a “Free Upgrade to Ubuntu 10.04″ which I found out that if you buy the book before the end of 2010 you can get an upgrade kit in the mail.

So, I pop the DVD in the drive and start the installation. Nothing new here for anyone that has installed Linux or Ubuntu recently; for those that haven’t, it was a pleasant surprise to see that it actually detected my high resolution monitor and used it to its advantage. It really is strange to not have to squint at an installer. The first chapter covers the step by step installation in more detail which is relatively short and easy to follow. Most people should not need to read this if they are familiar with installing an operating system but it I think it is good to have it there. Just don’t let this first chapter prevent you from looking further into this book. After putting the DVD in and getting it started, I found myself reading the book through the entire installation; which for some reason got from 0-90% quickly, then took the majority of the time in the 90% range, but I’m not complaining.

The Authors really did a good job of writing in an understandable language and organizing the book in a logical format. I’ve found myself flipping through and finding many golden nuggets of information. I personally would not have picked this book up because of the title, since I’m not a big Ubuntu user. But Ubuntu Unleashed 2010 edition is packed full of information, 32 chapters and a hefty appendix to be exact. It is not all Ubuntu – specific either, meaning most of the content should work on just about distribution. This book would not be rendered useless if you don’t decide to go the Ubuntu route. I recommend taking a look at the contents and buying this book, as I’m sure you’ll be pleasantly surprised at the topics it covers. I think it would be a great book for someone that is interested in Linux in general, it reads well but can also be used as a quick reference. I wish I had a book like this when I was getting started, it would have saved me a whole lot of time and effort. I have set aside some of the more advanced chapters and made a note to read later.

Other reviews I’ve read have said that it has too much terminal use in it, which is something Ubuntu is trying to eliminate. While this may be true, if you want the most out of your Linux distribution, the fact is you will at some point use a terminal. Commands are less likely to change as much as graphical interfaces. Although some things may be slightly outdated I don’t think that this book should be re-written, as it is in the nature of open source and technology to change. If you keep this in mind I don’t think you’ll be disappointed with it.



Syncing your Delicious Bookmarks

Filed under: General Linux — TheLinuxBlog.com at 11:24 am on Friday, December 11, 2009

I’ve written about syncing your bookmarks on Linux before.

I’ve been using the method with GMarks and the Google Toolbar plugin for some time and it works just fine. I also have a Delicious account that I use for work, that I like to access and save book marks to from any computer., this is where SimpleDelicious comes into play.

Simple and seamless delicious bookmarks management from your FireFox browser menu. Unlike others it’s aimed to be simple to use and not bloated with invasive and unnecessary features.
features:

-Add and delete delicious tags/bookmarks from the browser menu, as simple as that

And it really it is, it’s a quick install then enter your account information and you’re good to go. I find the sorting on it is a little strange as it organizes by tags rather than folders, but it works. If you remember where you put something or have a good organizing system (unlike my assortment of random tags that seemed like a good idea at the time) you’ll always be able to find what you’re looking for. You can always use the web front end to search and organize your bookmarks if you have to, but this firefox plugin makes syncing and adding to your delicious bookmarks easy!

delicious_thumb

When not to script it

Filed under: General Linux,Linux Software — TheLinuxBlog.com at 10:37 am on Wednesday, December 2, 2009

I’ve come across a number of programs in the past and thought to myself,

“Why didn’t they script this, it would be so much easier.”

After thinking about it for a while it all makes sense now. It seems that I had the shell script bug, everything must be done in the shell! In reality while the shell is great and all, it is not without its flaws. There are somethings the shell is great at and should be used for, then there others it shouldn’t.

Don’t get me wrong, I like to script as much as the next guy, but sometimes I think people get lost in its simplicity. Some people use it for everything without fail. Perhaps this is because they don’t know otherwise, or maybe because they too have the shell script bug.

There are many reasons to use the shell and I’m not against using it by any means. This is simply a list of when it may not be suitable to whip out the shell and start scripting. If there is any I missed, please add them in the comments and they may eventually make it into a revised post. I’ll do the same if I come up with any more. Onto the list!

Distribution / Portability – Ever try to distribute a script? Well, most of the time its not a problem, but sometimes you’ll get bit in the ass. Not all systems are created equal. Some have missing packages, or something doesn’t work the EXACT same way.

Simplicity – Sometimes bash is elegant. Well, it depends on your definition I guess. Some argue that scripting is simple, where as others that have to support or maintain it will be ready to cut you. I know I’m sharpening my shanks right now for some revenge. Seriously though, choose a language that makes it easy to K.I.S.S (keep it simple, stupid.)

Performance – Lets kick in the after burners. This is one I don’t have much experience in although I should probably look into it. The shell is sort of like a glider, it gets the jobs done, but I wouldn’t want to race it against a jet or anything. If you’re considering scripting, just time the process to make sure it meets your performance needs. Most of the time, if it is for you, you’ll be fine right? I mean you’ve got all of the time in the world and can wait overnight if you have to. I’d rather not, but have been known to wait on a slow script out of laziness.

Maintenance – Nightmare code. Dependency Hell. Some may have seen the t-shirt or heard the phrase,

“Programming is like sex; one mistake, and you’ll support it forever”

Yea scripting this is sort of like that, except you can always abandon and upgrade your scripts :)

Security – Keep it secure, there are many issues with security in shell scripts. We wont get into them now but if you wear a tinfoil hat when using a computer, you may not want to rely on shell scripts to do your top secret stuff.

Yum Messed Up

Filed under: General Linux,Linux Software — TheLinuxBlog.com at 10:05 am on Monday, November 16, 2009

So, this morning, when I got to work and booted up, I noticed something was wrong. My machine was not running as usual. It turns out, packagekit was sitting there being a general pain. I just wanted to look busy, so I killed the process. Turns out that wasn’t such a good idea, since it didn’t finish doing whatever it was doing and caused an ugly error like this:

rpmdb: Thread/process 28373/3077981888 failed: Thread died in Berkeley DB library
error: db4 error(-30975) from dbenv->failchk: DB_RUNRECOVERY: Fatal error, run database recovery
error: cannot open Packages index using db3 – (-30975)
error: cannot open Packages database in /var/lib/rpm
CRITICAL:yum.main:

Error: rpmdb open failed

rpmdb: Thread/process 28373/3077981888 failed: Thread died in Berkeley DB library
error: db4 error(-30975) from dbenv->failchk: DB_RUNRECOVERY: Fatal error, run database recovery
error: cannot open Packages index using db3 – (-30975)

Naturally, I tried using rpm, do try and fix things, since it indicated something to do with a database I tried:

[owen@linuxblog ~]$ sudo rpm –justdb
rpm: –justdb may only be specified during package installation and erasure
[owen@linuxblog ~]$ sudo rpm –rebuilddb
rpmdb: Thread/process 28373/3077981888 failed: Thread died in Berkeley DB library
error: db4 error(-30975) from dbenv->failchk: DB_RUNRECOVERY: Fatal error, run database recovery
error: cannot open Packages index using db3 – (-30975)

Well, it turns out that those options don’t work, and the rebuilddb gave an error about the db4 being corrupt. Well, I decided to go into /var/lib/rpm as the other error had that directory and found the db4 files. Running db45_recover sounded like it might work, so I gave it a shot.

[owen@linuxblog rpm]$ db45_recover -h /var/lib/rpm/
db45_recover: unlink: /var/lib/rpm/__db.003: Permission denied
db45_recover: unlink: /var/lib/rpm/__db.004: Permission denied
db45_recover: unlink: /var/lib/rpm/__db.000: Permission denied
db45_recover: unlink: /var/lib/rpm/__db.002: Permission denied
db45_recover: unlink: /var/lib/rpm/__db.001: Permission denied
db45_recover: /var/lib/rpm/log.0000000001: log file unreadable: Permission denied
db45_recover: PANIC: Permission denied
db45_recover: DB_ENV->log_newfh: 1: DB_RUNRECOVERY: Fatal error, run database recovery
db45_recover: dbenv->close: DB_RUNRECOVERY: Fatal error, run database recovery

That’s right,you need to be root for this bad boy:

[owen@linuxblog rpm]$ sudo db45_recover -h /var/lib/rpm/

The above seemed to fix it for now. I guess next time I’ll think about it more before I start slaying processes on a Monday morning.

Backup your DVDs on Linux

Filed under: General Linux — TheLinuxBlog.com at 12:01 am on Wednesday, November 4, 2009

At an average of around $20 per DVD* most can’t afford to have any of their DVDs lost, stolen or broken. Backing them up is a touchy subject depending on who you talk to, but here is how to do it anyway.

Backing up a DVD on Linux used to be much harder than it is with K9Copy. No more flaky DVD Shrink crashes under wine. K9Copy takes the hassles out of creating backups of your DVDs under Linux. As the name implies it is KDE software but works well under gnome provided you have the needed libraries installed.

It has many options to backup and really is pretty comparable in functionality to the infamous DVD Shrink for Windows. Take a look at the screenshots and give it a try yourself:

* 2007 US Entertainment Industry Report (www.mpaa.org/USEntertainmentIndustryMarketStats.pdf)

BackTrack Persistent “Press Enter Fix”

Filed under: General Linux,Shell Script Sundays — TheLinuxBlog.com at 5:37 pm on Sunday, November 1, 2009

One of the things that has irritated me about the persistent USB thumb drive installs is the “Press Enter” to continue prompt on shutdown. Luckily, if you have persistent working correctly, the fix for this is easy.

Open up /etc/rc0.d/S89casper
Search for ENTER and the shutdown string “Please remove the disc and close the tray (if any) then press ENTER: ” > /dev/console”
For me, this was on line 89. Comment out, that line and the lines down to the ending bracket for the do_stop() routine.

Reboot, and see if you have that annoying message, if not you’re good to go.

Next Page »