Thursday, November 25, 2010

WeTab widget icons

the following forum post is full of nice icons for your WeTab apps: http://www.wetab-community.de/forum/viewtopic.php?f=100&t=827

If you want to know how to map icons to apps please have a look at my old post: http://wetabz.blogspot.com/2010/11/wetab-desktop-icons.html

Monday, November 22, 2010

A Break from the WeTab

Well, I'm on a work trip in Helsinki, so I don't have much time to mess around with my WeTab, should be back to my free self in a couple of days.

Sunday, November 14, 2010

WeTab Right-Click Mouse Button as soft-touch

Ok, so this one kept me up a good full night. After messing around with Vnc and other stuff on the WeTab it was finally evident that I needed to right-mouse-click on some things. Resorting to a real mouse is ok but not exemplary.

At first I thought I could add a key to the keyboard.xml for matchbox but it turns out you that clicking on the virtual keyboard modifies the current mouse position (Duh). My last resort was to see if I could get the softtouch button to be my right mouse button. To do this, I first needed a program that could simulate the right mouse button click. Fortunately for us, these two guys had the code for such a task posted on a forum here. Many thanks to Osor. (You can skip the compilation details and download the binary directly from here.)

Get the c code for rightclick.c as found below and put in a rightclick.c on your WeTab in a build directory.

#include <stdlib.h>
#include <stdio.h>

#include <X11/Xlib.h>
//#include <X11/extensions/XTest.h>

#define RMB 3 /* Right Mouse Button */

int main(int argc, char **argv)
{
    Display *d;

    if(!(d = XOpenDisplay(NULL))) {
        fprintf(stderr, "Cannot open display \"%s\".\n", XDisplayName(NULL));
        exit(EXIT_FAILURE);
    }

    int ignore;
    if(!(XQueryExtension(d, "XTEST", &ignore, &ignore, &ignore))) {
        fprintf(stderr, "You do not have the \"XTEST\" extension enabled on your current display.\n");
        exit(EXIT_FAILURE);
    }

    XTestFakeButtonEvent(d, RMB, True, 0);
#ifdef UP_AND_DOWN
    XTestFakeButtonEvent(d, RMB, False, 0);
#endif /* UP_AND_DOWN */

    XCloseDisplay(d);
    exit(EXIT_SUCCESS);
}

Of course as always with any code you get, it won't compile straight off. You have to comment out the include for xtest as shown above.

Also changes will need to be made to the makefile and a symbolic link added in your /usr/lib/.

For the makefile, add the -L directive to point the ld linker to the correct search path for the Xtst library.


LDFLAGS += -L/usr/lib/ -lX11 -lXtst

all: rightclick rightclick-alt

rightclick: rightclick.c
    ${CC} ${CFLAGS} ${LDFLAGS} -o $@ $<

rightclick-alt: rightclick.c
    ${CC} ${CFLAGS} ${LDFLAGS} -DUP_AND_DOWN -o $@ $<

Next create a symbolic link for libXtst like so:

$ sudo ln -s /usr/lib/libXtst.so.6 /usr/lib/libXtst.so

Finally do:
$ make

You should now have two files in your directory: rightclick and rightclick-alt. According to the author the rightclick one sends a mouse button down event only and the other one sends a down and up event.

Now we could assign our soft-touch button to the rightclick-alt binary and now have right clicks on our WeTabs. To see how to reassign the soft-touch button please visit my earlier post changing the soft-touch button assignment.

Also I've uploaded the binary I have here. I believe it should work for all WeTabers.

Now go off and right-click as you wish:)

Thursday, November 11, 2010

WeTab Dosbox cursor/touchscreen offset

After running dosbox on the WeTab and trying to get one of my all time favorite games to run: Gabriel Knight 1, I found that the touchscreen clicks were not being mapped correctly. This led me on quite a chase.

To start with, I read some of the posts at Vogon concerning touchscreens and Dosbox. It seems that people generally agree that the problem originates inside the SDL libraries.

