Archive

Author Archive

OpenLaszlo and symlinks

Written on January 20th 2010, 15:01 by sYnie

I develop OpenLaszlo apps on different OL versions. But as I usually need the code to be the same, I use symlinks (symbolic links / soft links) to my apps within the tomcat server of OpenLaszlo. This leads to problems with non-lzx-files. Tomcat just doesn’t recognize other files.
There are some Sites out there, that point out a solution to this. But every time I install a new version of OpenLaszlo, I search for a minimum of 30 minutes until I found it. I think I’ve already bookmarked it, but it’s lost in thousands of OL bookmarks.
However, I thought to blog this solution. So I won’t need to search anymore in the future ;-)

So if you’re facing problems with symlinks using OpenLaszlo, just edit this file:
/path/to/openlaszlo/Server/tomcat-5.0.24/conf/LPS/localhost/lps.xml

<?xml version='1.0' encoding='utf-8'?>
<Context docBase="../../lps-x.x.x" path="/lps-x.x.x">
...
</Context>

And apply the following changes:

<?xml version='1.0' encoding='utf-8'?>
<Context docBase="../../lps-x.x.x" path="/lps-x.x.x" allowLinking="true">
...
</Context>

That’s it.
Thanks again to the OL Forums (source)

MSN, ICQ, Jabber and multiple clients

Written on December 9th 2009, 22:12 by sYnie

Since yesterday, I’ve been trying to use MSN, ICQ, Yahoo, and so on with multiple clients at the same time. The idea is to stay logged in with a computer and a mobile phone at the same time. At first I thought about some kind of “bouncer” – but there aren’t any for messengers. After reading different articles, I finally tried two solutions: Jabber and Nimbuzz (based on the XMPP protocol).

You can use Nimbuzz for a lot of different protocols except for Jabber (even though it’s based on XMPP – funny). As I use Jabber, Nimbuzz was finally not useful for me. I could have used the Nimbuzz protocol with a Jabber client, but it didn’t support some of the protocol’s advantages. I couldn’t see avatars, had to rename every contact, etc. So I could have either used the native Nimbuzz client (which didn’t support Jabber) or a Jabber client which didn’t provide all features. So I deleted my Nimbuzz account …
Skype support was a plus though, but I can’t live without Jabber. Besides, skype was also just available with the native client.

However, I tried to use a Jabber server istead. There are a lot of so called “transporters”, which provide functionality for other IM protocols. So a Jabber server is able to communicate with MSN, ICQ and Yahoo contacts. I didn’t want to rely on a public Jabber server with this transporters, so I installed my own one. I do have a small dedicated server, which wasn’t really used, so I installed a Jabber server on it. I used:

  • ejabberd
  • PyICQ-t
  • PyMSN-t

It was a bit tricky to make the server work with those transporters, but in the end it worked. If you need my config files, just ask. Well, now I was able to register a Jabber account on my own server and add all my ICQ and MSN contacts to it.
I’m a Adium user – so I had no chance to configure this at all. First I’ve downloaded PSI for registering the transporters for my Jabber account. But I noticed, that all the names got lost. They were displayed as “UIN@my.jabber.server.com”. I do have about 250 contacts – and I really didn’t want to rename every single one of them. So I searched for a solution and found out, that PSI can’t do this automatically. But some windows clients can, yay. So I downloaded “Gajim”, and did the same again: I’ve registered for the transporters in my Jabber account and it finally worked. It imported all of my contacts even with the correct names and aliases.
Reconnecting with Adium and everything was fine. All my Jabber, MSN and ICQ contacts within one protocol – great! I’ve instantly booted up another computer and logged in with another Jabber resource (I’ll talk about that later) and it really worked. I was using ICQ and MSN at the same time with exactly the same account.

But there’s one problem. Jabber has some resource/priority concept for being logged in with multiple clients:
Your jabber account usually looks like this:
yourname@jabber.server.com
Now if you use it at different computers, you have to specify different resources for each client:
yourname@jabber.server.com/home
and
yourname@jabber.server.com/office
Jabber now knows how to identify each client and can handle them. If someone sends a message to “yourname@jabber.server.com” both clients will (usuallt ^^) receive this messages. If you send a message at the office to XY, the reply will go to “yourname@jabber.server.com/office”. So if someone just sends you a message randomly, it’ll go to both clients. If it’s a reply to you, only one client will receive it. That’s how it’s supposed to be. At least that’s what the clients do.
Also there’s a “priority” of each client. It’s a number between -128 and 127 and will specify which client is used. Let’s say you’re at home and don’t use your mobile phone. Then you’ll set the priority of your mobile phone to 0 and the priority of your home client to e.g. 10.
If someone writes now, only your client at home will receive this message. This makes sense … in theory.
I found out, that a lot of clients can’t handle priority very well (especially the mobile phone ones). Nimbuzz e.g. always used a priority of 100. You couldn’t change it.

