Showing posts with label linux. Show all posts
Showing posts with label linux. Show all posts

Thursday, May 13, 2010

Seriously, windows?

Was tweaking some code for windows execution last night, and it froze on me twice. Once in the middle of testing (I'm constantly saving my work, of course), and when I was finished, it froze on the shutdown screen. Which brings the total of Windows 7 freezes to six.

I'm sorry to bitch, it's just that this stuff blows my mind!

I've got a brand spanking new laptop fresh from Dell with the latest and greatest flavor of Windows on it, all factory defaults, no funny business, no tweaks, no hacks, no items, fox only, final destination, and the fucking thing STILL crashes fresh out of the box.

What's even more fucked up is that people put up with it because it's what they've been conditioned to expect from computers.

Number of Linux crashes: 0

Blows my mind...

Monday, May 10, 2010

Dual boot Windows 7 and Ubuntu Linux 10.04 LTS on a Dell Inspiron 11z

STEP 1: Testing out Ubuntu without making changes to your computer.
(this first step actually applies to any computer, not just the Inspiron 11z)

First thing you need is an empty USB drive with about 2 gigs of space on it. They're cheap. Buy two in case you put one through the wash.

Download the Linux Live USB Creator, it's free, it works great.
Download the latest version of Ubuntu, making sure you click "Alternate Download Options" and select the 64-bit version before you start the download.

Install and run the Linux Live USB program, and make sure it can find the USB drive in the first step. If your drive isn't popping up in the drop down, click the arrow circle to the right to refresh and try again. Found it? Good. Remember that it will get erased, so back it up and empty it first.

Once the Ubuntu ISO is downloaded, click the ISO button on the USB Creator, and select the Ubuntu download file (it should end in ".iso") Drag the slider to 300-500MB of persistence depending on how much space you have on the drive. The persistence will make it easier to make adjustments to the live environment if you want to play with it before you pull the trigger on the install.

Uncheck all the options in the USB Creator Step 4, we don't need them for this.

Click the lightning bolt and grab a sandwich!

When it's done just reboot with the USB drive still plugged in, and boot to USB. On the Inspiron llz, you press F12 when it starts turning back on, and you'll get a boot menu. Select the second option; USB drive.

Ubuntu will load and log you in automatically. From here, you can get a feel for Ubuntu, test the suspend, etc. Know that my 11z had intermittent issues with the Live session around the wireless card and even the wired connection. If you have these issues too, don't worry. The full install works fine.

At any point you can click on the power button in the top right corner of the screen, select reboot, and boot right back into Windows without it ever knowing you cheated on it. The Live USB doesn't even touch the harddrive, it only uses your RAM.

STEP 2: Making it stick.

Ok, it's time to get our dual boot on. First thing we need to do is make some room for Ubuntu to live on. Since windows is picky, we're going to have to use its repartitioning tool. Follow these instructions to reduce the size of the primary partition (your c: drive in most cases). Ubuntu only needs like 10GB (10000MB) of space, but you can (and probably should) go over that. I ordered my 11z with 300GB of space, so I just gave it 100GB (100000MB). When you've selected the size, click Shrink and let Windows shrink the partition. When you're done, just leave the space unpartitioned, and reboot back into windows.

Do not load Ubuntu after you're done shrinking the partition, you NEED to reboot back into windows to let windows get comfortable with the new partitioning. Once you are logged in, you can reboot back into Ubuntu, and select the install function.

The setup is pretty obvious until you make it to the partitioning, simply select the "largest available free space" button, and Ubuntu will set itself up on the free space you made when you shrunk the partition in windows. The rest of the install is also obvious, and shouldn't take too long. When it's done just reboot. :)

Your box will restart, and the new bootloader will open up with the first selection, Ubuntu, as the OS it's going to load by default unless you select Windows 7 before the timeout. Select Ubuntu, or let it load on its own.

Once Ubuntu is loaded, your wireless card will not work, this is because Ubuntu needs to check the internet for the proprietary drivers it needs to run the Broadcom wireless card. So just plug it into the internet using a wired connection and wait. Ubuntu will find the drivers, and a pop up will let you know there are some proprietary drivers available for your hardware. Just accept both those drivers, and reboot. You'll be good to go.

As for battery life, I got the 6-cell battery, and Ubuntu at rest with wireless on, and screen at a normal brightness setting should run for 6.5 hours. With the screen dimmed, 7 hours. With the screen dimmed and wireless off, 8 hours. Not bad at all.

Sunday, March 28, 2010