I removed the 4tiitoo version of the sdllib and compiled it.

i then set the following environment in a terminal window:

export  SDL_MOUSE_RELATIVE=0

With this setting I get strange offsets between where I touch and where the mouse actually ends up clicking. This gap increases as I go up the screen. Have to add some debug message in the source and test.

Wednesday, November 10, 2010

More on Multitouch and WeTab

Update Feb 28 2011
-------------------
Please see the following two posts for complete instructions on installing ubuntu and enabling the multi touch driver
http://wetabz.blogspot.com/2011/02/more-about-touchsceen-and-multitouch.html

-------------------------------------------------------------------------------

The following forum posts discusses enabling touch on On Ubuntu for the WeTab: https://bugs.launchpad.net/utouch/+bug/670795


It looks like the following two packages are needed, I haven't had a chance to test this out yet. hid-egalax-dkms_1.0.3_all.deb 
hid-dkms_1.0.5_all.deb 
Some glitch with cursor lodging on rthe last touch position still remains to be solved.



The following post discusses getting around that glitch: 

https://bugs.launchpad.net/ubuntu/+source/utouch-grail/+bug/667802



Finally this is a reply from debb1046 explaining how to get Ubuntu running with multitouch on the WeTab:



since the fix has been committed the only thing you should
have to do is to add the repositories of the utouch team:

sudo add-apt-repository ppa:utouch-team/utouch 
sudo add-apt-repository ppa:utouch-team/unstable

after apt-get update and apt-get upgrade and reboot you should have
multitouch working

If I understand correctly, the new driver should make it's way into
maverick-proposed soon.
 If you currently start with usbquirk on the kernel command line you have
to remove that. Likewise, if you had copied the wetab calibration
(99-calibration.conf) you have to remove that also.

In practice, the multi-touch enabled driver doesn't make a lot of
difference because none of the applications support it. The three and
four finger gestures that were shown in a video of the unity netbook
desktop will not work because the wetab's panel only reads two fingers.

Running VNC from the WeTab


So sometimes I am far too lazy to get my behind up and walk over to another machine, enter VNC and XVNC. Well, wouldn't it be nice to just touch and feel that other machine right on your very own WeTab? why of course yes! Well, perhaps not, but anyhow for the purposes of this post we will assume that you are one of those people who agree that remote access is like cheesecake with a nice cherry on top.

Well, first off, download the rpm from RealVNC.

I got vnc-4_1_3-x86_linux.rpm.

You will also need one glibc compatibility library that for some reason don't exist inside the 4tiitoo supplied version of compat-libstdc++.

This Fedora Core13 rpm of compat-libstdc worked for me.

Now install the compat lib package:

sudo yum localinstall --nogpgcheck compat-libstdc++-296-2.96-143.i686.rpm

And then throw in VNC:

sudo rpm -i --nodeps vnc-4_1_3-x86_linux.rpm

You should now be able to launch VNC:

vncviewer

That's all folks! Happy VNCing ;)

Tuesday, November 9, 2010

Running kchmviewer on the WeTab

Well, I have to say I am not a fan of FBReader. It has lots of potential, but crashes far too often for my taste.

I've tried a bunch of chm readers along the years and have found kchmviewer to be the one that suites me best. If you have better suggestions please do tell!

Well lets get down to business.

Download the rpm from kchmviewer.net

Next go get chmlib from here.

Build chmlib and install it.

mkdir chmlib
mv chmlib-0.40.tar.gz chmlib
cd chmlib/
tar xvfz chmlib-0.40.tar.gz
cd chmlib-0.40
./configure
make
sudo make install
cd ..

Now install the kchmviewer rpm. You might have some trouble with yum not finding the lib. Just make sure the path to your so file is in your ld.so.conf.

nano /etc/ld.so.conf

sudo ldconfig

sudo rpm -i --nodeps kchmviewer-5.2-1.i586.rpm

You should now be good to go. Just enter kchmviewer and it will pop up to say hello.

Installing English Adobe Reader

