Author Archive


Remote Desktop (VNC) Access on Xubuntu (XFCE) 8.10

Gnome on Ubuntu comes with an included “Remote Desktop” feature (vino) that allows you to VNC into your existing desktop session (usually on the :0 display). However, XFCE does not have a native VNC package built in. The best option I have found is to use vino, the same VNC app that Gnome uses. Here’s how:

Install vino:
$ sudo apt-get install vino

Configure vino:
$ vino-preferences

Then enter this command in your Autostarted Apps to start vino server:
/usr/lib/vino/vino-server

This works well for me, the only feature I have found that doesn’t work is the “disable wallpaper on remote login” setting.

Posted in Ubuntu   |   Comments (9 )

Change screen resolution from the command line with xrandr

The command xrandr can be used to change the screen resolution from the command line. Execute the xrandr command to see available screen resolutions. The output will look like this:

Screen 0: minimum 320 x 240, current 1440 x 900, maximum 1440 x 900
default connected 1440x900+0+0 0mm x 0mm
   1440x900       50.0*
   1360x768       51.0     52.0
   1152x864       53.0
   1024x768       54.0
   960x600        55.0
   960x540        56.0
   840x525        57.0     58.0
   800x600        59.0     60.0
   800x512        61.0
   720x450        62.0
   700x525        63.0
   680x384        64.0     65.0
   640x512        66.0
   640x480        67.0     68.0
   576x432        69.0
   512x384        70.0
   400x300        71.0
   320x240        72.0

To change the resolution:
xrandr -s 1024x768

Posted in Ubuntu   |   Comments (6 )

Pretty Anti-Aliased Fonts

sudo dpkg-reconfigure fontconfig-config

Select “Autohinter”, “Always” and “No” when prompted.
sudo dpkg-reconfigure fontconfig

Add the following to ~/.Xdefaults (create the file if it doesn’t exist):

Xft.antialias: true
Xft.hinting:   true
Xft.hintstyle: hintfull
Xft.rgba:      rgb
Xft.dpi: 96

Add this command to your startup commands:
xrdb -merge ~/.Xdefaults

Restart X.

Posted in Ubuntu   |   Comments (1)

Enable SHMConfig for Synaptics Touchpad on Ubuntu Intrepid Ibex 8.10

****EDIT****
These instructions are no longer needed for me. I don’t need to install Gsynaptics to disable my touchpad. I can now simply click System > Preferences > Mouse, click the “Touchpad” tab and uncheck “Enable Touchpad. The touchpad stays disabled, even through reboots. I’m leaving the original post here in case this doesn’t work on your system.

**** Original Post ****
In order to disable your Synaptics touchpad on previous releases of Ubuntu, you would set “SHMConfig” to “true” in xorg.conf and then install the program gsynaptics to disable/enable the touchpad.

The xorg.conf file is different in Intrepid Ibex, there is no section for the touchpad anymore. Now to enable SHMConfig you have to do it via HAL:

Edit this file:
/usr/share/hal/fdi/policy/20thirdparty/11-x11-synaptics.fdi

Find the section that starts with:
<match key="info.product" contains="Synaptics TouchPad">

And add this line to that section before :
<merge key="input.x11_options.SHMConfig" type="string">On</merge>

The file should end up looking something like this:

<?xml version="1.0" encoding="ISO-8859-1"?>
<deviceinfo version="0.2">
  <device>
    <match key="info.capabilities" contains="input.touchpad">
      <match key="info.product" contains="Synaptics TouchPad">
        <merge key="input.x11_driver" type="string">synaptics</merge>
	<!-- Arbitrary options can be passed to the driver using
	     the input.x11_options property since xorg-server-1.5. -->
	<!-- EXAMPLE:
	<merge key="input.x11_options.LeftEdge" type="string">120</merge>
	-->
	<merge key="input.x11_options.SHMConfig" type="string">On</merge>
      </match>
      <match key="info.product" contains="AlpsPS/2 ALPS">
        <merge key="input.x11_driver" type="string">synaptics</merge>
      </match>
      <match key="info.product" contains="appletouch">
        <merge key="input.x11_driver" type="string">synaptics</merge>
      </match>
      <match key="info.product" contains="bcm5974">
        <merge key="input.x11_driver" type="string">synaptics</merge>
        <merge key="input.x11_options.LeftEdge" type="string">0</merge>
        <merge key="input.x11_options.RightEdge" type="string">1280</merge>
        <merge key="input.x11_options.TopEdge" type="string">0</merge>
        <merge key="input.x11_options.BottomEdge" type="string">800</merge>
        <merge key="input.x11_options.ClickFinger1" type="string">1</merge>
        <merge key="input.x11_options.ClickFinger2" type="string">3</merge>
        <merge key="input.x11_options.ClickFinger3" type="string">2</merge>
        <merge key="input.x11_options.HorizEdgeScroll" type="string">0</merge>
        <merge key="input.x11_options.VertEdgeScroll" type="string">0</merge>
        <merge key="input.x11_options.VertTwoFingerScroll" type="string">1</merge>
        <merge key="input.x11_options.HorizTwoFingerScroll" type="string">1</merge>
        <merge key="input.x11_options.HorizScrollDelta" type="string">0</merge>
        <merge key="input.x11_options.VertScrollDelta" type="string">40</merge>
        <merge key="input.x11_options.PressureMotionMinZ" type="string">10</merge>
        <merge key="input.x11_options.FingerLow" type="string">16</merge>
        <merge key="input.x11_options.FingerHigh" type="string">80</merge>
        <merge key="input.x11_options.FingerPress" type="string">256</merge>
        <merge key="input.x11_options.PalmDetect" type="string">0</merge>
        <merge key="input.x11_options.PalmMinWidth" type="string">10</merge>
        <merge key="input.x11_options.PalmMinZ" type="string">200</merge>
        <merge key="input.x11_options.MinSpeed" type="string">0.8</merge>
        <merge key="input.x11_options.MaxSpeed" type="string">1.2</merge>
        <merge key="input.x11_options.AccelFactor" type="string">0.10</merge>
        <merge key="input.x11_options.MaxTapMove" type="string">25</merge>
        <merge key="input.x11_options.MaxTapTime" type="string">223</merge>
        <merge key="input.x11_options.MaxDoubleTapTime" type="string">200</merge>
        <merge key="input.x11_options.TapButton1" type="string">0</merge>
        <merge key="input.x11_options.TapButton2" type="string">0</merge>
        <merge key="input.x11_options.TapButton3" type="string">0</merge>
        <merge key="input.x11_options.RTCornerButton" type="string">0</merge>
        <merge key="input.x11_options.RBCornerButton" type="string">0</merge>
        <merge key="input.x11_options.LTCornerButton" type="string">0</merge>
        <merge key="input.x11_options.LBCornerButton" type="string">0</merge>
      </match>
    </match>
  </device>
</deviceinfo>

Reboot, and you should now be able to disable the touchpad with gsynaptics.
Note, System > Preferences > Mouse also has a section for touchpad, so disable it there as well.

Posted in Code, Family, Ubuntu   |   Comments (7 )

What repository did I install that package from?

To see what repository a package was installed via in Ubuntu using apt, use this command:
$ apt-cache policy packagename

Example:

$ apt-cache policy firefox
firefox:
  Installed: 3.0.3+build1+nobinonly-0ubuntu0.8.04.1
  Candidate: 3.0.3+build1+nobinonly-0ubuntu0.8.04.1
  Version table:
 *** 3.0.3+build1+nobinonly-0ubuntu0.8.04.1 0
        500 http://security.ubuntu.com hardy-security/main Packages
        100 /var/lib/dpkg/status
     3.0.2+build6+nobinonly-0ubuntu0.8.04.1 0
        500 http://archive.ubuntu.com hardy-updates/main Packages
     3.0~b5+nobinonly-0ubuntu3 0
        500 http://archive.ubuntu.com hardy/main Packages
Posted in Ubuntu   |   Comments (0)

Configure Firefox to use Gmail or Google Apps for MailTo Links

These instructions will configure Firefox to use Gmail or your Google Apps hosting account to handle mailto links:

First, type about:config in the address bar, search for gecko.handlerService.allowRegisterFromDifferentHost, and set the value to true.

Then, log into GMail or your Google Apps mail URL, paste this line of JavaScript into your address bar, and hit enter:
For Gmail:
javascript:window.navigator.registerProtocolHandler("mailto","https://mail.google.com/mail/?extsrc=mailto&url=%s","GMail")

