Tuesday, December 29, 2009

Oracle SQLDeveloper on Windows x64

There is a new version of Oracle SQLDeveloper available. The release notes are here. This time there is even a build for 64bit Windows platforms available. All that needs to be done after unpacking is to point it to the JDK x64 java.exe. It doesn't work with a 32bit JDK!

There were quite some workarounds floating around to make it work. Having to install a 32bit JDK on a 64bit OS for a 32bit Java application always seemed weird to me. So I'm glad Oracle finally got around the bend and provide a fully functional SQL Developer for Windows x64.

Of course the language / regional fix still applies to this version, as they didn't bother to include a GUI option to specify them. In case you are wondering why your SQL Developer shows up in some weird language other than English, add these lines to your sqldeveloper/bin/sqldeveloper.conf:
AddVMOption -Duser.language=en
AddVMOption -Duser.country=US

Sunday, December 27, 2009

improving the LG BD390?

I recently got a LG BD390, which is of course a bluray player that features UPnP/DLNA support, as you all already know.

Someone has gotten the alleged firmware from LG, but turns out just to be the cross-compile toolchain and ucLinux. Well, anyway we know know that the BD370 and BD390 are based on that.

I don't think that there isn't a way to get console access to this device. A detailed network scan revealed this:
111/tcp open rpcbind
9736/tcp open unknown
44394/tcp open unknown

Port 44394 TCP returns a "500 internal server error", but probably just due to an incorrect URL. At least this means a webserver is running, so there is hope. ;-)

Tuesday, March 31, 2009

SS4200 woes

Well, ever since I had the SS4200 it just froze from time to time. I never had a chance to find out the details, because it mostly froze during the day when I was at work, or at night when I was out drin^H^H^H^H studying.

I always thought it was related to my custom kernel. Now it finally froze in my presence, so I could check it out. I opened the case and found the fans spinning rather slowly, and the CPU and northbridge were very hot. I figured the poor thing overheated.
So in fact I was right, because I enabled thermal management and CPU throtteling in my kernel, and loaded all those modules of course.
Add the fact that the Celeron 420 actually doesn't support SpeedStep, and you've got a few kernel moduels going crazy.
I'll remove the thermal and cpu throtteling modules for the time being and see whether that improves stability.

In the long run I want a NAS that doesn't consume more power than really necessary, so I'll probably switch the CPU to a Celeron E1400 or similiar. Those already got a 2nd core and support SpeedStep. While that's got a higher TDP, I think the power consumption is going to be lower, over all.

Guess we'll have to wait and see.

Thursday, March 5, 2009

C# debugging

If you are a C# developer using Visual Studio 2008 and you need to debug your solution using arguments? Then read on.

There is a nice security feature in VS2008 that prevents arguments from being passed on to your executable. There even is a nice warning message, that tells you something about some bogus debug security settings. I haven't found any of these settings anywhere in the project, solution or even VS2008 settings.

I've still found a workaround, however:
  1. In your C# project settings under Debug activate SQL-Server debugging
  2. Make sure you've entered some arguments in the run options
  3. Debug your solution
  4. Profit!
You'll see the familiar messagebox telling you that the security settings permit the arguments from being passed on to the executable. Continue anyway. Then you'll see a second messagebox, yapping on about some debug security settings that were disabled. Well guess what - from now on you can use arguments to debug! Oh and of course you can disable SQL server debugging, it's only needed to trigger that metaphysical process in VS2008. ;)

Friday, February 27, 2009

VisualSVN + Trac = Love

VisualSVN is pretty well known for providing a decent subversion server on windows-platforms thats also easy to administer. Even for those of us who want to use integrated windows authentication. However, the built-in support is lacking seamless single-sign-on from those applications that support it.

There exists a special version of VisualSVN thats packed with trac. While this install isn't quite as straight-forward as the standard package - whoever has installed python on a production server knows what I'm talking about - once setup it works remarkably well. Except for true single-sign-on.

To address this issue I figured that VisualSVN is just comprised of apache plus some svn modules. So it should be easy to hack in support to auth against an Active Directory. There are quite a few options when it comes to this. I found only one working stable: mod_auth_sspi.

To get the correct modules and dependancies I installed a stand-alone apache (the exact version that ships with VisualSVN + Trac), and went from there. I blatantly copied any missing deps into the visualsvn/bin folder.

