Monday Feb 04, 2008

Felix Baumann und ich werden unsere erste Tech-Demo im Rahmen des Sun Campus Ambassador Programms am Donnerstag dem 07. Feb. 2008 um 20:00 Uhr im Seminarraum 0.108 im Gebaeude der Informatik der Uni Stuttgart halten(Universitaetsstraße 38, 70569 Stuttgart; Anfahrtsbeschreibung auf: http://www.informatik.uni-stuttgart.de/kontakt/).
Das Thema wird die neue Netbeans 6.0 IDE und Linux Branded Zones unter OpenSolaris sein.
Wir freuen uns auf euren Besuch und halten Getraenke und Snacks bereit.

Finally we will have our first tech demo on one of our campusses. After being dumped on very short notice from the HDM last month we are a little behind our intended schedule, but I hope this will change.
Our demo will be on 02/07/08 and held in V38 0.108 of the University of Stuttgart. We intend to talk about Netbeans 6.0 and OpenSolaris Branded Zones(Linux).

Sunday Feb 03, 2008

This certainly is as late as it might get - meaning both time and date - but I had to struggle in my life due to several reasons lately which kept me from doing a lot of things - blogging maybe not the most important of all. After having thought about it, I came up with the conclusion that it couldn't hurt too much to upload some kinda outdated information, so here I go:
As mentioned before we went to the Sun Tech Days Frankfurt - and I mean to say it was a decent success. The greater lot only spent the first day there, but some of us went through with it the whole three days which turned out to be a lovely experience; I even went to dinner to the Marriot Hotel just to meet some of the guys you would usually only see on stage*g* Not having won any of the Ipods or Ultra workstations, that, the gain of being able to meet some fellow CAs as well as the tons of merchandise I had to carry home made the trip really worthwhile - did I mention that there were some really great talks about just anything Sun has to offer?^^


A very small impression on what a lecture looked like; it was taken just after we CAs had our very own intimate meeting with James Gosling himself. The hall was of course a lot bigger, not to say enormous - but I sat in front since I wanted to be able to catch the goodies; the plan worked out fine - I now own a XXXL Shirt that has the touch of James(;

Saturday Nov 03, 2007

A few days ago our local CA team(Felix Baumann, Frank Schlichting and myself) which has been joined by the German Chief Technologist for Solaris Franz Haberhauer has had an introductory talk with representatives of the University of Applied Sciences HDM Stuttgart. To phrase it as an understatement "the discussion went very well"(;
They already do have regular events like the "Security Day" a couple of weeks ago, a Web 2.0 Day, Gamers Day, Linux Day and so on and so forth where invited guests as well as students present new and established technologies. These events are already well seasoned, they have live Internet streaming as well as many attendants. We will be able to get involved in these events not only in our role as CAs, but they will also want senior Sun employees to give their insights; maybe Sun will even be able to provide a public speaker for their upcoming keynote regarding their 10th anniversary. Additionally they are interested in hosting whole day or half day events which are solely concerned about topics we will deploy.
I'm rather glad we got this very encouraging feedback and I am very much looking forward into our shared future with HDM Stuttgart.

Saturday Oct 27, 2007

I'm very pleased to announce that my university will be doing a field trip to the Tech Days in Frankfurt which has been organized by our dean and myself. Considering the number of students of computer science and related study courses I consider it a great success that there will be over 60 students joining us on the trip - at least for the one University Day - a few will stay for the whole event.

Thursday Oct 18, 2007

I wrote a small shellscript which converts existing mail relays in /etc/aliases to a SQL database. It worked for me in this simple form but I can take no responsibility whatsover for any other setup.

The usage is pretty much straight forward - simply give the script the needed information as to where the aliases file is located, the account for MySQL and so forth. Note: In the current implementation you have to create the database, a user and a valid relay table yourself. If you don't know how to do that you can extract this information in my howto on migrating Postfix to MySQL.
download

SUN Ray with PS2 keyboards
If you want to hook up a Sun Ray at home, you might want to use your favourite old PS2 keyboard attached via some USB connector. Depending on your keyboard layout you might be disappointed by the result, because it will be standard US. That's because the PS2 keyboard isn't designed for the Ray clients and won't prompt back a valid layout to the server which will then assume a standard scenario.
There is a simple solution to this problem; in the file "/usr/openwin/etc/keytables/keytable.map" edit the entry
6      0       US6.kt
and rewrite it to your favourite layout(British English in this case)
6       0      UK6.kt
There is one drawback however; from this point on this is going to be the single standard fallback layout for all keyboards hooked via SUN Ray clients to your server which won't report a valid layout themselves. So if you want to use different layouts on different clients you might want to check the xkb option in "/opt/SUNWut/bin/utxconfig", which I haven't done until now.

Solaris Express in any recent version will have out of the box NVidia support if you install the Developer Edition or the Community Release. This driver doesn't differ (at least as far as I know) from the Linux device driver, so setting up secondary screens and tv-outs is quite the same. There even is a preinstalled tool "nvidia-settings" which might help you do the job, but it didn't help me that much since you have to implement at least the second screen by hand in your X configuration file.
Before you begin, make a backup of your working /etc/X11/xorg.conf file.
We will now take a look at how this xorg.conf file has to be changed for TV-Out support.
  • Change the "Device" section that it looks like this:
    Section "Device"
        Identifier              "Videocard0"
        Driver                  "nvidia"
        # optional (find out with "$ Xorg -scanpci")
        BusID                  "[Your BusID, e.g.: PCI:2:0:0]"   
        Screen                0
    EndSection
    
  • Add a new "Device" section for the TV, just like the one before, but change "Screen 0" to "Screen 1" and "Videocard0" to "Videocard1"
  • Change the "Monitor" section as follows:
    Section "Monitor"
       Identifier        "Monitor0"
       HorizSync      30.0 - 100.0       #adjust to your monitor
       VertRefresh   50.0 - 94.0         #adjust to your monitor
       Option            "DPMS"
    EndSection
    
  • Add a new "Monitor" section for the TV, just like the one before, but change "Monitor0" to "Monitor1"
  • Now we configure the possible resolutions for CRT and TV
    You will have to adjust them to your liking. "Screen0" deals with the CRT, "Screen1" with the TV.

    Section "Screen"
        Identifier     "Screen0"
        Device         "Videocard0"
        Monitor        "Monitor0"
        DefaultDepth    24
        Option         "metamodes" "CRT: 1600x1200 +0+0; CRT: 1400x1050 +0+0; 
        CRT: 1280x1024 +0+0; CRT: 1024x768 +0+0; CRT: 800x600 +0+0; 
        CRT: 640x480 +0+0"
        SubSection     "Display"
            Depth       24
            Modes      "1600x1200" "1280x1024" "1024x768" "800x600" "640x480"
        EndSubSection
    EndSection
    
    Section "Screen"
        Identifier     "Screen1"
        Device         "Videocard1"
        Monitor        "Monitor1"
        DefaultDepth    24
        Option         "metamodes" "TV: 1024x768 +0+0"
        SubSection     "Display"
            Depth       24
            Modes      "1600x1200" "1280x1024" "1024x768" "800x600" "640x480"
        EndSubSection
    EndSection
    
  • Now you we are physically set up and can define a Serverlayout which defines how the monitors do correspond to each other.
    In this example the CRT will be the primary monitor whereas the TV can be reached by dragging the mouse cursor out the left side of your monitor.

    Section "ServerLayout"
        Identifier     "Layout0"
        Screen      0  "Screen0" 1024 0
        Screen      1  "Screen1" LeftOf "Screen0"
        InputDevice    "Keyboard0" "CoreKeyboard"
        InputDevice    "Mouse0" "CorePointer"
    EndSection
    
Now we are all done. Save xorg.conf and restart your Xserver(in Solaris logging out and in again will do the job).
A working copy of my file as an example can be downloaded here.

Various small problems

VIM / Cursor Keys
If you wonder why VIM keeps writing 'A', 'B', 'C', 'D' on your screen when it is supposed just to move the cursor in writing mode, the answer is that the cursor keys are not being mapped the right way. The solution is to extend your favourite .vimrc file with:

map! ^[OD ^[h
map! ^[OC ^[l
map! ^[OA ^[k
map! ^[OB ^[j


"/usr/ucb/cc: language optional software package not installed"
/usr/ucb/cc is only a wrapper to a real C compiler. Solaris 10 won't have a C compiler preinstalled, normally. This means that you will have to install it yourself (Sun Studio would be a good idea, too). All you have to see to then is that your PATH is set correctly; meaning that /usr/ucb is either deleted or after your real compiler.


"WARNING: loghost could not be resolved."
That's because your syslogd doesn't have a defined host to work on. To fix it simply add "loghost" to your 127.0.0.1 entry in the /etc/hosts file

127.0.0.1       localhost loghost


"Sendmail: My unqualified host name (domain) unknown;"
If you get this warning on computer startup, then you haven't configured a fully qualified domain name for your system. If you don't need a mailing system on your computer the solution is easy by simply disabling the service via:
svcadm disable sendmail
If you need a working mailsystem, there is a howto from SUN.

Integration of Databases in the Postfix SMTP server in Debian GNU/Linux

Why would somebody want to let postfix connect to a SQL-database?
  • There's no need to create a real local user for each e-mail account
  • SQL-databases can be kept in RAM, so if you have excessive mailing on your server, there will be reduced harddisk access
  • Management of mailinglists becomes real easy
  • /etc/aliases is kept small and simple

Step 1
Install the package "mysql-server" and "mysql-client" if not yet installed. Log on to your sql-server using the root account:
mysql --user root
mysql> create database postfix_database;
mysql> GRANT ALL PRIVILEGES ON postfix_database \
TO 'postfix'-AT-'localhost' IDENTIFIED BY 'postfix_password' \
WITH GRANT OPTION;
mysql> flush privileges;
mysql> create table postfix.postfix_alias (destination VARCHAR(50), \ 
alias VARCHAR(50));
mysql> exit;

Now we have created a database called "postfix_database" and a user called "postfix" who has access to it using his unique password "postfix_password". With "flush privileges" we bring the sql-server up to date concerning user rights. Then we create a table called "postfix_alias" in the database "postfix" with two rows: "destination" is a text variable where the mail will be relayed to and "alias" is the name of the mailinglist in my example.

Step 2
Install the package "postfix-mysql". Besides the needed library this will bring you the config file "/etc/postfix/mysql-aliases.cf" which we will modify like this
user = postfix
password = postfix_password
table = postfix_alias
query =  SELECT destination FROM postfix_alias WHERE alias = '%s'
hosts = unix:/var/run/mysqld/mysqld.sock
select_field = destination
where_field = alias
Since postfix runs in a chroot it lacks several information it needs to have; for example the socket to the mysql daemon. That's why we provide it with some bind mounts, which can be done by inserting these lines into "/etc/fstab".
/etc/passwd     /var/spool/postfix/etc/passwd           none bind 0 0
/etc/shadow     /var/spool/postfix/etc/shadow           none bind 0 0
/etc/group      /var/spool/postfix/etc/group            none bind 0 0
/var/run/mysqld /var/spool/postfix/var/run/mysqld       none bind 0 0
To update this information the root user has to remount all filesystems using "mount -a".

Step 3
We're done already(almost). All that is still needed is some information in the database. Single entries can be made with the mysql client like this:
mysql> insert into postfix_alias values \
('someone-AT-somewhere-DOT-de', 'mailinglistname');
Now if you send a mail to "mailinglistname-AT-yourhost-DOT-com" the mail will be relayed to "someone@somewhere-DOT-de". That's it.
I wrote a JSP/Servlet combination in JavaEE to create a webpage where users can put themselves on or off a mailinglist; you can find it here or in the projects folder if you're interested.

Step 4
Note that installing the package postfix-mysql updated a line in your "/etc/postfix/main.cf":
alias_maps = hash:/etc/aliases
...
alias_maps = mysql:/etc/postfix/mysql-aliases.cf
There are most likely many more lines in this file, but the important factor is that the first line mapping to "/etc/aliases" is made obsolete by the second entry. So if you were using some important relaying in this file you should migrate it. For this reason I wrote a small shellscript that was capable to do the job for my setup.
  • gefechtsdienst.de / pfaffenhof.org
- Dedicated System
- AMD Athlon(tm) XP 1700+
- 512MB RAM
- 100MBit
- Mailsystem (POP / SMTP)
- Apache (two virtual hosts) / Typo3
- CVS repository
- several clients like icq and irc
- Debian Sarge


  • Lab Setup in students dormintory
Sun Fire 280R
- 2 UltraSPARC IIIi 1.05GHz
- 4GB RAM
- 37GB FC-AL HDD
- 100Mbit - No head or peripheral devices
- Solaris 10
- Sun Application Server(self written accounting system for hostel)
- Workstation via VNC with Netbeans

HP ProCurve 2524
- 100MBit Switch with VLAN

The other machines belong solely to a friend of mine. The more interesting are:
- Sun Blade 1000 Workstation
- DEC Alpha Server 2CPUs, 2GB RAM, SCSI Diskarray
- DEC Alpha Workstation 600
- VT420 Terminal
Lab Setup

  • SUN Ray2[Workstation] / Linksys WRT 54G
A SUN Ray2 Device connected directly to my other workstation running SUN Solaris Express. This device is used by my girlfriend as long as there is no need for excessive video playback(;
If there is, she can switch back to a fat client(Duron 900Mhz) running Debian via KVM.
The other box is my Linksys router running DD-WRT.
Cisco WRT / Sun Ray 2


  • phorce[Workstation]
- Intel Pentium4 2.6Ghz HT
- NVidia Geforce 6600GT
- 1GB RAM
- 100MBit Internet Connection
- 4 HDDs(IDE/SATA): 2*250GB, 200GB, 160GB
   (total of 0.86TB)
- 20" Hitachi CRT
- Java SE/EE Development
- SQL Testserver
- Solaris Express Developer Edition
- Several real money poker clients + statistic software
   (running on WinXP Pro)


  • phorce-gamma [discarded Workstation - now Solaris10 Testcomputer]
- IBM Professional Workstation 6868 78G
- Dual PIII 866Mhz (passive cooling)
- 1024MB PC600 RIMM Rambus Ram
- 40GB HDD
- No head or peripheral devices
- Solaris 10
Old Setup when it still was my workstation.
Now I got a new apartment with my lovely
 girlfriend Katrin. But as a tradeoff I had to
 cut from 5 heads to 1 (20" Hitachi).
But I don't regret it(;
Setup Picture


  • phorce-beta [Portable Companion]
- Sony Vaio Picturebook C1VE
- Transmeta Crusoe 600Mhz
- 256MB Ram
- 40Gb Toshiba HDD
- Latex
- VPN Client(needed for University)
- C/Java development
- With battery extension it runs for over 5h
- Debian Sid


  • phorce-alpha [Server](discarded)
- Dual P90(gold-plated)
- 80MB Ram
- 358 BogoMIPS
- 2x 2GB SCSI HDD
- 1x 1GB SCSI HDD
- Wireless + Local Routing
- Local FTP- / Webserver
- Debian Woody
Server Picture


  • phorce-beta [Portable](discarded)
- PIII 1GHz
- 256MB Ram
- 20Gb IBM HDD
- 1982 BogoMIPS
- IBM MF Keyboard(click)
- 19" HP CRT
- Local development
- mail(mutt)
- news(tin)
- Debian Sid


  • phorce-delta [Handheld](discarded)
- HP Jornada 680
- 133MHz SH3 CPU
- 16MB Ram
- 512MB CF
- Debian (debian.dodes.org)

Jornada Picture


  • phorce-epsilon [Handheld](discarded)
- Sharp Zaurus 5500G
- 206Mhz StrongARM CPU
- 64MB Ram
- 128MB SD
- 137 BogoMIPS
- Opie
- Openzaurus
- GnuPG
Zaurus 5500G Picture


  • phorce-zeta [Handheld](discarded)
- Sharp Zaurus C-1000
- 400Mhz X-Scale CPU
- 64MB Ram
- 1GB SD
- Wlan CF
- pdaXrom
Zaurus C1000 Picture

This blog copyright 2009 by Alain M. Lafon / Felix Baumann