Anyway. I used “Slick” on my Nokia E71 as an IM client. It worked very well so far, but when I set it up for my own Jabber server, it messed everything up. Sometimes it received messages, sometimes it didn’t. Sometimes it sent messages, sometimes it didn’t. When I tried to send something from /mobile to /home, it was sent back to /mobile. And so on …
Slick is great, but I think it wasn’t designed for Jabber, transporters and multiple clients. Then I tried every single multimessenger I could find for Symbian. Each of them didn’t really work. Either they didn’t support XMPP or they didn’t allow me to change the server. And if it worked, the usability was awful. I wish I could use Slick. I’ve already sent a bug report, se we have to wait.
However, I use “Talkonaut” now. The usability isn’t as nice as Slick, but it works. After downloading, it was completely overloaded with content, but you can configure the UI the way you want it to be. I just want a contact list and chat-tabs. After some time, I even got “Talkonaut” configured to look like that. I’ve also deleted all the SIP services and conference rooms. It looks much better now, but still not as good as Slick ;-)

Okay, so now I use Adium on 2 Macs and Talkonaut on my E71 – Simultaneously. And it works :-)
After experimenting with priority I figured out, it was the best to set it to maximum for all of the clients. So every client has the priority of 127. Now I’ll receive every single incoming message at every client at the same time.
It took a lot of hours to make it work – but now it’s very sweet :-)
If someone is interested in more details, I’m going to publish my config files and exact setup.

Google Wave invitation – for free!

Written on November 15th 2009, 20:11 by sYnie

Google WaveHey there,

I’ve just received an invitation from Google to test Wave – their new beta product.
I bet everyone of you has already heard of it.

It’s really exciting – And I still got some invitations left.
So I thought to invite one of our readers.
We’ll randomly chose one of the ping-/trackbacks to this post until November 22th (05:00 pm UTC) – next Sunday.

So, everyone who is interested in a free invitation to Google Wave, just write about this article. On Sunday, we’ll chose one of you and immediately invite you to Google Wave.

Good Luck ;-)

[EDIT]
Gratulations, Ted. You’ve just got an invitation. Unfortunately we haven’t received as much comments as expected – but it wasn’t very hard to dertemine a winner like that. Just closed my eyes and pointed at the screen blindly. Oh, and don’t worry, everything was fair: I was dizzy while pointing at the screen, cause a co-worker just rotated me on my chair before I did it ;-)

How to survive work

Written on October 8th 2009, 14:10 by sYnie

This is very very off-topic. But I was wondering … how do you survive work?

redbull

That’s our way to get through the day ;-)

Irssi Plugin: auto reply

Written on September 15th 2009, 16:09 by sYnie

Some days ago I wrote a small irssi plugin, which automatically replies to specific words or phrases. It’s really basic, but I thought to post it anyway, as I couldn’t find any.

It’s based on the 8-ball plugin – so thanks to Patrik Jansson.

That’s the code:

use strict;

use vars qw($VERSION %IRSSI);
use Irssi qw(command_bind signal_add);

$VERSION = '1.00';
%IRSSI = (
    authors     => 'synie',
    name        => 'auto reply',
    description => 'auto reply',
    license     => 'GPL',
);

sub own_question {
    my ($server, $msg, $target) = @_;
    question($server, $msg, "", $target);
}

sub public_question {
    my ($server, $msg, $nick, $address, $target) = @_;
    question($server, $msg, $nick, $target);
}

sub question($server, $msg, $nick, $target) {
    my ($server, $msg, $nick, $target) = @_;
    $_ = $msg;
    my $answer = "";

    // Edit this:
    if (/^how are you?/i) {
        $answer = "I'm fine, thanks.";
    } elsif (/ping/i) {
        $answer = "pong";
    } elsif (/^I hate you/i) {
        if ($nick ne "fishbot" and $nick ne "snailbot")
        {
            $server->command('kick '.$target.' '.$nick.' bye!');
            return 0;
        }
    }

    if ($answer)
    {
        $server->command('msg '.$target.' '.($nick ? $nick.': ' : '').$answer);
    }
    return 0;
}

signal_add("message public", "public_question");
signal_add("message own_public", "own_question");

Just c&p it into a file (e.g. called autoreply) located at ~/.irssi/scripts or ~/.irssi/scripts/autorun and load it via `/script load autoreply`. Make sure you edited the phrases you want to answer to automatically first – but I think this script is self-explanatory.

Dropbox and Mac OS X: Access your files from everywhere