Here's my httpd.conf:
# This is configuration file for Apache HTTP server which is
# part of VisualSVN Server.
# Contact with VisualSVN Ltd. (support@visualsvn.com) if you have suggestions and
# improvements.

ThreadsPerChild 64
MaxMemFree 100
MaxRequestsPerChild 0

ServerRoot "C:/Program Files/VisualSVN Server"
ServerName "hostname.mydomain:443"
ServerSignature Off
ServerTokens Prod
DocumentRoot "htdocs"

PidFile "C:/Repositories//server.pid"

Listen "443"

LoadModule auth_basic_module bin/mod_auth_basic.so
LoadModule auth_digest_module bin/mod_auth_digest.so
LoadModule authn_file_module bin/mod_authn_file.so
LoadModule authn_visualsvn_module bin/mod_authnz_visualsvn.so
LoadModule authz_visualsvn_module bin/mod_authnz_visualsvn.so
LoadModule authz_svn_module bin/mod_authz_svn.so

LoadModule dir_module bin/mod_dir.so
LoadModule deflate_module bin/mod_deflate.so
LoadModule mime_module bin/mod_mime.so
LoadModule setenvif_module bin/mod_setenvif.so

LoadModule dav_module bin/mod_dav.so
LoadModule dav_svn_module bin/mod_dav_svn.so
LoadModule ssl_module bin/mod_ssl.so

LoadModule sspi_auth_module bin/mod_auth_sspi.so

Options FollowSymLinks
AllowOverride None

DAV svn

SVNListParentPath on
SVNParentPath "C:/Repositories/"
SVNIndexXSLT "/svnindex.xsl"
SVNPathAuthz on

AuthName "Subversion Repositories"
AuthType Basic

AuthType SSPI
SSPIAuthoritative On
SSPIDomain jerich
SSPIOfferBasic On
SSPIOmitDomain On

require group MYDOMAIN\Subversion

DirectoryIndex index.html

ErrorLog "C:/Repositories//server.log"

LogLevel error

DefaultType text/plain

TypesConfig conf/mime.types
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
AddType application/x-x509-ca-cert .crt
AddType application/x-pkcs7-crl .crl

SSLEngine on

SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
SSLPassPhraseDialog builtin
SSLSessionCache "shm:C:/Repositories//ssl_scache"
SSLSessionCacheTimeout 300
SSLMutex default
SSLCertificateFile conf/hostname.cer
SSLCertificateKeyFile conf/hostname.key.insecure

Include conf/httpd-custom.conf

And the httpd-custom.conf which includes the trac configuration:

LoadModule python_module "trac/python/mod_python_so.pyd"
LoadModule authz_user_module bin/mod_authz_user.so

SetHandler mod_python
PythonInterpreter main_interpreter
PythonHandler trac.web.modpython_frontend
PythonOption TracEnvParentDir C:\Trac
PythonOption TracUriRoot /trac

AuthName "Trac"
AuthType Basic

AuthType SSPI
SSPIAuthoritative On
SSPIDomain mydomain
SSPIOfferBasic On
SSPIOmitDomain On

require group MYDOMAIN\Subversion
Everyone in the AD-group "Subversion" is granted access to SVN and trac also. This could be changed of course to allow different groups access. The access levels in trac can be configured from within the admin interface.
I decided to run a https server. To avoid nasty Internet Explorer warnings about certificates and whatnot, you can either disable the checks for certificates, or create a proper certificate if you are lucky and you've got a CA server in your domain. Here's how to create a proper cert using openSSL and a windows CA. Copy them onto your svn server and that's it.

Thursday, February 19, 2009

Windows CE cab madness

When you're creating applications for Windows CE 5.0 devices, and you want to package them using a cab file, here's two pieces of advice.
  • Don't compress the cabinet file
  • Don't use authenticode

Thursday, February 5, 2009

Linux 2.4 hacking?

I need to hack on a Linux 2.4 kernel for an embedded system. I thought of using one of my Linux boxes to do the work. But not only did the trusted "make menuconfig" bail on me, there were countless compile errors, even on the vanilla kernel! I gathered this is due to a version conflict with ncurses.

I had to resort to an old Debian, that's based on 2.4 and still comes with the old gcc and whatnot. Works like a charm!

I'm sure I am not the only 2.4 hacker using a modern Linux distro. Any hints on how to make it work?