Virtualzone Heiner Peuser's Blog: Tutorials, How-Tos, Software.

8Jan/120

Increasing Google Chrome’s Scroll Speed

On my Ubuntu 11.10 system, scrolling through pages using Google Chrome was terribly slow using the mouse wheel.

Here is an easy way to fix this: Launch Chrome with the parameter --scroll-pixels=n, where n is the number of pixels to scroll. For example:
google-chrome --scroll-pixels=400

To integrate this parameter into the desktop shortcut link, open the following file as root: /usr/share/applications/google-chrome.desktop

Search for the line "Exec=/opt/google/chrome/google-chrome %U" and replace it with "Exec=/opt/google/chrome/google-chrome --scroll-pixels=400 %U". Now, you can easily start Chrome using your desktop shortcut and the mouse scroll speed should be improved.

Filed under: Linux, Web No Comments
25Feb/110

Creating & Parsing WBXML with Java using kXML 2

WBXML (WAP Binary XML) is a binary representation of XML. It is used e.g. by the Microsoft Exchange ActiveSync protocol.

Only very few WBXML parsers for Java seem to be available. One of the libraries you will probably come across when searching for a WBXML Java Library is kXML. kXML is a small XML pull parser, specially designed for constrained environments such as Applets, Personal Java or MIDP devices (see kXML's about page).

Getting started with kXML is a bit tricky, since you find only a handful of tutorials that are suitable for kXML 2. These snippets should make it easier for you. Read more...

7Feb/112

Outlook Web Access 2010: HTTP 500 Error after authentication

If you experience HTTP 500 Errors after logging in to Microsoft Outlook Web Access (OWA) powered by Microsoft's Exchange Server 2010 SP1, you should check if the service "Microsoft Exchange Forms-Based Authentication" (in German versions: "Formularbasierter Microsoft Exchange-Authentifizierungsdienst", MSExchangeFBA) is running. If it's not, start it and change the run option to "Automatic (delayed run)".

7Feb/110

Server Name Indication (SNI) with IIS 7.5

Using virtual hosts with HTTPS (so called "Server Name Indication"/SNI) is officially not supported by Microsoft's Internet Information Services IIS. However, there is a workaround which has been documented on YouTube: http://www.youtube.com/watch?v=zVCmzBfx3BE

Here are the steps:

  1. Edit the site's binding and add an HTTPS Binding. Ignore the host header now, this will be added later.
  2. Open a command prompt (cmd).
  3. Change directory to C:\Windows\system32\inetsvr
  4. Enter the following command (replace "Your Site Name" and "www.yoursite.com" with the appropriate values): appcmd set site /site.name:"Your Site Name" /bindings.[protocol='https',bindingInformation='*:443:'].bindingInformation:*:443:www.yoursite.com

Update: Unfortunately, this doesn't seem to be a solution for  SNI. IIS can only bind certificates to IP addresses, not hosts. So if you change the certificate for one site on one IP address, all sites hosted on this IP address will be updated as well. So far, the only solution to use different certificates with a single IP address is to use different TCP Ports. However, the guide above allows you to set up multiple SSL hosts sharing one certificate on one IP address/port.

Filed under: Web, Windows No Comments
6Dec/100

Error 0×80070021 when using lighttpd’s WebDAV with Windows 7

When trying to use WebDAV provided by a lighttpd installation with Windows 7, you will probably encounter the following error message when copying files to the WebDAV folder:

Error 0x80070021: The process cannot acess the file because another process has locked a portion of the file.

The reason for this error is that mod_webdav is "far away from 100%" (see http://redmine.lighttpd.net/wiki/1/Docs:ModWebDAV). I guess it's caused by the circumstance that shared locks are handles as exclusive locks (not sure about that). There is a bug open in lighttpd's issue tracker for 3 years: http://redmine.lighttpd.net/issues/1492

For now, the only opportunity I see is to switch to Apache. That's really sad, lighty is so nice except for this bug.

Filed under: Linux, Web No Comments
30Nov/100

Tomcat & Apache: High CPU Usage

Summary: Tomcat running behing an Apache Frontend Server can cause high CPU Usage on the Java Process. Here are several approaches how to fix it.

Setup: Debian GNU/Linux, Java Runtime Environment (JRE) 1.6, Apache 2.2, Tomcat 6.0.29, mod_jk/mod_proxy

Effect: Accessing web applications directly through Tomcat doesn't cause any problems. When accessing web applications through the Apache Frontend Server (forwarding requests by using mod_proxy), it took a few seconds and the cpu usage of the Java process went up to 99.9 %. Obviously, the combination of Apache and Tomcat is causing this problem.

Fix: There are several approaches that could help to fix the issue:

  1. Make sure you're using a newer version of the APR Tomcat Native Library than 1.1.4. See: https://issues.apache.org/bugzilla/show_bug.cgi?id=40909
  2. If you're using mod_proxy to forward requests from Apache to Tomcat, switch to mod_jk. It is more mature than mod_proxy, although mod_proxy is sometimes consideres to be the successor of mod_jk. For a comparison of both, see: http://community.jboss.org/blogs/mladen.turk/2007/07/16/comparing-modproxy-and-modjk
  3. What finally solved the issue for me: Set a Connection Timeout for the AJP Connector in Tomcat's server.xml (see http://tomcat.apache.org/tomcat-6.0-doc/config/ajp.html). Here is an example:
    <!-- Define an AJP 1.3 Connector on port 8009 -->
    <Connector port="8009" protocol="AJP/1.3" redirectPort="8443" enableLookups="false" keepAliveTimeout="20000" executor="default" connectionTimeout="5000"/>
Filed under: Linux, Web No Comments
11Nov/100

Enabling the integrated PDF Viewer of Google Chrome

Google Chrome comes with an integrated PDF Viewer. The viewer allows PDFs to be displayed directly in the browser, without requiring additional software such as Adobe Reader. However, in the current version (Google Chrome 7.0) the viewer is not enabled by default. To enable it, enter

about:plugins

in the address bar and click "Enable" for "Chrome PDF Viewer".

Filed under: Web No Comments