For Google Apps:
javascript:window.navigator.registerProtocolHandler("mailto","https://mail.google.com/a/example.com/mail/?extsrc=mailto&url=%s","GMail")
Replace “example.com” with your domain.

After you hit enter, Firefox should ask permission to add Gmail as the default mailto handler.

To undo this, click Edit Preferences > Applications. Search for mailto. Choose Application Details from dropdown under Actions. Highlight Gmail and click Remove.

I used these instructions on Firefox 3.0.1 on Ubuntu 8.10. This post was compiled from info found in this article and its comments at lifehacker.com.

Posted in Firefox   |   Comments (15 )

WordPress plugin to display Twitter status via Ping.fm

I have just finished writing my first WordPress plugin – a widget to display a status update via Ping.fm:

Ping.fm is a simple service that makes updating your social networks a snap. You can use AIM, GTalk, iGoogle, Windows Live Messenger, Yahoo! Messenger, WAP, iPhone/iPod Touch, SMS or E-mail to let Ping.fm relay your message to a multitude of social networking sites. This plugin lets you use Ping.fm to add your status to your WordPress Blog’s sidebar via Ping.fm’s “Custom URL” integration.

== Installation ==

* Extract archive
* Upload entire ‘pingfm_status’ directory to ‘wordpress/wp-content/plugins’
— do not remove files from directory, upload the directory with all files in it
* At http://ping.fm create a Custom URL to update the following address:

http://url_to_your_wordpress_installation/wp-content/plugins/pingfm_status/pingfm_post.php

* Enable the plugin in your WordPress admin section
* Add pingfm widget to your sidebar, set the Title

== Notes ==

If you notice that the timezone is incorrect on the timestamps that appear in your updates,
you can change it in ‘/wp-content/plugins/pingfm_status/pingfm_post.php’. I have included
some notes in that file.

Here is a link to the plugin in the WordPress Plugin Directory.

Posted in Code   |   Comments (15 )

Collin, 6 years old, popping wheelies on his bicycle

Here is video of my 6 year old son Collin popping wheelies on his bicycle. I edited the video in Kino and Avidemux.
You need to a flashplayer enabled browser to view this YouTube video

Posted in Family   |   Comments (0)

My crazy dog

Video of Murphy, my 9 month old Boxer, chasing a flashlight:

You need to a flashplayer enabled browser to view this YouTube video

Posted in Family   |   Comments (0)

Create a "whitelist" content filtering proxy for Firefox

When my kids use the internet, I set up Firefox so that they can only access a list of approved sites. Here’s how I do it (thanks to DrBacchus and skippy for the assist):

Install squid (Squid is a caching proxy for the Web):
$ sudo apt-get install squid

Modify squid.conf:
$ sudo vi /etc/squid/squid.conf

Set “visible_hostname” to the hostname of the machine:
visible_hostname yourmachinename
Replace “yourmachinename” with the name of your machine

Set “http_access” to allow access only to the domains specified in your whitelist (I store my whitelist at /opt/squid/allowed_domains):

acl allowed_dstdomains dstdomain "/opt/squid/allowed_domains"
http_access allow allowed_dstdomains

Set up your whitelist file, here is an example:

$ sudo vi /opt/squid/allowed_domains
.tamatown.com
.tamagotchi.com
.webkinz.com

Restart squid for the changes to take affect:
$ sudo /etc/init.d/squid restart

Then, set your child’s Firefox settings to use your squid instance as their proxy server. In Firefox, Edit > Preferences > Advanced > Network > Connection Settings > Manual Proxy Configuration:

Hostname: yourmachinehostname (or localhost)
Port: 3128 (this is the default port for squid)
Use this proxy server for all protocols.

Drawbacks: You must manually add any address you want your child to be allowed to access into your allowed_domains file (hence “whitelist” instead of “blacklist”). Also, if your child is savvy enough to know how to disable the Firefox proxy settings, then they can bypass this.

I created a shell script to automatically append a domain to my “allowed_domains” file and then restart the squid service:

#!/bin/sh
if [ "$#" != "1" ] ; then
echo "usage is $0 [domain] "
exit
fi
echo $1 | sudo tee -a /opt/squid/allowed_domains
sudo /etc/init.d/squid restart

Replace “/opt/squid/allowed_domains” with the location and name of your allowed domains list

Example usage would be:
./squid_add .wikipedia.org

Posted in Ubuntu   |   Comments (1)