Nov 26, 2008

PDF Document does not print all Fields generated with iText

With the help of iText we patch some fields in already existing PDF documents.
This was no problem so far.
But recently some Windows PC can print the whole document and others have
the document but not the patched fields.

After some investigation of the problem, the reason was, that the fields use
an unicode font.
The AdobeReader was extended with the FontPack.
This allows the usage of e.g arabic fonts.
But when a Reader has not the FontPack, the PDF document with the unicode
font can be viewed and everything is fine, but this part of the document is
not printed.

Just changing the font to something else works quite fine.

Nov 25, 2008

Get Data like pagesize from a linux system

Today I have the job to determine the memory footprint of an application.
/proc/statm
delivers the memory in pages ( see the man page of proc for an explanation of statm )

Now the question is, how do I get the pagesize on the linux system.
On Solaris I would use pagesize to get a list or pmap -s to get the used
size. To set a different size you can use ppgsz or mpss.so.1 which must be preloaded.

On Linux I've found the following approach using Python

>>>import resource
>>>resource.getpagesize()
4096
But the simpler version is to read the man pages of sysconf(3) and getconf(1)
By the help of getconf, a lot of information can be requested from the system.

#getconf PAGESIZE
4096

top can show a lot more details when using the "f" key and selecting additional fields to show corresponding to memory.

top - 10:26:25 up 18 days, 2:42, 3 users, load average: 0.00, 0.00, 0.00
Tasks: 81 total, 2 running, 79 sleeping, 0 stopped, 0 zombie
Cpu(s): 0.0%us, 0.0%sy, 0.0%ni,100.0%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 2060868k total, 1737284k used, 323584k free, 170648k buffers
Swap: 1518100k total, 48k used, 1518052k free, 693176k cached

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ SWAP CODE DATA COMMAND
28764 progvs 16 0 52388 6760 5208 S 0 0.3 0:02.14 44m 408 1252 progvs_prog


Nov 23, 2008

Upgraded notebook to OpenSolaris Build 101b or OpenSolaris 11/08 RC2

Today I upgraded my notebook to OpenSolaris 11/08 RC2.

bash-3.2$ prtdiag
System Configuration: FUJITSU SIEMENS LIFEBOOK S6120
BIOS Configuration: Phoenix/FUJITSU Version 1.25 01/29/2004
Upgrade didn't have any problems. Firefox is 3.0.4 the actual release.
OpenOffice is also in the Version 3.0.

Some new Visual Panels for mysql, sysid start with the command vp


Nov 20, 2008

Python EA Cluster Module and Netbeans 6.5

After installing netbeans 6.5 I also wanted to try the Python Early Access for editing Python sources in Netbeans.

There are zip-Modules available from here.
I downloaed the Cluster-Module for Python and unzipped directly in the
Netbeans directory ( /tools/netbeans/6.5 ).

The folder python1 is created there.
To get the Module into Netbeans itself you have to add it to
netbeans.cluster in the etc-Directory of the Netbeans-Installation.

Just add the folder name "python1" at the end of the file.
After restarting Netbeans, the Python module is available.

