Month: January 2015

Setting up VNC (x11vnc) on Ubuntu 14.04 trusty and connecting from Windows

I like my VNC server to run only when I have actively started using my desktop. I often get lazy and wish to continue work from my bedside laptop.

If you would like to run x11vnc as a daemon use the alternate steps below

Running vnc server after logon:

Step 1> Setup a VNC Password File

$>x11vnc -storepasswd

After entering your password twice, the .vnc/passwd file will be created

Step 2> Setup x11vnc to run when you open up a terminal

open up your bashrc ($>nano ~/.bashrc) and add the following line

x11vnc -forever -bg -display :0 -rfbauth .vnc/passwd

Step 3> Download TightVNC viewer for windows and connect!

Running vnc server as a daemon

Step1: Run the following commands

$>sudo cp /etc/init.d/skeleton /etc/init.d/x11vncserver

$>sudo chmod 775 /etc/init.d/x11vncserver

$>sudo nano /etc/init.d/x11vncserver

Step2: Replace the corresponding lines in the file by this

PATH=/sbin:/usr/sbin:/bin:/usr/bin
DESC=”X11 VNC Server Service”
NAME=x11vnc
DAEMON=/usr/bin/x11vnc
DAEMON_ARGS=”-bg -forever -display :0 -rfbauth /home/pr0t0s/.vnc/passwd”
PIDFILE=/var/run/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME

Step3: Install x11vncserver as a daemon
update-rc.d x11vncserver defaults 97 03

Step4: start the service!

sudo service x11vncserver start

Step5: Download TightVNC viewer for windows and connect!



Batch Image Editing in Linux

Must know for web developers. Many batch tools are available in imagemagick. convert and mogrify are both great! sudo apt-get imagemagick will get you going

bash$ for i in *.jpg
do
convert -scale ’48×38′ $i TN_$i
echo $i processed
done

mogrify -format jpg -quality ‘95%’ *.tiff (bulk-conversion)

For more optimized images use the following:

bash$ for i in *.jpg
do
djpeg $i | pnmscale -xysize 48 38 | cjpeg -opti -progr -qual ‘75%’ > TN_$i
echo $i processed
done

Original post here (look for Tim’s comment):http://www.cyberciti.biz/tips/howto-linux-creating-a-image-thumbnails-from-shell-prompt.html


How to setup virtual hosts on apache2 @ Ubuntu 14.04

Great article, works perfectly!
https://www.digitalocean.com/community/tutorials/how-to-install-and-secure-phpmyadmin-on-ubuntu-12-04

Next, to setup LAMP use another article from the same site
https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-php-lamp-stack-on-ubuntu

And then to set up phpMyAdmin:
https://www.digitalocean.com/community/tutorials/how-to-install-and-secure-phpmyadmin-on-ubuntu-12-04


OpenDNS and Google DNS features that your ISP may not have!

Many online service providers use your IP to pin point your location, to get away from this, there’s a DNS tunneling feature. There’s web filtering and on the flipside censorship avoidance features as well. To top it off, there is a feature to provide IP’s (based on DNS requests) of server’s nearer to you. Lastly not the least, there is security in the form of DNSSEC

Insightful Read: http://www.howtogeek.com/167239/7-reasons-to-use-a-third-party-dns-service/