After struggling a bit with the German Adobe reader, I figured I'd switch to the English version. To uninstall the one from the WeMarkt, I ran the following:

sudo yum remove AdobeReader_deu

I then went on Adobe's website and downloaded their rpm file and installed it like so:

sudo yum localinstall --nogpgcheck AdbeRdr9.4-1_i486linux_enu.download

It's a lot easier for me to get around the menus...though I hate to take the easy way out...Bah, I'll learn German some other way I'm sure.

Monday, November 8, 2010

WeTab Update November 8

So yes all that funky stuff that happened was due to the WeTab update. If you would like to have a look at what exactly got installed or updated open your yum log.

gedit /var/log/yum.log

Nov 08 00:01:29 Installed: AdobeReader_enu-9.4-1.i486
Nov 08 16:30:16 Updated: tiitoo-extlinux-config-1.0-10474.1.2.wetab.noarch
Nov 08 16:30:16 Installed: tiitoo-touchscreen-firmware-1.0-10598.1.1.wetab.i686
Nov 08 16:56:45 Updated: tiitoo-vb-android-disk.i686 0.10-10453.1.1.wetab
Nov 08 16:56:47 Installed: tiitoo-linux-firmware.noarch 20100108-5.1
Nov 08 16:56:47 Updated: tiitoo-updatesd.i686 1.1-10474.1.4.wetab
Nov 08 16:56:51 Updated: kernel-wetab.i686 2.6.35.3-10531.1.7
Nov 08 16:56:53 Updated: pega-driver-wetab.i686 0.3-10531.1.7.wetab
Nov 08 16:56:54 Updated: tiitoo-keyboard.i686 1.0-10531.1.3.wetab
Nov 08 16:56:57 Updated: tiitoo-ebook-reader.i686 0.12.10-51646.1.0.wetab
Nov 08 16:56:59 Installed: tiitoo-touchscreen-tools.i686 1.0-10474.1.0.wetab
Nov 08 16:56:59 Installed: daemon.i686 0.6.4-8986.1.0.wetab
Nov 08 16:56:59 Updated: chrontel.i686 1.0-10575.1.4.wetab
Nov 08 16:57:00 Updated: tiitoo-network-manager.i686 1.1-10474.1.8.wetab
Nov 08 16:57:02 Updated: tiitoo-pinnwand.i686 1.0-10598.1.13.wetab
Nov 08 16:57:02 Updated: tiitoo-preferences.i686 1.0-10610.1.12.wetab
Nov 08 16:57:03 Updated: tiitoo-registration.i686 1.0-10453.1.23.wetab
Nov 08 16:57:03 Updated: system-info-daemon.i686 1.0-10531.1.13.wetab
Nov 08 16:57:04 Updated: crystalhd-driver-wetab.i686 3.8.1-10531.1.7.wetab
Nov 08 16:57:05 Updated: tiitoo-client.i686 2.0.1-10531.1.30.wetab
Nov 08 16:57:05 Updated: tiitoo-client-extra.i686 2.0.1-10531.1.30.wetab
Nov 08 16:57:05 Updated: tiitoo-accelerometer.i686 1.1-10474.1.6.wetab
Nov 08 16:57:06 Updated: tiitoo-virtualbox-modules-wetab.i686 3.2.8-10531.1.7.wetab
Nov 08 16:57:07 Updated: libcrystalhd.i686 3.6.1-10531.1.7.wetab
Nov 08 16:57:07 Updated: gst-plugin-crystalhd.i686 3.5.38-10531.1.7.wetab
Nov 08 16:57:08 Erased: linux-firmware

Some of the features that have been added include:
Ambient light settings
Touchscreen Calibration and firmware update

Applications:
Pinnwand (background management)


ref:http://www.wetab-community.de/forum/viewtopic.php?f=87&t=1741&start=0

WeTab Ambient Light Sensor Brightness Scare

So last night my WeTab just decided to go all dim all of a sudden. I didn't think too much of it until today I woke up to find it not willing to change the brightness level and stuck on low.

