Archive for the ‘Technology’ Category

Unable to empty the trash in Mac OS X

Wednesday, April 11th, 2007

Ok, so we use Surrond for source control at work (I know I know, it sucks but I didn’t pick it). Well, I checked out some files and then ended up deleting them all. Well, sort of. I moved them to the trash. Tonight I decided it was time to empty the trash (it was up to over 2GB). Lo and behold the Mac wouldn’t let me empty the trash. Why? Because some files were locked. So, I opened the trash, selected all of the items and opened the info (command-I). I then tried to unlock everything. It failed.

The next thing I tried was to go into my trash and do it from the terminal. Your trash is located in “/Users/username/.Trash/” . There, I tried to recursively set the permissions again (“chmod -R 700 *”). That failed because I lacked permissions. So, I tried using “sudo chmod -R 700 *” and was rejected again.

So, I went to Mac’s website and they recommended that I use the command “chflags -R nouchg ” and then list all of the file names I wanted to modify the permissions on. As it turns out, you can open the finder and drag files into your terminal window and it will automagically add them to the command line (very nifty). Anyway, I go rejected by that as well.

So I went back to Mac’s help page. As it turns out, you can hold down “command-option” while emptying the trash and it ended up deleting everything for me.

So why is ths so absurd to me? Because, how can the OS let me delete those files by holding down two characters while emptying the trash if I cannot modify the properties on those files using sudo? How can you have any file on your filesystem that you cannot modify with sudo? Seems like an OS bug to me.

Switching ISPs again + 1500 visitors a month!

Wednesday, April 4th, 2007

Well, it’s that time of year again. My special rate with my current ISP expired a while ago but I haven’t had the time to switch over. I now have a second high speed internet connection and I just need to switch the cables going into my router to finish off the job. I don’t anticipate switching ISPs again. My new ISP has promised me a very good price for a very high speed. It isn’t supposed to increase, even after my contract expires. They are also giving me months 4-6 for free!

This site is now also averaging 1500 visitors a month. Thank you to all you spammers out there who are artificially inflating my visitor count! I appreciate having to deal with all of the stupid comment spam you put up. You guys should really get a clue though and teach your scripts not to bother. You haven’t gotten a single comment up. Learn your lesson, get on with your life, and leave me alone. No one wants to buy your fake cialis. At least, I hope not because they’ll probably get sick and die. Not only that, but because they DO look at your ads, you are encouraged to continue sending me junk! So my hat goes off to all those people who are foolish enough to click on spam links.

USB Serial Port for Mac OS X

Tuesday, March 20th, 2007

Alright, I went out and bought a USB to RS232 (serial) cable at lunch and got it up and going in Mac OS 10.4.  The hardware’s part number is PL2303.  It cost my employer about $30 from the electronics store around the corner but you can get it cheaper than that online.  The drivers that came with it suck, don’t use them.  They don’t work so there is no point in even trying to install them.  Apple happens to have a driver though.  It will require a restart but once you come back up, your device should be installed.

Using it is simple just do an ‘ls /dev/tty.*’ and you should see the device.   Mine happens to be called:

/dev/tty.PL2303-0000103D

To use it with the hardware I have at work, I need to make sure that flow control is turned off.  To start communicating with the device I use:

screen /dev/tty.PL2303-0000103D 115200 -f off

The 115200 is the baud rate at which the device is configured to communicate at.  This varies per your device.

To detach from the screen (without terminating the connection to the device) you use ‘ctrl-a’ + ‘ctrl-d’.  To close the connection and terminate the screen, you’d use ‘ctrl-a’ + ‘ctrl-\’.

The switch from XP to Mac OS X

Monday, March 19th, 2007

So I said in a previous post that I would talk abut why I switched to Mac OS X.  To be sure, it wasn’t an easy decision.  I’ve never been a big fan of Mac and a large reason for that was the price.  I also don’t like the fact that the OS hides a lot of control from the end user.  Not to mention the fact that everyone talks about how Microsoft stole their UI From Mac but they neglect to mention that Mac stole it from Xerox first.  Add that to the fact that it is becoming trendy to own a Mac and that about sums up the majority of the complains I have against Mac.