Written on July 14th 2009, 19:07 by sYnie

Today, Neakro showed me a tool called “Dropbox”. It’s like a virtual hard drive, you can use to store files on a server, online. Some folders are private, some folders are public. So you can access your data from everywhere. This idea isn’t new, is it? But Dropbox has some very nice features.

menuThe basic account – which is completely free – provides 2 GB storage, which is, in my mind, a lot of space to share and store files at. There’s an OS X client, which will be integrated into the functions of Finder. The Linux client needs Nautilus, which will surely piss off some KDE users ;-) .

After installing the OS X client, you’ll have a new menu icon on the top right of your screen. You can access all the basic functions and preferences there, as well as opening the web frontend in your browser. But the real magic happens in Finder itself.

There will be a new folder within your home directory called “Dropbox” (you can rename this one). It’s an ordinary folder, except, that it’ll be mirrored on the servers of Dropbox. So if you install Dropbox on other machines, you’ll always have the same files. It’s also possible to share specific folders in order to work with other people collaboratively.

You can easily work with the Dropbox folder, as with any other folder:
place_files

And a pretty nice feature is, to generate URL’s to the files you want to share. In the picture above, I have placed a file called “test.rtf” in my public folder. Rightclicking this file will give me the following option:
publish_files

I can easily generate an URL and publish the link to friends, co-workers etc in order to download this file. In my case it is: http://files.getdropbox.com/u/1537208/test.rtf. I’ll try to keep this file online.

Another very nice feature is the web frontend. You can access all your files from any computer, where Dropbox isn’t installed. You can create new public folders, share folders, download everything, browse through fotos and so on. IMHO the best feature is the history option. You can see everything that happened (creating folders, deleting files, editing files, etc), compare the differences and even undo changes or restore deleted files and folders:
webinterface

When I heard about Dropbox my first thought was like “Why not using SMB / NFS with Apache, etc”. But after testing it, I saw some really unique and perfectly integrated features. It’s not only for sharing some files on multiple computers. It has its own TimeMachine, it’s perfect for collaborative work, I can generate URLs to local files with one click and so on. Besides all that, it doesn’t just upload your local files. It uploads only changes, which saves a lot of traffic, when you edit large files.

I’ll keep using it the next few weeks and hope, I won’t find some disadvantages.
Neakro said, he’s going to try to simulate a similar service using rsync, apache and git. I’m really curious about whether he’ll be successful.

Everyone who’s interested in this service – you can give it a try at:
http://www.getdropbox.com
If you want to do me a favour, use this URL to register. It’ll give me and you some extra MB space ;-)
https://www.getdropbox.com/referrals/NTE1MzcyMDg5

OpenLaszlo 4.4 Released

Written on July 3rd 2009, 18:07 by sYnie

I think I’m a little bit late with blogging about it, but I thought to share the latest news from Laszlo Systems with you. They just released OpenLaszlo 4.4 with a lot of improvements. This is a short quote:

We are pleased to announce that OpenLaszlo 4.4 is available now. You can download it from the OpenLaszlo Download page. It is the recommended platform for all application development for the SWF8, SWF9, and DHTML runtimes. OpenLaszlo 4.4 is another major release, with almost 180 bugs fixed since OpenLaszlo 4.3. The majority of bug fixes in this release are specific to the DHTML runtime; however, general improvements to all runtimes have also been added and we strongly recommend that you take advantage of them by upgrading.

(http://weblog.openlaszlo.org/archives/2009/06/openlaszlo-44-released/)

I’m really looking forward to trying it. To be honest I still use OL 4.1.1 cause I’ve had no time yet to migrate to 4.2.0. However, I should do it before I have to migrate my applications to another higher version.

Devl.net launched

Written on June 26th 2009, 21:06 by sYnie

Hey hey,

I just wanted to announce, that devl.net is finally opened.
The guys running this Blog are some IT guys, who thought to stick together their  thoughts in order to run a blog about programming and misc computer stuff. It’s just a compilation of random code snippets, publications, aspects and misc texts about computer and IT in general.

We – Neakro and sYnie – have already been blogging before. As long as the original Blogs aren’t shut down, you can find all the stuff at:

Have fun browsing through our articles. If you liked anything, we’d appreciate any comments ;-)

Visualslider in productive usage

Written on June 18th 2009, 17:06 by sYnie

While watching for some referer statistics on synie.net, I stumbled across a thread in the OL forums. Here it is:
http://forum.openlaszlo.org/showthread.php?t=13698