First thing I thought was "gosh, I broke it!". I started looking through the /sys/device for brightness files and even tried to deal some of them a few echo -n 10 but nothing worked.

I also realized after a bit that the brightness was flickering depending on the ambient light of the room. That drove me nuts because it was happening also on the boot-up screen (extlinux's boot up menu).

After a bit I realized the system was trying to download an update. Once it was done it asked me to reboot and then I found two new buttons under system preferences: Touchscreen Calibration and Ambient Light Sensor...Sheesh, you'd think those guys would give you a heads-up before throwing out new updates and driving us bonkers.

Anyhow, so if you're having trouble with your screen brightness, just let the system fully update.

Another thing this did was it removed my virtual keyboard and reset my extlinux.conf file so I had to change it back.

The change to the extlinux.conf for some reason made my system hang at boot-up and I would have to click on the soft touch button on the top left corner for the menu to show up. When I selected the WeTab Os it would then continue to boot normally. That was another scary thing...strike 2! To fix this, I went into my extlinux.conf file and separated out the first few parameters that somehow got squeezed all into one line (prompt 0 timeout 5 default ves...). I put each on its own line and restarted and things worked fine. You might want to remove the hide menu or just comment it out to get a feel for what might be going on.

Needless to say I am no fan of ambient light sensors, they just drive me crazy, so thankfully there is an enable checkbox to uncheck in your preferences.

Also there is a firmware update button for the touchscreen. I'm not sure what that is all about. Also if you look at the extlinux file there is a bios update img which I would guess does all sorts of stuff to the bios of the machine. I wonder if there is a safe way to have a look at that...hmmm

Hope this helps. I'm so relieved, I thought it was all my tinkering around that had finally caught up with the device!

More details about the uptdate here: http://wetabz.blogspot.com/2010/11/wetab-update-november-8.html

Saturday, November 6, 2010

Installing Android virtual machine and other interesting stuff on Kevin's blog

So while looking for English resources on the web, I happened upon redkev's blog: http://redkev1904.blogspot.com/2010/10/android-vm-on-wetab.html

One of his posts describes how to install the Android virtual machine, again, this one is not so tough because tiitoo packages it for you.

Kevin states that you need to install some dependencies but I think yum will take care of that for you. All I had to do was run:

yum install tiitoo-vb-android

and once that was done installing, ran:

tiitoo-vb-android.sh

I gotta admit though, I am not too impressed with the VM, maybe with a RAM upgrade things would be smoother, I haven't checked really what the consumption was like. This is my first experience with Android, so I don't have much more to add...

Mess around with AppCenter, they don't seem to have too many useful items on there yet for the device. Some items are marked as 'Not available for your device'. I'm not sure how that could be device specific since we're running inside of a vm...perhaps the VM itself is still a work in progress...actually, considering the devtools icon on it, it almost surely is!

Another interesting thing that Kevin describes is installing unrar and rar on the WeTab which comes in handy if you want to install and run something like comix, The GTK comic book viewer.

Changing WeTab default desktop background


Lazy afternoon, so what else is there to do other than mess around with my lovable gizmos.

There isn't much art to this one, you just gotta be root to modify the following file:

/usr/share/pixmaps/tiitoo/pinnwand/pinnwand-bg-standard.png

Be aware that the left side panel background is part of that file, so you have to take that into account when replacing it.

sudo killall tiitoo-pinnwand

that should restart pinnwand and let you see your new background.

Cheers


Follow-up, this is now doable from the pinnwand preferences panel since the November 8 update.

Friday, November 5, 2010

WeTab Improved Virtual Keyboard (and in ENGLISH)



So this one drove me up the wall for a bit. I found a video on youtube where some really cool person had created a script to switch the keyboard layout such that you had the Escape button, the Pipe, the F1...and I-can't-remember-what-else buttons. In any case, those come in handy when there is no USB keyboard around and you want to do some scripting or want to use vi to do a quick edit.

I was following the directions from this article and didn't realize that I would need to tinker around with the settings a bit since I am running my WeTab in English mode:

http://ristig.homelinux.org/wenation/doku.php?id=betreutes_wiki:tastatur

http://www.wetab-community.de/forum/viewtopic.php?f=84&t=1314

So the main gist of this is the fact that matchbox-keyboard looks up it's mappings in /usr/share/matchbox-keyboard/ specifically in the keyboard-tiitoo.xml file.

Well first off you should download wenation2.tgz from ristig.homelinux.org.

If you are working in German, then all you have to do is untar that file inside /usr/share/matchbox-keyboard/ and you should be set.

******Please remember to back up the contents of that directory just in case things start misbehaving. Definitely keep a back up copy of all the xml files in there.


sudo cp /home/user/Downloads/wenation2.gz /usr/share/matchbox-keyboard/
cd /usr/share/matchbox-keyboard/
sudo mkdir backup
sudo cp * backup/ -r
tar xvfz wenation2.gz

For the English version, the keyboard-tiitoo.xml that comes with the package won't cut it, in fact it will make matchbox segfault...ugly! So what I did was I basically compared the original file with the one from the wenation2 package. I found that there is a < layout= "tiitoo english keyboard" > section in the original keyboard-tiitoo.xml file but none in the wenation2 one. What I did was then keep the original and cut and paste the mappings from the wenation2 file into the appropriate positions and switched around the Z and the Y mappings (fun stuff). Anyhow once that was done, I was able to get the ultra cool virtual keyboard without switching my WeTab Sprache to Deutsche (I'd love to be able to understand Deutsche well enough to work like that but as of yet I am still far too new to the language to do so).