So how did I end up with this beast? My manager got a Mac a few months ago (the same laptop that I have).  I  went into his office and told him that I wanted a laptop instead of a desktop and he told me that I should get a Mac.  I wasn’t at all convinced but in all fairness, I decided I would take some time to ponder what would be the most appropriate solution for my circumstance.  I also talked to Scott about it he’s got a Mac as well).  Obviously, I decided that the Mac was the right way to go and for a variety of reasons.

First of all, I did a price comparision with a comparably equiped Lenovo laptop and found that the Macbook Pro was actually a few hundred dollars cheaper.  Since Macs and Windows machines all run on x86 based Intel processors, I could always turn it into a windows box.  Secondly, I found a website that tells you how to chroot a Gentoo environment into your Mac OS X.  I don’t use Gentoo, but I do need to compile all of my work on Linux (and sometimes in Windows too).  This means that without rebooting my machine, I can compile projects under WIN32 and Linux and not have to run a virtual machine to do all of that.  I was also hoping for a bit more stability than I had on my desktop.  It had been running for 2 years without a reinstall of Windows (bad I know), and it was giving me a BSOD 3-4 times a week.  Best of all, the Mac is light, thin, and rather sleek looking.

It has taken a bit of getting used to but there are definitely some aspects of the Mac UI that I prefer.  I also like the look and feel over that of Windows.  I really dislike that I have been unable to alt-tab between web browser windows but perhaps I am missing something? Camino doesn’t map Command-1 or anything like that to any of the windows.  IT seems I have to just use Expose (which is awesome) to find the window I want if they are all buried.

TunnelBlick 2.0 not for Intel Based Mac OS X

Friday, March 16th, 2007

There is nothing on the website indicating that it won’t work, but the tun/tap devices included with the 2.0 package don’t work on Intel based machines. I’ve emailed them to let them know. The 3.0 beta version works just fine (other than crashing on me several times).

Mac OS X + NXClient + Konsole + Asterisk == Good Times

Wednesday, March 14th, 2007

Alright, I got a new laptop at work this week.  It’s a Macbook Pro.  Traditionally, I’ve avoided Macs but there were some compelling advantages to getting one in the current situation I am in.  I’ll talk about that in a future post.

Anyway, when I switched to Mac I also decided to switch from VNCServer on my Linux box to an NXServer.  Setting up NXServer actually proved a bit easier than when I first tried to setup VNC on that box about 2 years ago.  The config file is much easier to understand.  It’s also easier to switch desktops with NXServer.  So, there are many advantages to the switch.  NXServer is also faster than VNC, even when running over the local network.

Anyway, I discovered an interesting problem that Nomachines claimed they had fixed.  What would happen is if I went into Konsole and tried to use the asterisk, it would think that I was using the shortcut to switch between konsole windows (defaults to shift-left/right arrow).  I thought perhaps there was something wrong with my key mapping (I checked using ‘xmodmap -pk’).  Everything checked out fine there.  I tried updating X11, modifying the NXServer settings and anything else I could think of.  I couldn’t figure it out.

At that point, I decided that I would try and just avoid using the asterisk in the first place.  That didn’t last long at all.  The first time I tried to “grep -r ‘i’m a loser’ *” I realized that life as I know it would cease to exist without an asterisk.

As a desparate measure, I went into the Konsole config and just disabled those shortcuts and now I am happy as can be.  If I go into Konsole and try and customize those using ‘shift-left’ it thinks I input ‘shift-+’.  When I use ‘shift-right’ it thinks I typed in ‘shift-*’.  Using ‘shift-<’ and ‘shift->’ seem to work just fine.

Changing of the guard… err sort of

Wednesday, September 6th, 2006

Alright, my contract with a large telecom company here in the U.S. that has been providing me with DSL is about to end.  I have already gotten cable modem installed by a large cable company.  I haven’t even started using it yet because it means I’ll have to make a few minor changes in the settings for my smtp server.  But, I need to do that tonight or else I will be paying way too much for DSL and won’t even be using the cable modem.

So why exactly did I switch? One of the main reasons is because large corporations in the U.S. now reward you for customer disloyalty.  In otherwords, if I switched my cell phone service, high speed internet service, and cable/satellite service every single time my contract expires, I get a much better deal on my new service.  But if I don’t cancel, they raise my rates after my contract ends and don’t give me the same deals they offer to new customers.  Is there any difference in the quality of service? Sometimes there is, but usually the differences are not very noticable.

