The vast majority of my writting is done using gedit and latex. I have often thought it would be great to have a gedit plugin that would allow for a one button solution to converting the latex document into a pdf file and opening it in evince. I do not have enough time at this moment to develop such a solution, though I did find a good way of scratching my itch. I chose to write a nautilus script in bash that would accomplish the same task. First create the script in your nautilus script directory.
gedit ~/.gnome2/nautilus-scripts/latex\ to\ pdf
Next paste in the following script.
#!/bin/bash
# Runs the file through pdflatex and opens it in evince if the pdf file exists
if echo $1 | grep -i “.tex”; then
pdflatex $1
PF=${1/tex/pdf}
if [ -f $PF ]; then
evince $PF
else
zenity –info –title=”latex to pdf” –text=”Failed to create the PDF file.”
fi
else
zenity –warning –title=”latex to pdf” –text=”File must be a latex file with the extension .tex”
fi
Then make the script executable.
chmod +x ~/.gnome2/nautilus-scripts/latex\ to\ pdf
Now you are able to right click on a latex file and select the “latex to pdf” script to convert it to a pdf file and open it up in evince.
September 15th, 2006
For the past couple of years I have been running Smoothwall on an old pc I rescued from the dumpster. This has been a great method of securing my home network however living in a third floor apartment in the southern part of the United States heat can be an issue, especially in the summer time, and running an extra pc doesn’t help. Therefore I began toying with the idea of using an embedded pc as a firewall. I decided to go with the WRAP.1C-2 board from PC Engines due to the great price/performance ratio compared to other options. In total the board, case, and adapter came to $164 before shipping from Netgate.


For software I decided to run m0n0wall. I would have prefered a linux based solution over a FreeBSD based product but it appeared to be the best solution for my situation. The setup was a breeze and it turns out my 64MB flash card was overkill as the entire image is under 8MB. After working with m0n0wall’s web gui to setup the system I couldn’t stop thinking this is a fantastic product! m0n0wall’s features are enough for almost any home or office network and the configuration is a breeze. Most interesting is that the entire boot-time configuration is written in PHP. Smoothwall and my dumpster pc served me well for a long time but m0n0wall and my WRAP box provide a more feature rich firewall in a much sleeker and cooler running package.
July 10th, 2006
Waiting for me today when I got home was a nice surprise, the new Dapper CDs from Canonical. It appears as if the ShipIt service has gotten better along with the distribution. This is the first time I got the correct order fully intact, it was also the quickest I have recieved an order yet. They were also kind enough to throw in some sweet Ubuntu stickers!
July 5th, 2006
With X Display Manager Control Protocol (XDMCP) and Ubuntu one is able to set up a thin client with very little effort. This is a great way to make use of an older computer that doesn’t quite have the processing power needed to run a smooth system by itself. In my case the computer my wife generally uses was not performing as well as she would like and I did not feel like shelling out the extra money for a new computer that would only be used for ocasional web browsing, word processing, and gimp usage. XDMCP provided an easy and cheap solution.
For this example I will assume that Ubuntu is installed on both computers and that the server may be denoted by the hostname xdmcpserever.
To start off first enable XDMCP on the host computer by editing the gdm.conf-custom file
sudo vim /etc/gdm/gdm.conf-custom
Make sure that it contains the following section.
[xdmcp]
Enable=true
If you want the remote login screen to be the same as the graphical greeter that is the default in the Ubuntu install make sure that the following is present.
[daemon]
RemoteGreeter=/usr/lib/gdm/gdmgreeter
Now one is able to log in via the default gdm greeter on the client systems if so desired, but in my case I wanted the client to automatically boot to the login screen for the server. The process is actually quite simply. First a script to launch the daemon for the new XDMCP login must be created.
sudo vim /etc/init.d/xdmcp
In this file place the following script [download here].
#! /bin/sh
# Launchs XDMCP
set -e
PATH=/sbin:/bin:/usr/sbin:/usr/bin
PIDFILE=/var/run/xdmcp.pid
XDMCPSERVER=xdmcpserver
. /lib/lsb/init-functions
case “$1″ in
start)
if pidof usplash > /dev/null; then
/etc/init.d/usplash start
fi
log_begin_msg “Starting XDMCP…”
start-stop-daemon –start –quiet –pidfile $PIDFILE –name xdmcp –exec /usr/bin/X — -query $XDMCPSERVER > /dev/null || log_end_msg 1
log_end_msg 0
;;
stop)
log_begin_msg “Stopping XDMCP…”
start-stop-daemon –stop –quiet –pidfile $PIDFILE –name xdmcp /usr/bin/X — query $XDMCPSERVER –retry 30
log_end_msg 0
;;
restart)
$0 stop || true
$0 start
;;
*)
log_success_msg “Usage: /etc/init.d/xdmcp {start|stop|restart}”
exit 1
;;
esac
exit 0
The next step is to set the executable bit on this script with
sudo chmod +x /etc/init.d/xdmcp
The way I chose to have the system run the script on startup is by simply replacing the gdm startup script in the default runlevel with our new xdmcp startup script.
sudo rm /etc/rc2.d/S13gdm
sudo ln -s /etc/init.d/xdmcp /etc/rc.2/S99xdmcp
Now when we restart the client we will be presented with a login screen being served from our xdmcp server.
July 3rd, 2006