16 Sep 2011

Backticking command combo - Or how to not have to type long names

So, your instructions say to edit config.xml while setting up a program in Ubuntu/Debian Linux. You realize you don’t have a clue where it’s at… sudo apt-get install locate && sudo updatedb Then once it indexes your files, type a quick locate config.xml to find it. At this point you realize it’s buried in many sub folders of subfolders, but you need to edit it with your favorite editor (vim, nano, emacs..) If it’s the only result from the locate command, type vim locate config.xml``.  This uses command interpolation to substitute the answer of the locate request :). There should be a snappy way also to chop the results (if more than one appears)…but I’m out of time!

16 Sep 2011

Tip for lost config lines by Mr. Grep

When editing multiple config files in complex installs it’s easy to lose track of where each parameter exists. Solution? Recursive grep with -n function ie grep -rn help\_me\_param . -n = line number and file name printed on left column of results -r = recursive -rn = win

07 Sep 2011

Debian install on HP TM2t error

After trying to install #! (Crunchbang) Linux on a laptop, I received an error that wouldn’t let me boot into the system. Turns out all that needs to be done is append the following command your kernel boot line: intel\_iommu=on   More details available here in the bug report (where I found the answer): https://bugs.launchpad.net/ubuntu/+source/linux/+bug/742296

06 Sep 2011

How to Fix FreeNX pub key problem on #! Linux

/etc/ssh/sshd_config Controls these actions and has a line: AuthorizedKeysFile %h/.ssh/authorized\_keys2 If not present in /var/lib/nxserver/home/.ssh/ (ie mine was authorized_keys not authorized_keys2) then link one with the right name to it ie ln -s ~.sshauthorized\_keys2 ~.sshauthorized\_key I found a reference stating that authorized_key and authorized_key2 were historically different files denoting where public keys were stored respectively for SSH Protocol 1 and SSH Protocol 2. With Protocol 1 having some vulnerabilities, this seems to be more of a legacy issue. As an aside, I tried it and then swapped it out for x2go… so far it’s been a good choice given my technical requirements and lean financial constraints. Community version of FreeNX limits to 2 TS connections at once :(. Reasonable on their side but I needed more.

05 Sep 2011

PHP5-Curl installed but not found by WP plugin Open Book

Setting up a friend’s WP blog on a VPS Debian box. Open Book Plugin wouldn’t work insisting that curl wasn’t present on the system (despite apt-get update && apt-get install php5-curl showing it’s the most recent). Loaded a php file to test if it was a recognized extension by creating a file named info.php in the web root for that site including the following code:<?php phpinfo(); ?>After pulling this document up in a browser, I deleted the file :). This pointed me in the right direction showing that the PHP.ini was deferring to /etc/php5/apache2/conf.d/curl.ini I checked there and it was extension=curl.so as expected, but obviously it wasn’t being correctly located. Did the following as root locate curl.so and found it @ /usr/lib/php5/20090626/curl.so Commented out the current curl.ini file for a byte trail of my actions and appended extension=/usr/lib/php5/20090626/curl.so Then a quick service apache2 restart and we were back in business. Thanks to this blog for pointing me in the right direction: http://www.ivankristianto.com/os/ubuntu/howto-install-curl-in-php-apache/379/

05 Sep 2011

Traditional Beginnings

(printc "Hello World") #BASH echo "Hello World" #Ruby puts "Hello World" STDOUT> Hello world!