LaSlow writes about using my visualslider for a product show case. Just visit this site to see it in action:
http://www.smartcard24.com/
It’s hot, isn’t it? ;-)
I had to reload the website multiple times in order to see it, instead of an advertisement. But it looks great. It’s nice to see what people do with my code snippets. Just recently I got an e-mail from LaSlow with the extended code. It was you, wasn’t it? I’ll try to prepare it for upload during the next 2 weeks.

So, in any case – if you did some improvements to some of my code snippets, feel free to send them to me. I’ll publish them here.

Thanks to LaSlow for sharing the link.

EeePC & OS X: W-Lan (Hackintosh)

Written on April 27th 2009, 09:04 by sYnie

I installed OS X on my little EeePC 900a. After using some different Images and also trying to Install my original copy of Leopard, I ended up with iATKOS 5i. Most of the Hardware worked out of the box. Even hotplug, what didn’t work before.
There are some things that didn’t work:

  • Display resolution
  • Ethernet
  • WiFi
  • Sound

I got it managed to make them work, by now. Well, almost ;-)
As soon as I’m finished with this OS X on EeePC, I’ll post all the things I had to do to get them running. But before this, I want to share my experience with the built in Atheros WiFi card.
Vendor ID: [168c:001c]
Subsystem: [1a3b:1026]

Different OS’ display this device with different names. But as far as I know, it’s an AR5007EG. There are various tutorials out there to get this card working. Well, at least in some way.
Have a look at this discussion:
http://www.insanelymac.com/forum/index.php?showtopic=138351
18 Pages – all about this card and different types of it. There are some ways, that really work. But you’ll need Kismac to make this device see wireless networks after every reboot. It works like this:

  • Before you shutdown your EeePC, you must turn the Airport off.
  • After booting, turn it on.
  • Run Kismac and scan for wirelless networks with Airport Extreme Passive Drivers.
  • Now your Airport will notice all the new networks.

And if you get Kernel Panics:

  • Remove Extensions.mkext* before every shutdown.

And believe me – it’s not nice to do this every boot/shutdown. I wrote scripts, that do exactly this. I still need Kismac for making the Airport notice the networks, but I’m on it. Kismac replaces the Airport drivers during scan to use it in monitor mode. I’m still finding out how everything works, and so on. But have a look into the Resources directory within Kismac. It provides all the kext files. Also there is a driver called “viha” which uses the WLanDriver.kext. Viha is an Airport driver and W-Lan utility, which also provides a shell based network stumbler. I think this is the way to go … But I’m still experimenting.

If you’re annoyed by turning on/off the Airport, removing the Extensions.kext and firing up Kismac, then use these scripts. They work for me:

1. Preparing
Open System Preferences and go to Network. Write down your Location at the top. Mine is called AON, but usually yours is named “Automatic”. Create a new one and call it “AOFF”. Within “AOFF” you’ll have to remove Airport from the list on the right side. Add another (unused) service, if you can’t remove Airport. Switch back to “Automatic”, apply and close it.
AOFF will be used to switch off the Airport. You can’t do this via shell, but you can switch those network profiles via shell. If you switch to a profile, that has no Airport service, it’ll be turned off. You can try this by switching between these networks, applying them, and looking for what happens with your Airport symbol on the top of your screen.

2. Login-/LogoutHooks:
Create two files, somewhere (Mine are located in /Library) which will be used for Airport and Extensions. I’ve called them wlankickstart and wlankickstop ;-)

wlankickstart looks like this:

#!/bin/bash
scselect Automatic

Replace “Automatic” with your default network Location, or leave it, if you’re not sure.

wlankickstop looks like this:

#!/bin/bash
scselect AOFF
rm /System/Library/Extensions.mkext*

If you don’t have random kernel panics during boot time, then remove the last line, because it causes an annoying system message during shutdown.

Make those files executable (chmod a+x filename) and store them somewhere.
Now we’re gonna make them executed while login/logout:
sudo defaults write com.apple.loginwindow LoginHook “/path/to/wlankickstart”
sudo defaults write com.apple.loginwindow LogoutHook “/path/to/wlankickstop”

Now Extensions.mkext will be beleted and Airport will be turned on/off during boot/shutdown.

3. Kismac
If you don’t have it, download and install it. Open Script Editor from /Applications/AppleScript and write a new script:

tell application “KisMAC”
activate
startScan
delay 5
stopScan
quit
end tell

Try it. It’ll run Kismac, scan for 5 secs and turn it off. Make sure, Kismac uses the Airport Extreme Passive Driver. Compile this script and save it as an Applications (without “Startup Screen”). Now Open up System Preferences, go to Accounts, select your user, go to Login Items and add the previous compiled application.

You’re done. Reboot and enjoy. Now you’ll only have to select your W-Lan Network after a reboot instead of doing this process by your own.
It works? Give me a comment ;-)