I will attach my version of keyboard-tiitoo.xml just in case someone needs it. Once you have all the files in place you can run

sudo killall matchbox-keyboard

and then press on the keyboard button to get your nifty new keyboard to pop up on the screen.
Adios

Ok so attaching the file here looked ugly. I've uploaded my keyboard-tiitoo.xml here:
http://www.easy-share.com/1912873593/keyboard-tiitoo.xml

If it gets removed or you can't get to it, drop me a line and I'll make sure you get it.
Wunderschoen!

Change soft touch button (screen capture/take snapshot) to launch anything else

So I've come upon this wonderful German community that shares all their WeTab escapades with the world: http://www.wetab-community.de/forum

Though my German is rather weak, along with Chormium's translation and the bits and pieces of the language that I know I will try to translate most of the cool features I find there.

In this post we'll look at how to change the small soft touch button at the top left corner of the WeTab. All credit should go to the following forum post: http://www.wetab-community.de/forum/viewtopic.php?f=84&t=1008

First off make sure you set a root password (sudo passwd), and don't ever forget it (never write down passwords on paper, keep it all in your head and keep your head safe from all damages at all times).

Now switch to root

# sudo su ( enter your users password , not root's password )

# tiitoo-set-softtouch.sh 0

Now hit ALT-F2 and enter xfce4-keyboard-settings, hit run

Switch to the Application Shortcuts tab.

Click Add.

Enter the name of the program you want to launch (I put xfce4-taskmanager). Press OK.

The window will reappear and stare dumbly back at you, don't worry, that's normal, it's just waiting for you to enter the key-combination that will cause the launch to occur. You should thus press the soft touch button ( upper left corner of your WeTab screen ).

You should find a new entry with the program you entered in the Command column and XF86AudioMedia in the Shortcut column.

Hope that was useful.
Cheers!

Wednesday, November 3, 2010

WeTab Desktop Icons




Ok so looking closely at the matchbox video I was able to make out something that looked like: exo-desktop-item-edit

If you google that, you will find that it's an icon creator tool, some ubuntu pages provided the insight.

This page describes the details of that tool.

http://manpages.ubuntu.com/manpages/lucid/man1/exo-desktop-item-edit.1.html


However to get things really working I actually had to do some of the work manually.

First create a shortcut so that a child node is properly created internally and assigned in the pprop file:

exo-desktop-item-edit -c ~/.appdata/tiitoo-pinnwand/tiitoo-localbookmarks/

Fill the dialog up with any details.

In my case I created an icon for DosBox.

Next find a nice PNG file for your icon.

cd ~/.appdata/tiitoo-pinnwand/tiitoo-localbookmarks

There you will find png, pprop and desktop files. Copy your png here.

Now what I did was just copy the .desktop file from adobereader.desktop and modified that. For my dosbox icon I then had the following:

[Desktop%20Entry]
Type=Application
Icon=Widget-dosbox.png
Exec=dosbox

now from a terminal do sudo killall tiitoo-pinnwand and your desktop should have the new icon on it.

Have fun making icons for your other apps.

Add RAM to your WeTab!

Now this I really gotta do:



http://www.youtube.com/watch?v=Z0gL1c39uHs

I can't believe this guy had the heart to open up his WeTab like that but now I'm getting turned on to the idea!

Wetab Desktop and Window Settings

So after also screwing up my environment, I found that I had more than one workspace and that some of my windows were just not where I thought I had left them. Only after happening by chance upon CTRL-ALT-ARROW-LEFT did I realize that I was dealing with a case of numerous workspaces. In any case, I found that xfce-settings-manager is a nice applet to load from the console and use to set thing straight.
Hope this is helpful.
Cheers

Troubles!

I was looking at some of the cool things that people have done with the Wetab so far on YouTube, and one of the videos was this one about replacing the ugly virtual keyboard with the matchbox one:



http://www.youtube.com/watch?v=m1AmBJ0p9js&feature=related

Not being one to wait much I went right ahead and did a yum remove of the original wetab keyboard and then a yum install of the matchbox version. Thus began my utterly useless quest to restore what once had been.

First off on rebooting I was met with an ugly cursor, the likes of which I had scarcely seen. Next, my right pinnwand panel was gone and so was everything I could launch from it.

No sweat I thought, I'll just boot into recovery mode and recover pinnwand....no cigar, it just scared me even more! Well, a word to the wise, the network manager can be launched from the terminal using the tiitoo-network-manager command.

Once that's done you can go back and undo what you did or brought you to a certain state.

One last thing that really ticked me off was the cursor. Thanks to a thread between two fellas online and a bit of poking around the system, I found that if I created a symbolic link under ~/.icons/default/cursors and point it to /usr/share/icons/xcursor-transparent/cursors/, everything goes back to normal on reboot...Whew!

Other cool things you can do include installing Gimp and pretending to be some artist that smudges paint on the touchscreen...fun stuff.

Installing Dosbox on the Wetab

So since getting any other OS on this machine has proven to be hell, I've gone ahead and started messing around with the machine. One of my original reasons for wanting a touchscreen was for games to be more interactive. Well, the yum repositories from 4tiitoo have most of what you need to run dosbox but you will need to build SDL_sound and dosbox manually.

Followed instructions on http://www.dosbox.com/wiki/BuildingDOSBox to install dosbox on the WeTab:

sudo yum install gcc-c++
sudo yum install SDL-devel
sudo yum install SDL_net

Download SDL_sound and untar it from: http://icculus.org/SDL_sound/downloads/

tar -xvf SDL_sound-1.0.3.tar.gz
cd SDL_sound-1.0.3

configure --with-sdl-prefix=/usr/lib --with-sdl-exec-prefix=/usr
make
sudo make install

Download dosbox source from http://www.dosbox.com/download.php?main=1

tar xvf dosbox-0.74.tar.gz
cd dosbox-0.74
export CPPFLAGS="-I/usr/local/include/SDL"
export LDFLAGS="-L/usr/local/lib"
./configure --with-sdl-prefix=/usr/lib --with-sdl-exec-prefix=/usr --with-alsa-prefix=/usr/lib --with-alsa-inc-prefix=/usr/include/alsa

sudo echo "/usr/local/lib" >> /etc/ld.so.conf
sudo ldconfig


Hope you enjoy.