Command line humor, it's like laughing at a copier manual.

xxxxxx@Aemaeth:~/Desktop/hamachi-0.9.9.9-20-lnx$ hamachi-init
Initializing Hamachi configuration (/home/xxxxxx/.hamachi). Please wait ..

generating 2048-bit RSA keypair .. ok
making /home/xxxxxx/.hamachi directory .. ok
saving /home/xxxxxx/.hamachi/client.pub .. ok
saving /home/xxxxxx/.hamachi/client.pri .. ok
saving /home/xxxxxx/.hamachi/state .. ok

Authentication information has been created. Hamachi can now be started with
'hamachi start' command and then brought online with 'hamachi login'.

Cool. Lets get started.
xxxxxx@Aemaeth:~/Desktop/hamachi-0.9.9.9-20-lnx$ hamashi start
bash: hamashi: command not found

wat
xxxxxx@Aemaeth:~/Desktop/hamachi-0.9.9.9-20-lnx$ hamashi start
bash: hamashi: command not found

Oh, I think I need to be root
xxxxxx@Aemaeth:~/Desktop/hamachi-0.9.9.9-20-lnx$ sudo hamashi start
sudo: hamashi: command not found

wtf? OH! It's hamaCHI not hamaSHI.
xxxxxx@Aemaeth:~/Desktop/hamachi-0.9.9.9-20-lnx$ hamachi
Hamachi does not seem to be running. Have you run 'hamachi start' ?

There we go. Me and my fast fingers...
xxxxxx@Aemaeth:~/Desktop/hamachi-0.9.9.9-20-lnx$ hamachi shart
Hamachi does not seem to be running. Have you run 'hamachi start' ?

wtf?! I just-- LOL


shart

Monday, December 07, 2009

Ubuntu major upgrade a major breeze

It's true what they say about the plumber's sink.

Our home laptop runs Ubuntu because I don't want to have to deal with it. I don't want to have to tweak it, I don't want to have to fix it, I don't want to have to spend days dicking with config files to get it working on the non-standard hardware the laptop runs on.

Consequently, the Ubuntu version was severely out of date, and I didn't want to have to deal with the upgrade.

Eventually the lack of software support for the older version made it necessary to pull the trigger. I checked a few sites that promised me I needed only click a few times, and reboot.

I opened the update manager and clicked to check for a new version. I clicked upgrade, and literally clicked under 10 times through the course of the upgrade (including the reboot), and it was done.

Microsoft had better get their shit together.

Monday, November 03, 2008

Nautilus no-no's

I've been struggling with sporatic slowness on my work linux box. I had attributed it to Firefox, and most of the time it was; but the slowness was becoming more persistent. Kswapd0 kept ramping up, and taking all the cpu cycles. Eventually I was frustrated with my icons not updating, and killed and restarted nautilus.

When nautilus started back up, it felt like the computer it was months ago.

I'm just going to restart nautilus occasionally now.

Wednesday, July 30, 2008

fsck will save your fscking life

fsck, or the unix/linux command "file system check" is the answer to that horrible pit-in-the-stomach feeling you get when you boot up your computer, and by no fault of your own, you get a message indicating your hard drive is buggered.

When I ran windows at home and at work I had experienced about 8 random cosmic ray-related hard drive buggeries. All 8 resulted in complete rebuilds and tearful attempts to recover data.

Since I've switched to linux I've experienced no less than 5 of these buggeries. fsck saved me from all but one (fucking Maxtor!). One of which occurred quite literally four hours before a large project was due.

fsck was there to save my fscking life.

Thank you fsck, and thank you linux.

Wednesday, July 02, 2008

I just leave this running for optimal firefox usage.

~]$ while(true);do killall firefox-bin; sleep 2d; done

Friday, April 25, 2008

I <3 Screen (again)

GNU Screen is civilization.
GNU Screen is god.

GNU Screen is godilization.

GNU Screen is GODZILLA!!!

I need to find out if it's legal to marry a computer program in California. (shit it probably is)

Maybe I'll just print the source code out, and bind it into a book so we can hang out.

And video tape it.

And dub over it with Best Friend.


...


....hmmmmmm...


Beloved Screen

Monday, April 21, 2008

Holy shit!

Whatever you do, don't accidentally hit caps lock in command mode while working in vi.

Shit goes crazy!

Wednesday, February 27, 2008

Saturday, February 23, 2008

Rebuild time!

