Archive for the ‘Ubuntu’ Category

Monoprice 10x 6.25 Graphic Tablet on Ubuntu

June 1, 2015 Leave a comment

I recently purchased a 10×6.25 Monoprice Graphic tablet from Monoprice. (wasn’t at a spot to shell out the amount that Wacom was asking for it’s tablet). The tablet has lived upto my expectations so far but did not work as expected when I tried using it on Ubuntu 14.04.

Checking the output from lsusb shows that the graphic tablet is a rebranded UC Logic tablet. The following output shows on running lsusb on the terminal

Bus 005 Device 002: ID 5543:0781 UC-Logic Technology Corp.

Searching on Google showed me that UC Logic graphic tablets can be configured for Ubuntu by using the Wizardpen driver. The DIGImend drivers do not support it but they have a good article on how to configure these rebranded tablets. The steps below are just a summary of what I did based on the article found here (

  • Download the Wizardpen driver using the following command
  • Untar the driver that we downloaded above
tar xvzf xserver-xorg-input-wizardpen_0.8.1-0ubuntu3.tar.gz
  • Install the required dependencies from Wizardpen
sudo apt-get install build-essential xutils-dev xutils libx11-dev libxext-dev xautomation xinput xserver-xorg-dev autoconf libtool pkg-config
  • Go to the extracted Wizardpen dir above and run the following commands
$ ./ --prefix=/usr
$ make
$ sudo make install
  • Go to the dir in usr/share/X11 and create the file 52-tablet.conf and add the following
Section "InputClass"
 Identifier "Tablet on WizardPen"
 #MatchIsTablet "on"
 MatchProduct "keyword"
 MatchDevicePath "/dev/input/event*"
 Driver "wizardpen"
 # Apply custom Options below.
  • The keyword above needs to be replaced by the product id for your graphic tablet. In my case I ran the xinput list with the tablet plugged in and got the following in the output
↳ UC-LOGIC TWHA60 id=11 [slave pointer (2)]
⎜ ↳ UC-LOGIC TWHA60 id=12 [slave pointer (2)]
⎜ ↳ UC-LOGIC TWHA60 id=13 [slave pointer (2)]
  • Based on the output above, I changed the keyword in the conf and the conf now looked like this..
Section "InputClass"
 Identifier "Tablet on WizardPen"
 #MatchIsTablet "on"
 MatchProduct "UC-LOGIC TWHA60"
 MatchDevicePath "/dev/input/event*"
 Driver "wizardpen"
 # Apply custom Options below.
  • After going through the above steps, my graphics tablet was detected but the stylus did not position itself correctly. I decided to try calibrating the tablet as suggested in the DIGImend pages. This requires to run a calibrate command for wizardpen from the “calibrate” dir in the downloaded wizardpen files. Before doing that we need to identify the tablet-event to be supplied to the command. In order to get it, run the following command in the terminal
ls /dev/input/by-id/
  • The output produced by the command above in my case was the following..
  • Now run the following command to calibrate (needs to be run in the calibrate folder in wizardpen)
sudo ./wizardpen-calibrate /dev/input/by-id/usb-UC-LOGIC_TWHA60-if01-event-mouse

The command then prompts you to click on one of the corners on the graphic tablet using the stylus. Once clicked, it asks to click on the opposite end of the tablet. The full output after the clicks looks like follows.

Please, press the stilus at ANY
corner of your desired working area: ok, got 9,6

Please, press the stilus at OPPOSITE
corner of your desired working area: ok, got 2047,2047

According to your input you may put the following
lines into your XF86Config/X.Org configuration file:

 Driver "wizardpen"
 Option "Device" "/dev/input/by-id/usb-UC-LOGIC_TWHA60-event-mouse"
 Option "TopX" "9"
 Option "TopY" "6"
 Option "BottomX" "2047"
 Option "BottomY" "2047"
  • Apply this to the conf file created earlier. My conf file looked like this after the changes.
Section "InputClass"
 Identifier "Tablet on WizardPen"
 MatchIsTablet "on"
 MatchProduct "UC-LOGIC TWHA60"
 MatchDevicePath "/dev/input/event*"
 Driver "wizardpen"
 # Apply custom Options below.
 Option "Device" "/dev/input/by-id/usb-UC-LOGIC_TWHA60-event-mouse"
 Option "TopX" "7"
 Option "TopY" "18"
 Option "BottomX" "2047"
 Option "BottomY" "2047"
  • Restarting the system should get the configuration in effect and the tablet should start working fine.

LightScribe on Ubuntu

June 20, 2010 Leave a comment

I was not aware that there was such a good support for Lightscribe on Ubuntu. I have had Lite-on Lightscribe installed on my desktop for a year but never used it. (did not have enough curiosity until today). Initially I was reading an article on how drivers could be found easily on LaCie but then I found this write up on Ubuntu itself.
Get the 3 deb packages…
1. LightScribe System Software
2. LightScribe Simple Labeler.
3. LaCie 4L Labeler utility

Install the deb packages and use the following commands..
To run SimpleLabeler


To run the LaCie 4L application

sudo 4L-gui


Sun JDK6 on Lucid

June 20, 2010 1 comment

In one of my earlier posts I had shown how to install Sun Java6 on Ubuntu(Karmic). When I upgraded to Lucid recently, that version of JDK was removed and Open JDK was the only one that was present. I had to google a bit to realize that sun-java6 was no longer present in the repositories. The release notes on Ubuntu’s wiki state the same. However, following the instructions on the release notes did not help me. Two reasons… First, the link is incorrect and secondly, the sources.list needs to have two entries one for deb and another for deb-src. The command on the wiki just adds the line with deb on the sources.list.
I found this blog that has a better explanation of the steps to be followed to fix the problem.

Edit /etc/apt/sources.list
Uncomment the following two lines.
deb lucid partner
deb-src lucid partner

Run the following commands

sudo aptitude update
sudo apt-get install sun-java6-bin sun-java6-jre sun-java6-jdk
sudo update-java-alternatives -s java-6-sun

Creating a portable subversion repository

March 15, 2010 Leave a comment

I generally move between different systems when developing code. An easy way to keep things in sync and transfer my code was to use a flash drive as a subversion repository and use the flash drive between the systems.
Creating a repository was dead simple. Run this command in the flash drive dir in which you want the repository..
svnadmin –pre-1.5-compatible create repo-name
Replace the repo-name with an appropriate name.
To checkout the code use the following (in Ubuntu)
svn co file:///media/usb/code/repo-name
Note: The flash drive may be mounted at a different location than the one mentioned above(/media/usb)

Categories: Subversion, Ubuntu Tags: ,

Maven and Struts 1

February 10, 2010 7 comments

Maven archetype can be used to generate blank projects. However, the mvn archetype:generate command does not give an option to generate an empty struts project with Struts 1. To generate a Struts 1.x project we need to install the struts blank archetype. Use the following commands to download and install struts blank archetype in the local repository.

svn co
cd struts-archetype-blank
mvn install

Now to generate a project use the following command

mvn archetype:generate -DarchetypeGroupId=org.apache.struts -DarchetypeArtifactId=struts-archetype-blank -DarchetypeVersion=1.3.5-SNAPSHOT -DgroupId=com.wordpress.codesilo -DpackageName=com.wordpress.codesilo -DartifactId=test-struts

Now we will test this on JBoss AS. Set a variable JBOSS_HOME in bash_profile and change the plugins section generated in the pom.xml file above to the following.


Now we will use the maven JBoss plugin to deploy the war generated above. Use the following command to deploy the war file.

mvn jboss:hard-deploy

(To undeploy use the command mvn jboss:hard-undeploy)

The war will be deployed to the following dir ($JBOSS_HOME/server/web/deploy) (in JBoss 5). If Jboss 4 is used, change the serverName above to “default”.

On starting Jboss we will see an exception ….
java.lang.ClassCastException: org.apache.xerces.jaxp.SAXParserFactoryImpl cannot be cast to javax.xml.parsers.SAXParserFactory
This can be corrected by removing the jar that is included by the struts-archetype-blank plugin.
Change the following in the pom.xml




The server will now start without any exceptions.

Setting up Ubuntu for development

February 2, 2010 1 comment

I had to reinstall Ubuntu recently and this blog is a summary of setting Ubuntu up for development.

Installing Maven:

sudo apt-get install maven2

In the .bash_profile file in the $HOME directory set the MAVEN_REPO variable and export it. Add this line in the file : export MAVEN_REPO=$HOME/.m2/repository

Installing Sun JDK:

sudo apt-get install sun-java6-bin sun-java6-jre sun-java6-jdk
sudo update-java-alternatives -l
sudo update-java-alternatives -s java-6-sun

In the .bash_profile file again, add these lines —
export JAVA_HOME=/usr/lib/jvm/java-6-sun
export PATH=$PATH:$JAVA_HOME/bin

Update: For installing JDK on Lucid Lynx read this post.

Installing MySql Server:

sudo apt-get install mysql-server

Set the root password when prompted.

Installing Samba:

sudo apt-get install samba smbfs

Installing openssh:

sudo apt-get install openssh-server openssh-client

Installing Ruby and RoR:
This link is a very good summary of doing that in Karmic Koala.

Installing Subversion:

sudo apt-get install subversion

Installing Client for Subversion:
RapidSVN is a very good tool for Ubuntu but recently I tried  RabbitVCS. This is in active development and is very close to TortoiseSVN in Windows.
To install RabbitVCS you need to download the deb package from their website and and install it using the following command (rabbitvcs_0.12.1-2~karmic_all.deb is the downloaded file)

sudo dpkg -i rabbitvcs_0.12.1-2~karmic_all.deb

Installing Eclipse, SpringIDE and Maven Plugin for Eclipse:
Eclipse can be easily installed by using package manager but I ran into some problems with the maven plugin when I used the eclipse that came with Karmic. When I used the Eclipse from their download site ,I did not have the problems.
Get SpringIDE plugin by providing this site in the “install new software” option in Eclipse: The ADJT features were giving problems when installing this plugin so I deselected them.
Get maven plugin from here :

Getting started with Maven on Ubuntu

February 1, 2010 Leave a comment

Maven is a project management tool. Installing it in Ubuntu is very straightforward. Run the following command in the terminal to install Maven.

sudo apt-get install maven2

To create a simple project using maven use this command

mvn archetype:generate

and when prompted enter option “15”. This creates a quickstart project. Read more about this command here.
Set a MAVEN_REPO environment variable by adding this line in the .profile file in the home folder
export MAVEN_REPO=/home/<user>/.m2/repository ; Replace the user with the user-name on Ubuntu.
This variable will be used by Eclipse.
In the project created earlier, run this command

mvn clean install

This will clean, build and install your project. Note: this command has to be run in the dir of the project that contains the pom.xml file. The jar file created from the build can be found in the target directory.
Here is the directory structure after the build:(The following values were used to create the project by using the archetype plugin — groupId: test;artifactId: test;version: 1.0-SNAPSHOT;package: com.codesilo.test)

|– pom.xml
|– src
|   |– main
|   |   `– java
|   |       `– com
|   |           `– codesilo
|   |               `– test
|   |                   `–
|   `– test
|       `– java
|           `– com
|               `– codesilo
|                   `– test
|                       `–
`– target
|– classes
|   `– com
|       `– codesilo
|           `– test
|               `– App.class
|– maven-archiver
|   `–
|– surefire-reports
|   |– TEST-com.codesilo.test.AppTest.xml
|   `– com.codesilo.test.AppTest.txt
|– test-1.0-SNAPSHOT.jar
`– test-classes
`– com
`– codesilo
`– test
`– AppTest.class

Read more about build lifecycle here.

Technorati Tags: , , , , , , , ,

Categories: Maven, Ubuntu