mdpatrick

Sign-up for an E-mail Digest
 

Posts Tagged ‘ubuntu’

Asus PCE-N13 Wireless Card Ubuntu Linux 11.04 Instructions

In Uncategorized on December 15, 2011 at 2:04 pm

I needed to buy a Wireless card for my desktop computer, and unfortunately… much to my dismay… despite there being *very* large lists out there on cards that more or less work with my version of linux (Ubuntu Natty Narwhal 11.04), there really wasn’t a list of *detailed reviews* as to indicate how well any given card works with linux.

Seems like an opportunity waiting to happen for someone that wants to put together a review site and curate what’s already kind of somewhat out there.

I went ahead and grabbed the asus CPE-N13. It was cheap, a brand name I recognized, and Wireless N (multiple antennas!).

Much to my dismay, the card did *not* work right out of the box. First, I had to blacklist some default but immature drivers that comes with ubuntu 11.04:

# Add these to /etc/modprobe.d/blacklist.conf

blacklist rt2800pci
blacklist rt2800usb
blacklist rt2x00lib
blacklist rt2x00pci
blacklist rt2x00usb

Pulled out the patch cable, rebooted for good measure… and voila we have wireless. :)

Getting k9copy to work on Ubuntu (fixing segment 11 error)

In Uncategorized on January 21, 2011 at 3:53 pm

K9copy is a utility to copy dvd media on linux. This is particularly convenient if you have a habit of inadvertently destroying every single CD or DVD you own.

After install k9copy on someones suggestion I was repeatedly crashing out with a “segment 11″ error whenever I attempted to use the wizard in the application. Apparently I was just missing a few packages.

The first step to fixing this problem is to first install medibuntu (from the documentation):

First add the medibuntu repository:

sudo wget –output-document=/etc/apt/sources.list.d/medibuntu.list http://www.medibuntu.org/sources.list.d/$(lsb_release -cs).list && sudo apt-get –quiet update && sudo apt-get –yes –quiet –allow-unauthenticated install medibuntu-keyring && sudo apt-get –quiet update

Then if you want to add the medibuntu packages to the Ubuntu Software Center (optional) run this:

sudo apt-get –yes install app-install-data-medibuntu apport-hooks-medibuntu

Then, assuming you’re running Ubuntu 9.04 or later (you can check with lsb_release -a) install libdvdread4 and libdvdcss2 (also from documentation):

sudo apt-get install libdvdread4

sudo /usr/share/doc/libdvdread4/install-css.sh

After doing this k9copy stopped crashing for me with the segment 11 error. It would’ve been nice to have just been told which packages I was missing… Thank you power of Google, anyhoo!

Shortening the Linux Prompt in Ubuntu

In Uncategorized on December 7, 2010 at 3:00 am

I’ve been using my iPhone to do things on my desktop PC at home recently, mostly with the intent of actually being able to do web design/coding while on the run via my iphone.

One problem I’ve been running into is the default command prompt contains the current directory, as well as username by default on the Ubuntu distribution. While ordinarily this works just fine when you’ve got a nice big desktop monitor, on the iphone it takes up valuable screen space and tends to cause lines to double up unnecessarily when you’re deep in some subfolders.

So I decided I wanted to shorten it to a simple dollar sign ($), instead of the normal daniel@mdpatrick-desktop:/etc/sv/git-daemon$. (Mouthful, isn’t it?)

There’s two ways to go about this. The “normal” way is to just edit your local .bashrc file. You can do this by typing vi ~/.bashrc (or if you’re not sure what vi is use nano .bashrc). You’ll want to add something along the lines of PS1=’$ ‘ to the end of this file.

Editing Websites with SSH and an iPhone

In Uncategorized on December 4, 2010 at 4:24 am

Now that I’ve got a smartphone I’d like to actually be able to use it to edit websites. I’ve gotten to where I can SSH my main machine (which is running Ubuntu) at home as well as my webhost’s servers to edit my websites. Access to SSH is ubiquitous among most webhost providers’ servers.

iSSH for the iPhone Rules: It Has Alt, Ctrl, Del, and Arrow Keys (Important!)

