Wednesday, July 02, 2008
Start Apple's X11 App on Alternate Port
Learned something today that I don't want to forget. For whatever reason, I can't get through on port 6000 over my office's new VPN. This was putting quite a crimp on my work-from-home flow, since 6000 is the default port of X11. There are a few ways around this, AFAIK:
- Tunnel X11 through ssh
- Change from the default port of 6000
So then I thought, hey, why not just run the Apple X11 client at home on an open port? 6100 is open... so just use an offset (screen number) of 100, right? Only there is no preference for the port in Apple's app (at least not in MacOS 10.4). Fortunately, you can kick off X11.app from the command line like this:
> /Applications/Utilities/X11.app/Contents/MacOS/X11
(adjusted for your path, of course)
And all you need to do is throw a display number (offset) of 100 in there:
> /Applications/Utilities/X11.app/Contents/MacOS/X11 :100
And since I like the terminal to be available, I background the whole thing:
> /Applications/Utilities/X11.app/Contents/MacOS/X11 :100 &
Tada! X11 on port 6100!
Of course, when you login to the server, you have to set the DISPLAY variable to the IP address of your home computer and the correct port - like so (assuming tcsh shell):
> setenv DISPLAY 123.45.67.89:100.0
Saturday, October 27, 2007
DSC01988.JPG
Saturday, June 03, 2006
Dvorak Keyboard
This seemed like a pretty big inconvenience to my wife, however (and to whomever wanted to log in to my PC at work). As I browsed the web, I came across the Dvorak layout. I read that it was pre-installed on all Mac, Windows, and Linux machines... This allowed me to switch between both keyboards, minimizing the inconvenience of others. All my wife has to do is click on the little DV on the menu bar and change it to the little icon of the American flag.
So my touch typing? I'm not that great, since I don't actually type all that much, but my speed with the Dvorak layout is now about 45-50 WPM. That's fast enough to make me happy - and now I can transcribe stuff. My next goal is to teach myself to touch-type on the standard QWERTY layout, but with the new kid that's not likely to happen.
Tuesday, May 30, 2006
Fixing FlashGot for Mac cURL Use
So I fixed it. The "fix" is a bit of a hack, but it works now.
Simply open up this file in your favorite text editor:
/Applications/SeaMonkey.app/Contents/MacOS/components/flashgotService.js
Note that flashgotService.js may also be in your Mozilla profile instead, but I chose to install it in my application instead.
Find the line that says:
var job="[ -x \"`which 'xterm'`\" ] && CURL_CMD='xterm -e curl' || CURL_CMD='curl'\n";
and change it to:
var job="CURL_CMD='curl'\n";
The problem is that FlashGot was trying to open cURL in an X11 window, which isn't going to work on a Mac unless you have X11 running all of the time and also have the environment set up properly.
You will not get any kind of feedback once you choose something to download. I check to see if something is still running by opening up a terminal window and typing:
ps auxww | grep -i curl
Which will dump out any curl processes currently running.
Sunday, March 12, 2006
Blogger Dashboard Widget
Monday, October 10, 2005
pandora.com
Fascinating because:
- It really does learn fast. Within 5-6 songs it starts to play stuff that doesn't offend your ears. By the time you get to number 8 it feels like it might be reading your mind, giving you stuff that you really like.
- It plays non-RIAA (independent) labels mixed in with the regular RIAA artists that you are accustomed to. This is great because you will hear stuff that you probably wouldn't hear unless you listen to college radio or actively seek out independent music on the internet.
Frustrating because:
- As with all things regarding intellectual property, there are ludicrous limits on what their licensing allows them to do. For instance, you can only rank songs as "thumbs-up", or "thumbs-down", but sometimes you have a song that doesn't really deserve the "thumbs-down" (which banishes it from your playlist forever), so you just want to skip it. You can only do this so many times per hour. Yes, really. What is worse, after you hit this limit, the "thumbs-down" button no longer skips the song! Apparently the record companies think that it is more advantageous for them if you are forced to listen to stuff you don't actually want to hear. Huh? Wouldn't they want me to move along and find a track that I love enough to run out and buy? Whatever, the music industry doesn't seem to be run by the smartest of people.
- They have a limited selection of music, it seems. I keep hearing the same songs again and again even though I haven't given them the "thumbs-up". This is distressing because I really don't dislike the songs but I'm going to have to thumbs-down them pretty soon so that they stop coming up! But won't that screw up their matching system? I guess I'll find out...
- My playlists ("radio stations") are starting to sound the same. I mean, this makes sense on one level: I'm training the thing to know what I like, so you'd expect some convergence. On another level, though, my "seeds" are very, very different. Still, I'm afraid that all I'll have on here after it's "tuned" is Smashing Pumpkins and the Pixies - albums that I already have. I went out and purchased or downloaded the other songs that I had given the ol' thumbs-up, so I don't really need them in heavy rotation either. Maybe if they had a "I've Bought It" checkbox that would put songs in a lighter rotation...
- They need a "clear rating" button. Sometimes you make a song thumbs-up and then later regret it. Right now I can't find a way to un-thumbs-up a song. Similarly, the same kind of thing could happen with thumbs-down - though it hasn't happened to me yet.
Now if there were a way to get this into your car/walkman... it would be cool to have an iPod Shuffle-like device with only 4 buttons on it: play, thumbs-up, thumbs-down, and skip.
So far, I've signed up for the 3 months for $12 deal. My wife and I are both hooked on it right now, but I could see the novelty wearing off. In fact, I think Abby might already be done with it.
update 11-Oct-2005:
Some more interesting observations:
- You can get around the whole "you have skipped too many songs" issue by simply changing to another station. The counter is reset for the station that you go to, and by the time you have exceeded the limit for this new station, you can switch back to the original station and keep skipping. Lather. Rinse. Repeat.
- Seeding an independent artist (non-RIAA) seems to provide entirely different behavior than seeding an RIAA artist. Could this be a difference in licensing? When I used the Pixies or the Raveonettes as my seed, I hardly ever heard another song by the Pixies or the Raveonettes. The same thing happened when we seeded with Shakira, Nelly, Tyrese, Elton John, and the Bee Gees for my wife - hardly any songs by the artist we seed with. Enter Mirah. I seed with Mirah (from the K Records label, which is independent) and I get a torrent of other Mirah songs. Well, maybe not a torrent, but approximately 1 out of every 6 songs. Interesting...
update 16-Oct-2005:
Saving the Streams!
Yes, I've figured out how to save the streamed music! Turns out that the music is just regular old mp3s that are loaded onto your hard drive. On my Mac using Safari, the path is in /private/tmp, which is the standard temporary directory. Safari throws each downloaded song in there with a filename beginning with "WebKitPlugInStream". Some of these files are just small files containing song info, and others are much larger and contain the mp3. All you have to do is take the big files, make a copy of them, and add ".mp3" to the end. Ta-da! Now you have an mp3 file that you can open in iTunes, or whatever.
It seems like the Pandora player always queues one song ahead, so if you want to keep the currently playing song, just use the 2nd most recent big file. The most recent file will play next.
Obviously, this arrangement will be different if you are using Firefox, but I imagine it will be pretty much the same thing - only the file names and the location will be different. I wonder how long this will last before they get wise? Someone could easily write a GUI app that would do this automatically.
Saturday, July 30, 2005
Open up that firewall
I have giFT (Poisoned is a front-end to giFT, so this will also work with Poisoned) running on my Mac, and it opens several different ports to listen. I wanted to make sure I had all of the ports opened up on the firewall, so first I fired up the terminal and typed:
netstat -an | grep LISTEN > before.txt
This dumps a list of all the ports that are currently listening (waiting for a connection) to the file called "before".
Now I start giFT:
giftd -d
Next I repeat the command that I used above, to see what new ports giFT has opened:
netstat -an | grep LISTEN > after.txt
You can either open both of these files and compare them manually, or use the diff utility:
diff before.txt after.txt
In my case (because I'm anal), I then went through and made sure that each of the ports was something that I actually wanted exposed to the internet - in this case there was one port (1213) that giFT uses for the GUI, so I chose to keep that closed. All of the others I opened up on the firewall.
This will work with any application - I'm just using giFT as an example.
