Synergy rules. I've been talking about it for a few weeks now, expounding on it's virtues over other options like x2vnc. A friend asked that I document my setup...here ya go Eddy: :)
My current install of synergy runs on on my Mac Pro, my linux box (centos5) and my MacBook Pro laptop. The Mac Pro is the controlling keyboard and reaches across both of the other computers. The monitor layout is the Mac Pro in front (2 monitors), the Linux box directly to the left and the laptop below the linux box.
After I downloaded synergy, I placed the 2 binaries (synergys,synergyc) in /usr/local/bin on my Mac. If the dir doesen't exist, create it. I also created /usr/local/etc for the config files.
Config on the Mac Pro:
n8pro:bin nathan$ cd /usr/local/bin
n8pro:bin nathan$ ls
jhead jpegtran synergyc synergys xv
The config file on the Mac Pro:
n8pro:~ nathan$ cd /usr/local/etc/
n8pro:etc nathan$ cat synergy.conf
section: screens
n8pro.local:
n8bookpro.local:
homelinux:
end
section: links
n8pro.local:
left = homelinux
homelinux:
right = n8pro.local
down = n8bookpro.local
n8bookpro.local:
up = homelinux
end
Commands I run on the Mac Pro (server):
# synergys -f -c /usr/local/etc/synergy.conf
Commands I run on the Linux Box (client):
# synergyc -f n8pro
Commands I run on the MacBook Pro (client):
# synergyc -f n8pro
Extra credit:
I also use this at work. A Linux box is the control. Synergyc will re-try connections every 30 sec or so, which means I can launch synergyc clients and let them fail when I'm not on the network. This means I can run it once and connect/disconnect from work/home networks and have seamless mouse sharing with very little work required. To set this up on the Linux box, i had a config similar to the one above for the Mac Pro. On the laptop I have one script that I run that fires off both synergyc clients at the same time. They stay running until a reboot. After reboot, I run it again and I'm set. This is the script:
cat /usr/local/bin/setup_synergy.sh
#! /bin/bash
killall synergyc
sleep 2
synergyc -f n8pro &
synergyc -f n8linuxbox &
Do your screen sockets get nuked and you can't connect to your screen sessions? If something auto-cleans the /tmp dir, you may have seen this before. If you're like me, you end up with 10 or so shells with various programs running that you then have to follow the process tree to kill off. This is my only real (huge) frustration with screen. Well, here's ya go:
ps -x | grep SCREEN | awk '{print $1}' | xargs kill -CHLD
Enjoy!
If you watch closely, you can see some sillyness at the beginning. Hehe. Good stuff!
I guess everyone has seen this but me:
http://youtube.com/watch?v=sHzdsFiBbFc
In the 1960s, Dr. Peter Witt gave drugs to spiders and observed their effects on web building. This short film about the results of the experiment was created by First Church Of Christ, Filmmaker.
Yes yes, I know, sometimes you just get curious about your boot sector. Your Sysadmin says you'll go to hell if you play with it, and god knows what would happen if you tried to modify it. But sometimes, when you've been screwing with Lilo and Grub and you can't really remember which one is installed, it's nice to have a peek:
dd if=/dev/hda of=mbr.img bs=512 count=1 xxd -g 4 mbr.img
Where /dev/hda is the drive you want to look at.
Output should look something like this:
-snip-0000150:
31fffcf3 a51f61ff 26427cbe 7f7de840 1.....a.&B|..}.@0000160:
00eb0ebe 847de838 00eb06be 8e7de830 .....}.8.....}.00000170:
00be937d e82a00eb fe475255 42200047 ...}.*...GRUB .G0000180:
656f6d00 48617264 20446973 6b005265 eom.Hard Disk.Re0000190:
61640020 4572726f 7200bb01 00b40ecd ad. Error.......00001a0:
10ac3c00 75f4c300 00000000 00000000 ..<.u...........-snip-
Oh no, I've displayed all my most intimate parts for everybody to see. Oh well...hey, there's Grub. Cool. :)
So you want to map a public IP to a private IP behind your Linux (netfilter) based firewall. Here is the syntax:
## Standard Stuff ##
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables --table nat -A POSTROUTING -o eth0 -j SNAT --to $NAT_IP
## The 1:1 NAT stuff ##
iptables -t nat -A PREROUTING -d $EXTERNAL_IP
-j DNAT --to-destination $INTERNAL_IP
iptables -t nat -A POSTROUTING -s $INTERNAL_IP
-j SNAT --to-source $EXTERNAL_IP
iptables -t nat -A POSTROUTING -s $INTERNAL_NET -d $INTERNAL_IP
-j SNAT --to-source $NAT_IP
Where $NAT_IP is the external IP of your firewall. The last rule is required if you want hosts on your internal net to be able to talk to that external IP as well.
After a successful night of coding, I decided to start blogging my development of the MachDB.
Yay! First post! I'll describe it more later.
(also checking out the cool labels that blogger has now)
And going to bed.
Watching Jay Leno this week, I heard a band I wasn't familiar with, Fiction Plane. 3 talented guys sang a great song called "Two Sisters". One of the best rock/pop songs I've heard in a long time. And going back to look up the name, I discovered that the NBC Jay Leno web site has a free 160kbps MP3 for download....right above a link to buy it. :) Get it right here, before somebody realizes the (what has to be) mistake and takes it down.
I'm always impressed with bands that can create great music with only a few bodies. Trivia note: If you look them up, you may think the lead singer, Joe Sumner, looks familiar. His dad is Sting.
I got a new toy recently. A Canon TC-80N3...a programmable remote timer for my DSLR. I've always been a huge fan of Time Lapse video, especially the clouds moving and flowers blooming. I made one of my own, recorded at full image size and scaled down to 1080p for your viewing pleasure. File is 28MB: Mira Mesa Night Sky Timelapse 2007-05-09. Here's the embedded version:
Other than seeing the stars move at 450 times normal speed, the neatest part is the planes flying around at the bottom. They almost look like UFO's. You can see the fog roll in later in the shots as the camera gets a layer of dew on the lens. The exposure was 10sec each, taken every 30 seconds and playback is at 15fps.
I'll be making more of these and posting them to my blog as I have time. Tell me what you think.
Other timelapse posts:
Blogerize My Time Lapse
6 hours of Friday
More Timelapses
Pumpkins
Flight of the Servers/VMIX Down Page