I’ve got a cool SSH client on my iphone called iSSH — only a few bucks — that will also connect up to my desktop if I want to do something that requires a little more than the bash commandline. (Which, by the way, you can check what shell you’re using at any time by typing echo $bash).

Though, to be honest, using vnc for a view of the desktop tends to be slow and barebones. It’s way faster if I can get a good grasp of doing the things I need to do from the actual commandline since it boils down to only transmitting text. iSSH has the benefit of supporting important characters like the alt key, among other things, which is very useful for certain unix commandline — particularly the text editors, which are primarily used for direct editing of files such as css stylesheets, pdf, html, etc.

Logging Into a Linux Box with Dynamic DNS

My home IP address changes occasionally — though, not often. To make it so I could consistently find my home “box” I signed up for a DynDNS.org address which will allow you to login with yourownaddress.dyndns.org, which an app on your box can update automatically periodically ensuring that if your IP address changes you’re still available through the DynDNS address.

File & Directory Lists: Assessing Folder Size, Listing Files

Recently, when logging into my PC I realized I needed to liberate some space on my dropbox. I had to determine which folders. Ordinarily to list files I use this command: ls -alhF. This shows most of the information you’d ordinarily need, and includes options to make folders stand-out (-F), show normal file sizes (-h), show hidden files beginning with a . such as .htaccess (-a), and -L for longer listing.

However, even this well adapted version of ls I find that when working with the commandline in the unusual circumstance that I need to liberate space rapidly from a dropbox folder with many sub-folders, for example, ls does not show the file size of folders *beneath the current folder*, but instead only of the immediate files within the current directory. In order to see the space amount of space all of the directories take up counting all sub-folders and files it is necessary to use the following: du -h -c .

In this case, the . in du -h -c represents the current directory.

Commandline Text Editors: Vi, Vim, Nano

Though, I’ve been told by friends I really should learn vi or vim if I want to speed things up, I mostly just use nano. I’ll have to memorize some of the whiz-bang tricks for using vi to make it worth the switch. (See the vi cheatsheat) For the time being, however, nano is very intuitive, with it’s on-screen directions for basic commands. Vim, by the way, is just a sort of improved version of vi. For the most part the fundamentals are the same with either one.

Git is Awesome

One cool thing about using an iphone and SSH to edit pages, is almost every webhost, as well as my desktop PC has git on it. Which means that even as I edit the web page, whether I’m logged into my desktop or another server I can keep track of my changes, and if I make an accident which I may be a little more prone to use typing on the iphone’s capacitative screen, I can always roll back safely to the previous version.

This is really important because it eliminates the possibility of disaster and really makes doing editing from a smartphone a more viable option.

Other useful links:

Version Control: Git, Windows, and Dreamweaver

In Uncategorized on November 27, 2010 at 5:02 am

I’ve been doing some reading on version control, and had to make the choice: git… or subversion? Git…. or subversion. After reading subversion was supposedly “easier,” and find it not quite easy at all I decided to make the jump to git. I’m not quite there.. yet. However, gitref.org has been a big help. Read more about git at the wikipedia page if you’re unfamiliar.

Thus far I’ve been learning the commandline elements, which I’m comfortable with because most of the editing I do no longer involves any form of a wysiwyg (like Dreamweaver), and can in fact, be done from the commandline… Which is convenient, because I can access the commandline of my ubuntu desktop via my cell phone.

However, I realize that there may be times in which I may be working with people who I may need to share some form of version control with that do, in fact, use the Windows operating system regularly. (Admission of guilt: I still use Windows on my laptop too, so no false claims of being a total purist myself either.)

So, without further ado, enjoy a few relevant windows & git links:

  • TortoiseGit
  • GitWeaver – TortoiseGit… but from inside dreamweaver. Extension works with CS/CS2/CS3/CS4/CS5 (I think).
  • GitRef.org – Awesome git guide.
  • “git checkout” man(ual) page – I found this necessary because gitref didn’t cover checkout as well as some of the other stuff (which it did quite well).

Okay… Back to gitref for me…

Hide me
Sign up below to join my eNewsletter
join our mailing list * indicates required Email Address *
Show me