Can not insert [ or { into Netbeans 6.5 with ISO8859-15 locale

After downloading the fresh Netbeans 6.5 and installing the python module.

I attempted the featuer of "__all__" which is recognized in the completion popub.

But there was the problem, that I could not insert a bracket ( "[" ).
In a shell or any other application it works, but in jedit it does also not work.

So it seems to be combined with a Java Application.

After changing the locale to de_AT.UTF-8 I could insert brackets again.

so my workaround is to have the system running in de_AT.ISO8859-15 and also gnome as describe here and just change the locale in the start scripts.
The default editor locale is set to de_AT.ISO8859-15, because otherwise
the whole development will be destroyed, when changing the locale.
It also didn't help to use different JDK's.

final Netbeans 6.5 is available

The final version of netbeans for Solaris x86, SPARC is downloaded and runs
on OpenSolarix Build 101 x86 and Solaris 10 8/07.

Here is the announcement.

Nov 18, 2008

Getting Gnome to use the new de_AT.ISO8859-15 locale

Yesterday in the my blog, I described how to get the missing locale de_AT.ISO8859-15 back in OpenSolaris Build 101.
But after the boot today, Gnome still had the UTF-8 locale in use.

So I had to add the new locale in /etc/X11/gdm/locale.alias
German(Austria) de_AT.UTF-8,de_AT
German(AustriaISO8859-15) de_AT.ISO8859-15,de_AT
After logout, changing the Language in the GDM-Login screen and login, the
locale is now the de_AT.ISO8859-15.

Nov 17, 2008

missing ISO8859-15 locale in OpenSolaris Build 101a

Last Friday, I recognized, that the de_AT.ISO8859-15 locale is missing.
There were only UTF-8 locales in the system available

bash-3.2$ locale -a
C
POSIX
ar_EG.UTF-8
ar_SA.UTF-8
bg_BG.UTF-8
ca_ES.UTF-8
cs_CZ.UTF-8
da_DK.UTF-8
de.UTF-8
de_AT.UTF-8
de_CH.UTF-8
de_DE.UTF-8
de_LU.UTF-8
el.UTF-8
el_CY.UTF-8
el_GR.UTF-8
en_AU.UTF-8
en_CA.UTF-8
en_GB.UTF-8
en_IE.UTF-8
en_MT.UTF-8
en_NZ.UTF-8
en_US.UTF-8
es.UTF-8
es_AR.UTF-8
es_BO.UTF-8
es_CL.UTF-8
es_CO.UTF-8
es_CR.UTF-8
es_EC.UTF-8
es_ES.UTF-8
So I could not edit with vi/vim some source-files, because they were all in
ISO8859-15 encoded.

After searching and searching, I didn't find any hint about this.
Today I searched again and after starting the packagemanager, I found
a package named "SUNWlang-de-extra". This package lists the ISO8859-1 and
ISO8859-15 for de_AT and de_DE.

After the installation:

bash-3.2$ locale -a
C
POSIX
ar_EG.UTF-8
ar_SA.UTF-8
bg_BG.UTF-8
ca_ES.UTF-8
cs_CZ.UTF-8
da_DK.UTF-8
de
de.ISO8859-15
de.UTF-8
de_AT
de_AT.ISO8859-1
de_AT.ISO8859-15
de_AT.ISO8859-15@euro
de_AT.UTF-8
de_CH
de_CH.ISO8859-1
de_CH.UTF-8
de_DE
de_DE.ISO8859-1
de_DE.ISO8859-15
de_DE.ISO8859-15@euro
de_DE.UTF-8
de_DE.UTF-8@euro
de_LU.UTF-8
Now I can set the default-locale in /etc/default/init again to the de_AT.ISO8859-15 locale, to do not damage my source files.

Nov 16, 2008

Glassfish White Paper from Sun about High Availability and Solaris 10 Zones

Sun published a White Paper about the High Availability of Glassfish in Solaris 10
with Zones.

Nov 13, 2008

Terminal with many shells running inside on terminal

Since Build 100 is the package pkg:/SUNWterminator@0.5.11-0.100 in the
IPS repository available.
It allows to start multiple shells in one terminal which are visible at the
same time.
gnome-terminal allows also multiple shells, but in different tabs:



To set the title of each one you see the function in the .bashrc in my case
The title is dynamically updated.
This code is from here and here are some shortcuts described.

Ctrl-Shift-E: will split the view vertically.

Ctrl-Shift-O: will split the view horizontally.

Ctrl-Shift-P: will focus be active on the previous view.

Ctrl-Shift-N: will focus be active on the next view.

Ctrl-Shift-W: will close the view where the focus is on.

Ctrl-Shift-Q: will exit terminator.

F11: will make terminator go fullscreen.


The code for the bash-functions:
# set the window title
setWindowTitle() {
echo -ne "\e]2;$*\a"
}

updateWindowTitle() {
setWindowTitle "${USER%%.*}@${HOSTNAME%%.*}:/${PWD}"
}
PROMPT_COMMAND=updateWindowTitle

Nov 10, 2008

Upgraded notebook to OpenSolaris Build 101a

After some troubles to update the notebook to Build 100a and a reinstall
with build 99, I tried the next upgrade to build 101a because of an
successful update which Jim Grizano blogged.

It took about 2 hours without any intervention and I could successfully boot
the notebook again.
The Xserver is up and running and I can work.

The one thing were a lot of messages about zfs-autosnapshot where the
user zfssnap is not allowed to execute cron-jobs. ( see this msg-Thread )

Nov 8, 2008

Cakes


knight's castle



Soccer

Nov 7, 2008

OpenSolaris dual monitor usage

In this blog I described already the switching to an external monitor/beamer
in OpenSolaris.

Today I created an xorg.conf by the help of Xorg --configure:
First I disabled the graphical login manager:

svcadm disable gdm:default


After this I logged in via SSH and started
Xorg --configure


This created an xorg.conf.new in /root.
In the Display-Section I set the Virtual Size
SubSection "Display"
Viewport 0 0
Depth 24
Virtual 2048 2048
EndSubSection


and started the dual head operation with
pfexec xrandr --output VGA --right-of LVDS


After this, the mouse can go out of screen on the Laptop and enters the external screen.
Also a running Windows can be moved to the other screen.

Sound Theme doesnot work after fresh Installation of Opensolaris Build 99

After the crashed Update to Build 100a, I reinstalled Build 99. Some adjustments
had to be done, but the login-Sound was not audible anymore.
I tried to activate the ESD, but some messages told me, that ESD is not used
after some Build of Gnome it isn't used anymore.

So what I found was the autostart-things of gnome are in
/usr/share/gnome/autostart
There is also a file for the login which shows the command which plays the sound:
libcanberra-login-sound.desktop:

/usr/bin/canberra-gtk-play --id="desktop-login" --description="GNOME Login"
OnlyShowIn=GNOME;
Executing the command in the terminal responded that it didn't found any
sound file to play.

After some searching I had to install the package with the sound files:
# pkg install pkg:/SUNWxdg-sound-theme@0.5.11-0.99
DOWNLOAD PKGS FILES XFER (MB)
Completed 1/1 40/40 0.65/0.65

PHASE ACTIONS
Install Phase 48/48
PHASE ITEMS
Reading Existing Index 9/9
Indexing Packages 1/1
After installing the commandline execution gave the login-Sound to the speakers.

Nov 3, 2008

Downgraded to Build 99 again

After I downloaded the Build 99 of OpenSolaris and installed it on the laptop
everything worked fine. Before continuing to configure, I tried another upgrade
with a fresh installed Build99 of OpenSolaris and it failed also to start the
Xserver ( also login on the command line was not possible ).
Starting in Single-User-Mode is possible.

So I reinstalled to Build 99 installed andconfigured and now I'm waiting for the
next version, perhaps this one will work.