Resolving Could not get lock /var/lib/dpkg/lock – open (11 Resource temporarily unavailable)

The quick and easy solution is to kill any/all processes which may have a lock, so… sudo bash killall aptitude; killall apt-get killall dpkg; killall frontend sudo dpkg –configure -a

Continue Reading...
September 21st, 2011

Setting up a Brother HL-2140 printer on Ubuntu 11.04 64bit

This took a bit of detective work and piecing of various posts together, but basically: sudo apt-get install ia32-libs sudo mkdir /usr/share/cups/model/ mkdir ~/scratch mkdir ~/scratch/brother cd ~/scratch/brother wget wget dpkg -x brhl2140lpr-2.0.2-1.i386.deb common dpkg –control brhl2140lpr-2.0.2-1.i386.deb vim DEBIAN/control #(remove the "Dependency: libc …" line) cp -a DEBIAN/ common/ dpkg -b common brhl2140lpr-2.0.2-1.i386.deb sudo dpkg –force-all -i brhl2140lpr-2.0.2-1.i386.deb rm -rf common/ DEBIAN/ dpkg -x cupswrapperHL2140-2.0.2-1.i386.deb common dpkg –control cupswrapperHL2140-2.0.2-1.i386.deb vim DEBIAN/control #(remove the "Dependency: libc …" line) cp -a DEBIAN/ common/ dpkg -b common/ cupswrapperHL2140-2.0.2-1.i386.deb sudo dpkg –force-all -i cupswrapperHL2140-2.0.2-1.i386.deb

Continue Reading...
September 5th, 2011

Using GNU screen in a start-up script

As per this serverfault answer, use the following syntax: screen -d -m -S [WhateverSessionName] [WhateverCommandsYouWant PlusAnyArgs]

Continue Reading...
August 25th, 2011

Setting password for Webmin after install on Ubuntu

1. Run this: sudo /usr/share/webmin/ /etc/webmin root [password] 2. Login to webmin at https://localhost:10000. Expand the group Webmin, then Webmin Users. 3. Create a group call “WebminRootUsers” or the like. Click through and allow that group access to as many Webmin modules as you like. 4. Create new webmin users, and add them to the newly created group. 5. Test that the new user accounts work. 6. sudo vim or sudo gedit /etc/webmin/miniserv.users, the line with root should look like “root:x:0” (which is the default).

Continue Reading...
August 11th, 2011

Steps to create a Content Provider in Android

1. Define strings for provider mime type, item mime type & for authority     <string name="[OBJECT]_CONTENT_TYPE">[initials].[object]</string>     <string name="[OBJECT]_CONTENT_TYPE_DIR">[initials].[object]</string>     <string name="[OBJECT]_CONTENT_COMMENT_DIR_URI">"content://com.[initials].[object]Provider/[object]"</string>     <string name="[OBJECT]_CONTENT_COMMENT_AUTHORITY">"com.[initials].[object]Provider"</string> 2. Create metadata class 3. Create authority and sql helper private class 4. Define authority in androidmanifest.xml <provider android:name="[Object]Provider" android:label="@string/app_name"                      android:authorities="@string/[OBJECT]_CONTENT_COMMENT_AUTHORITY"></provider> 5. profit That is all.

Continue Reading...
July 24th, 2011
Contact Nixz Kerr