I decided I had been without a backup for too long, and fearing loss of my very imPORtaNt data, I bit the bullet and bought a big hard drive and an enclosure. I wound up with a Seagate 750GB. I've been burned by Maxtor before (I used to think you were cool!), and decided Seagate was the only way to go.

Right now it's backing up almost my entire hard drive (80GB), and after it's done, I'll be giving this laptop the rebuild it has been needing. The windows partition succumbed to who the fuck knows what (my guess, DLL conflicts/mismatches), and was so crippled it couldn't even ping itself without dumping trash in the output (which, btw, is pretty fucked up). Since the Linux partition was working so well, I saw no reason to bother rebuilding the windows side. (which would also wipe the hard drive during the system restore "sledge hammer for a tack" process, requiring another repartition, and a fresh Linux install) But my GF has been missing some of her windows apps, and dwarf fortress needs some OpenGL updates to run faster (yes, somehow it's a window only roguelike), so it's time to take care of business.

At least my Linux user files, preferences, and configuration will be 100% restored as soon as I copy my backed up home directory. I need only worry about losing the tweaks I did to get the system running smoothly (video card, ndiswrapper, external video, etc) so I'll try to catch everything before I rebuild.

Maybe I'll even try a new flavor a Linux.

Monday, January 28, 2008

EPOCH FAIL!


Damn hilarious!

UPDATE: Hint to google searchers; It's a wordplay on "Epic Fail!" and Epoch time (Posix/Unix time).

Tuesday, October 23, 2007

Better RDP brute forcing

Win.

I hated TS grinder with a passion.

UPDATE
Bugger. Seems it can't cope with a GP "Legal Notice" (banner). Oh well, it's still good.

Thursday, September 13, 2007

Yet somehow; I have a girlfriend.

do /dev/dance;
make love;
at 19:00
at> wget down
at> <EOT>

Thursday, May 17, 2007

Flash 9 FINALLY out for Loonix

Yes, Flash 9 has finally been released for Linux.

At the risk of sounding like an ingrate; 'bout freakin' time.

Saturday, May 12, 2007

Awesome.

Here I seeded for some cool info. Now, I blog from my Fedora laptop with broadband internet care of my cell phone. Now wherever I'm on sprint's network, I need only plug in my laptop, start up the broadband modem in my phone, and plug in.

Cable and internet are coming Tuesday, but this shit is just on a different level. An awesome level.

Life am good.

Friday, May 11, 2007

Seeding

Move along, nothing to see here.



PPC-6700 modem internet access ppp virtual modem USB modem linux fedora interface

Connecting your linux box to the internet though your PPC-6700 internet access by setting up a usb-enabled ppp modem connection riiiiiiiiight HERE

No home internet access till Tuesday so I decided to finally research this possibility. I had a hard time finding it, I hope this helps someone else have an easy time!

Wednesday, November 08, 2006

Monitor eBay for new items

I've been looking at the Sharp Zaurus SL-5500 for a bit of time. Wireless + Openssh + internet browsing + mp3 + movie = geek happiness. (honestly, I really only care about the wireless, and openssh, but the rest is pure icing!) The Zaurus series runs a full distribution of Linux which = teh roxor. I'm trying to be a bit more careful about my handheld device purchases, because I sure hate spending money on something I'm not going to use, or stop using after a short while. The SL-5500 is a perfect introduction to the Zaurus series since they are plentiful and can (usually) be had for a little over $100. People don't like them because they have very limited battery life when using wireless, but there are ways around that. I figured I would be able to get acquainted with the Zaurus and see how I like it, and if I lose interest in it easily. Then, I can decide if I want to get a SL-6000 or something.

But I digress...

The reason this script was put together was because someone posted their sl-5500 for a very low price on the buy it now feature, and it was snatched up (what I can only assume was) very quickly. This script will check to see if there are any new items in the search results, and send you an sms with the item number so you can check it out. Note that this script only searches one page, though could probably be changed to search many or all pages...


#!/usr/bin/perl

$message='sl 5500';

@rray=split ('<tr ', `curl -L 'http://tinyurl.com/yn4hkf 2>/dev/null|grep 'List View'`);
if(@rray[0]!~/script/){print "fission mailed!\n"; exit;}

$oldids=`cat sl5500.ids`;
`rm -f sl5500.ids`;

for(@rray){
if($_=~/ebLeft/){
for(split('<td ', $_)){
if(/coitem\" value="(\d+)"/){
$id=$1;
if($oldids!~/$id/){
`/home/bishop/sms.pl $message -- $id`;
}
`echo $id >> sl5500.ids`;
}
}
}
}


If you wish to make your own script, make sure you add a check like in line 3 to make sure ebay responds to you. For some reason, every 20th or so try would get a connection reset from ebay. This made no sense, so I just tossed in that check. It pretty much runs the same way my gmail notifier works. Simple is good.

Tuesday, October 10, 2006

Monitor a webpage for updates

Yes, more Linux scripts.

I was participating in a flame war online discussion on a forum, and wanted to know the second someone replied to my forum post. So while I was hitting F5 over and over like an idiot I realized that computers are supposed to do dull, repetitive tasks, not me! So, I hacked together a few of my other scripts and came up with a kluge of a solution that worked.

I was able to continue working on my projects, and be notified immediately if someone replied to my troll flame-bait well-worded response. And there was much rejoicing...

More recently, I wanted to track a package that I was supposed to be shipped to me quickly. (f'ing UPS) I dug up that old script and couldn't believe that I'd actually used the wasteful code I'd written! I quickly started on a more elegant solution.

First we find out how many lines are on the page:
[XXXX@XXXXXXXXXXXXX ~]$ lynx --dump 'http://page-to-check'|wc -l
193

Here we're using "Lynx" which is a text-only web browser. Since it only gets text, we don't have to worry about leaching a large amount of bandwidth. (in the case of the UPS tracking, I was pulling around 55K every 10 minutes, which is probably just fine, especially considering that I'm only going to be doing it for a short while) I'm using lynx's "dump" function to dump the page to the screen, instead of opening the page in the window for me to view and navigate through. I'm then taking this output, and sending it to the "wc" program using a pipe (|) ("\" with shift). The "wc" program is a word count program that will count the words in a file or from input, I'm using the "-l" switch to make it count the lines from the web page that lynx dumped for us. The line count is 193.

Now that we know how many lines it was we last checked it, we can make a loop that checks to see if the line count has increased, and notifies us.

[XXXX@XXXXXXXXXXXXX ~]$ while(true); do if [ `lynx --dump 'http://page-to-check'|wc -l` -gt "193" ]; then kdialog --sorry omgpancakesdangerous; fi; sleep 600; done


I've bolded the part I've already gone over, and the program output. The while(true); do means to do the following forever. if [ checks if the command we ran previously (bold) has an output that is -gt greater than 193. If it does then it will run kdialog --sorry omgpancakesdangerous which will send a pop-up box to the user with the text "omgpancakesdangerous", because they are. fi; closes the If statement, and sleep 600; tells the script to wait 600 seconds before trying again. The done at the end is the end of the while(true); do loop, and will start the script over again at the if [ statement.

Important note on choosing a wait time:
There is little difference in the speed you set it to. Having it check every 5 seconds versus every 60 seconds is really not that much longer considering how quickly one minute passes. Think about how often the pages updates, and how long you'll have the script running. If you want to check a forum to fire a response back ASAP, set the wait time for 60 seconds. If you want to see if your favorite blog has made any updates, set the wait time to 1 hour. There's no need to check a blog for updates every minute, and checking a forum thread for updates every hour is a bit slow. The point here in moderation! If you set a short wait time, you should only let the script run for about an hour. Don't check a site every 60 seconds for two weeks! Bandwidth costs money. Leaching unnecessary bandwidth from a site will increase costs for the site owner, and most webmasters don't take kindly to impolite scrapers (scripts that "scrape" content off a site over and over) Keep in mind how much bandwidth you're using; if you're scraping pictures off a site over and over, you'll definitely get noticed since pictures take up a lot more data than just grabbing the text. If you're rude, or wasteful, you may find your IP address blocked from accessing the site at all!

BE NICE! Think about the nice webmasters who are running the site you're using. They don't want to have to block you, and you don't want to have to be blocked, so be nice and play by the rules.

Friday, October 06, 2006

Mind that MAC address

I spent a good part of this morning trying to change wireless access points. The one I usually use lost internet access, so I changed to another one, and found that that one had also lost internet access.

I began to think that the internet might have gone out for our area, when I realized that the mac address of the access point I was connecting to was the same as the one of the access point I usually use... Even though I told my card to use the new ESSID, it was defaulting back to the first one, and not updating the ESSID in the list; so it looked like it was using the new ESSID, but the mac address of the AP it was connected to was that of the old ESSID.

I changed all the default settings and even screwed with the channel, but couldn't get it to consistently use the new ESSID for more than a few minutes. Strange.

At least I figured out what it was doing; it was even stranger when I seemed to be connected to the new network with settings from the old network!