But I digress.  This was just supposed to indicate that I was switching ISPs.  Hopefully that won’t cause any extra outages.

Good work all you Engineers out there

Monday, August 28th, 2006

I have always been a fan of engineering.  I’m always fascinated by the way things work.  At one point in my life, I intended to study mechanical engineering.  I never ended up doing so, picking computer science instead.  Part of me wishes that I would have chosen mechanical engineering after all.  Not just because the school I went to had a crappy computer science department, but because anyone can learn to program and do so successfully.  It is far more difficult still to learn to become a mechanical engineer without formal training.

But, part of me still wants to make everyday objects better.  Make them more convenient or more efficient to use.  In fact, I went to a wedding this weekend and while at the reception had an idea that, if successful, would make such events far more comfortable for the guests.

So today, I saw a couple of stories on Digg from wired.com.  They have to do with the combustion engine and a mach capable business jet.  The business jet was especially intriguing because the sonic boom is supposed to be so quiet as to allow it to be flown over land. 

The other is a link to an internal combustion engine that uses two cylinders.  It is supposed to generate more power and less heat than a traditional combustion engine.  This means higher efficiency wih less pollution.  It would be so much fun to work on projects like this.  Keep up the good work guys.

Cracking Windows passwords

Wednesday, August 23rd, 2006

Ok, do you all remember how on Slashdot and Digg they had a link to a sourceforge project used to crack passwords? It can be found here.

My brother wouldn’t let me use his laptop over the weekend so I downloaded the ISO and made a boot CD to show how easy it would be to get his password.  So, we booted his lappy up with the CD in there and sure enough, it cracked his password in a few minutes.  So, we ran it on my other brother’s lappy from work.

His work uses domains and the cracker didn’t actually find his username, so it couldn’t crack his password.  It did find the local admin though (which is an account closely guarded by his work’s IT department).  Now my brother happened to know that password.  When it had finished running, it had only managed to determine half of the password.  I was curious about this so I did some experimenting.

I’ve determined that if I put a special character at the beginning and end of the password, that Ophcrack cannot determine a single letter of the password.  That is, if I put a [!@#$%^&*()_] as the leading and ending characters.  I believe that if your password is too long, windows stores it in two hashes.  So, if you have a long password, you need to put some of those characters in the middle.  If not, Ophcrack will be able to determine at least a few characters of your password.

What I found interesting about the domain issue is that you can log into a laptop with a domain username and password even when not connected to the domain.  In fact, when my brother first used the laptop, he was not even connected to the domain and could log in with his username and password.  This suggests that windows stores domain usernames and passwords on the local machine.

If that is the case, one just needs to figure out where to point Ophcrack and it just might be able to harvest domain usernames and passwords.  If so, then shame on Windows.  That would be a huge security flaw!

XBox 360 mods & game demos

Monday, August 21st, 2006

A friend of mine pointed out a new “mod chip” available for the 360 today.  It’s not a full mod chip because you can’t run home brew code, but it allows you to play pirated games or as they like to say “backed up games” (but not online). It’s pretty ingenious in that it switches between DVD drive firmwares on the fly and can even disable your network connection for you automatically. 

I’m not at all interested in this though because I just want home brew.  I take good care of my DVDs and don’t really need a backup.  Plus, I think most of these people acquire their backups online, and not by creating their own.  But, I do want to be able to run a customized media center, or stream videos from a non Media Center Edition PC and things like that. 

I won’t get into the running backups issue because I think people ought to be able to keep a backup of software that they pay for.  That is, of course, unless the game publisher wants to replace disks for free/low cost.  But I do think that game demos ought to be required.  It costs $6 to rent a game and give it a try. That is 1/10th of the cost to purchase the game.  So, if I really like the game I’d rather buy than rent.  But, with no game demo, how do I know if I am going to like the demo? People hype games all the time and then they suck.  No thanks.  I’m not dropping $60 on garbage.

So, if Microsoft wants to discourage the development of mod chips, they ought to let free software projects submit their code so they can get approved to run on the 360.  They should also require demo releases so that people can try before they buy and won’t care  (as much) about running “backup” disks.