Monthly Archives: May 2008

True Color Remote Desktop Connection

If you use Windows’ Remote Desktop Connection a lot, you will find that the UI is a little ugly. In fact by default, the Remote Desktop Connection is in 16 bit color mode. In order to have a better experience, it would better setup a true color remote desktop connection. Here are instructions for you.

For Windows Vista users, you already have the latest remote desktop clients, so you can make sure that your connection’s “Options” is using “High Quality (32 bit)” color in “Display” tab, and using “LAN (10Mbps or higher)” in “Experience” tab.

If you are using Windows Vista Professional or Windows Vista Premium, you may following similar instructions of “Enhance Terminal Services’ Color Depth by MMC” to make your connection become true color (24 bit) connection. If you are using Windows Vista Home Edition, you can use registry editor to add a key as following:

[HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\Terminal Services]
“ColorDepth”=dword:00000004

Or you can download the registry file VistaTerminal24bitColor.reg and merge it into your system.

If you are using Windows XP or 2003, you need to upgrade your Terminal Services Client to 6.0. And then following the above MMC enhancement instructions or add a new key in registry:

[HKEY_CURRENT_USER\Software\Policies\Microsoft\WindowsNT\Terminal Services]
“ColorDepth”=dword:00000004

Or you can download the registry file XPTerminal24bitColor.reg and merge it into your system.

References:
http://www.j79zlr.com/gphome.php

Posted in Uncategorized | Tagged | Comments Off on True Color Remote Desktop Connection

Implementing Web AIM Client

Here are some notes when I was struggling to develop a web AIM client:

1. Download AIM SDK, both Windows and Linux
In Linux environment, you may already have NSS/NSPR libraries installed, if not following instructions to install it. You only need to run:

cd dist/release/
ln -s /usr/lib/libnspr4.so .
ln -s /usr/lib/libnss3.so .
ln -s /usr/lib/libnssckbi.so .
ln -s /usr/lib/libplc4.so .
ln -s /usr/lib/libplds4.so .
ln -s /usr/lib/libsmime3.so .
ln -s /usr/lib/libsoftokn3.so .
ln -s /usr/lib/libssl3.so .
ln -s /usr/lib/libfreebl3.so .
export LD_LIBRARY_PATH=/usr/local/tomcat/lib/

2. Get a developer key to use AIM SDK. The developer web site does not accept external email account, so create a new one. In fact, more new AIM screen names are needed, as testing AIM requires it.

3. Try to compile and run samples/accjsample:

cd samples/accjsample
javac -cp ../../dist/release/accjwrap.jar AccJSample.java Prefs.java
java -cp ../../dist/release/accjwrap.jar:./ AccJSample username password developerkey

But you may get error messasge like:

UNKNOWNVALUE
com.aol.acc.AccException: IAccSession_SignOn
at com.aol.acc.AccSession.SignOn(Native Method)
at com.aol.acc.AccSession.signOn(AccSession.java:113)
at AccJSample.(AccJSample.java:47)
at AccJSample.main(AccJSample.java:22)

But if you go into dist/release/ directory, where *.so are located, and run:

/usr/local/java/bin/java -cp ../../dist/release/accjwrap.jar:../../samples/accjsample/ AccJSample username password developerkey

You may get things running correctly:

[5/5/08 8:34 AM]: OnStateChange: Connecting, ACC_S_OK
[5/5/08 8:34 AM]: OnStateChange: Validating, ACC_S_OK
[5/5/08 8:34 AM]: OnStateChange: Transferring, ACC_S_OK
[5/5/08 8:34 AM]: OnStateChange: Negotiating, ACC_S_OK
[5/5/08 8:34 AM]: OnStateChange: Starting, ACC_S_OK
[5/5/08 8:34 AM]: OnStateChange: Online, ACC_S_OK
[5/5/08 8:34 AM]: OnUserChange: ACC_S_OK

That is because *.so may not be loaded correctly if they are not in the current working directory.

Someone says that inaccurate time may cause problems, so run:

/etc/init.d/ntpd start

to synchronize your server’s time.

4. following, it comes to the time that developing AIM desktop client, and then converting it into Java Servlet based AIM client. So, tutorial “Creating AIM-Enabled Application in Java” series are recommended.

5. And time to deploy your web AIM client to tomcat servlet container.

If your Tomcat 6 server is on Windows, you may need to copy all dist/release/*.dll into your %CATALINA_HOME%/bin/ folder, copy dist/release/accjwrap.jar into %CATALINA_HOME%/lib and restart Tomcat services to get things done. Deploy accjwrap.jar directly into webapps folder is not recommended, because you may want to restart your servlet application frequently while loading and unloading *.dll modules may cause “already loaded in another classloader UnsatisfiedLinkError” problems for Tomcat, which may result that you need to restart your Tomcat server.

If your Tomcat 6 server is on Linux, you also need to copy all dist/release/*.so into your $CATALINA_HOME/bin/ folder, copy dist/release/accjwrap.jar into $CATALINA_HOME/lib. And you need to modify your catalina.sh and add two lines:

LD_LIBRARY_PATH=$CATALINA_HOME/bin
cd $CATALINA_HOME/bin

And then restart Tomcat server.

Related links:

Posted in Java, Tomcat | Tagged | 10 Comments