Donnerstag, 15. März 2012

Setting up your own remote server (VNC & DYNDNS)

I've really wanted to setup a remotely accessible server at my home for ages. I've got bored enough last weekend to finally do it! I used my asus Eee701 for this. Its working perfectly.. I tried to sum it up in 5 steps. Hre it goes:










1-Static IP assignment
Your server needs to have the same local IP every time so the router can access it. In my case, I assigned the server to the IP 192.168.1.120. Gateway address is my Routers IP: 192.168.1.1 and I used Google's DNS servers: 8.8.8.8 and 8.8.4.4

2-Install RealVNC
Install RealVNC to be able to access your server using VNC remotely. I recommend installing the service mode so that the program starts with windows automatically. RealVNC will use the standard VNC port for incoming connections. I wasn't comfortable, so I changed it to a random number of my own (lets call it 2012 for this tutorial).

3-Open and forward a router port
Go to your routers configuration page (usually something like 192.168.1.0 or 0.1 or 1.1 or 0.0), forward the port number 2012 to your servers IP address 192.168.1.120 so the router will forward requests at this port to your server. Its like saying "if anyone knocks on door nr. 2012, send the visitor to me" :)

4-Dynamic DNS hostname
Register a hostname at no-ip.com. For this example, lets call it homeserver.no-ip.org and install the noIP update client on your server. Make sure the program is always running in background (I'm skipping the basic configuration details of the program at this point).

5-Firewall rule
Your firewall, in my case it was the default windows firewall, is probably blocking our port 2012 which needs to be open for incoming traffic. Go to the program settings of the firewall and set up an exception for port 2012 for both incoming and outgoing traffic (possibly only incoming is necessary, I didn't try it yet :) ).

Now we can test it! Open a VNC client on another computer (RealVNC viewer for instance) and type in: homeserver.no-ip.org:2012. If you set up a password at the RealVNC configuration it should ask for it now. RealVNC appearantly also supports a Java viewer so you'd be able to connect to your server using a webbrowser. If you've installed the free version of RealVNC, the port should be the port you've set up -100 (so in our case its 1912). Type in homeserver.no-ip.org:1912 (Java needs to be installed on the server for this).

Not working?:

-If you see the login page of your router, the port forwarding or the static IP assignment wasnt done correctly. Check which IP address your server has and which one has been entered at the port forwarding on your router.

-Maybe you didn't set up your firewall correctly? Turn your firewall off temporarily to find it out.

Donnerstag, 8. März 2012

If condition with dependance on previous command ( $? )

Say youre writing a bash script and have an if condition in it that depends on whether or not the previous condition was "successful".

Example:

sleep 10; if (( $? )); then echo "sleep interrupted!";fi

now if you cancel the sleep command with ctrl+c the string "string interrupted!" will show.. Of course this example is not supposed to be exciting at all, but think of the possibilities! You dont necessarily have to work with true or false variables, you can just act depending on the previous command's state.

Freitag, 2. März 2012

LG Flatron W2442PE driver

LG Flatron W2442PE driver
Here's the link for the driver:

http://i.minus.com/1334308662/KSAPufzULnjNIcLsAd6FlQ/dbbeciXFclZvzq.zip

http://www.uploadstation.com/file/RHGC25b/w2442pe.zip

Edit: One link dies, two more pop up ;) 12.04.12

Edit2: These links died also.. I'll try to post new ones asap.