Standing Against SOPA

As an IT professional I believe that the internet should remain free from government and corporate control.

Visit https://blacklists.eff.org/ and make yourself heard.

Connect Acer Iconia A500 to VGA Projector

To connect the A500 to a projector you need two components:
First is the HP HDMI to VGA Display Adapter
(Part number #NP031AA#ABA)
There may be other VGA adapters but this one was unpowered and fairly mobile, which suits my purpose.

Second you need a Micro-HDMI Male (Type D) to HDMI Female (Type A) Port Saver Adapter

The image quality isn't that great but it works!

I take that back, my basic issue is that vs a laptop the Tablet's resolution is a little smaller, so you don't have as much area. but the projector shows pretty well what you see on the tablet. (see attached picture)

Cisco OpenConnect VPN on Acer Iconia A500

There are number of threads on the net about how getting Cisco OpenConnect to work on your android tablets, there are very few end to end guides. This attempts to be one of them!

Disclaimer With any root or filesystem level guides, this method could brick your tablet making it unusable - use with caution!

Here are the steps:

  • Install Cisco AnyConnect VPN client for Rooted Devices (Android Market)
  • Install a Terminal Client (I use - Android Market: Better Terminal Emulator Pro, but there are fee options as well)
  • Root your device (Android Market: Iconia Root)
  • Install BusyBox (Android Market: BusyBox)
  • Download the tun.ko kernel module
    • As of 8/26 the file is Here
    • You'll need a way to unzip the archive

Now, using your terminal client, remount your system filesystem as read/write.

su
mount -o remount,rw /system 

You need to copy the tun.ko file from your download location to the kernel modules directory

cp /sdcard/Download/tun.ko /system/lib/modules

Now you can load the module

insmod /system/lib/modules/tun.ko

From here on out you should be able to use the Cisco OpenConnect client Congratulations!

Now, the bad news. Any reboot will remove that kernel module from memory,
meaning you have to open the terminal and insmod again.

To make it permanent:
This has been pretty frustrating. I see two ways to make this permanent.

  • Modify your system's ramdisk file to add insmod tun.ko to your init.rc
    • Note, you can't just edit /init.rc because all changes are lost / over written at boot.
    • If you want to try this method, start Here

  • Create a program that launches at boot (similar to the Cisco VPN client) that loads the module
    • If you are development savvy and want to try this method you can start Here
I haven't tried either method yet, but i may attempt the first one when i get some time.

Probably the easier fix is to use something like gscript to create a shell script to insert the module. Then just run that shell script prior to connecting to the VPN.

pg_rowcount a script to see rows and size of tables

Here is a little perl script that I use to give me a list of tables in a schema, a rowcount and the pg_relation_size of a table.

The usage is just:

pg_rowcount <database> <schema>

The output looks like this:

./pg_rowcount.pl david.kerr pg_catalog
Table                                Rows                 Size
--------------------------------------------------------------
pg_statistic                         1853              1672 kB
pg_type                               910               168 kB
pg_attribute                         9569              1488 kB
pg_class                             1371               416 kB
pg_authid                              52                16 kB
pg_index                              766               112 kB
pg_operator                           705               104 kB
pg_database                            44                16 kB
[...]

You can download the script here

Fixing Stalled Printing in SLES with CUPS

We run Baan on SLES, all of our printing goes through CUPS.

Every once in a while printing just stalls, no reason that I can tell. (I blame the network) but what ends up happening is that the print jobs get backed up and you need to clear out the queue.

The fastest way to do this is to do:

rm /var/spool/cups/*

And then restart CUPS:

/etc/init.d/cups restart

About

Random Database, OS or otherwise interesting tips and tricks.

User


Clicky Web Analytics