May 30, 2009

reading data from a NTFS filesystem in opensolaris with fuse

FUSE ( file system in user space ) is available in development state on opensolaris.org.

( see the video and slides from the Front Range OpenSolaris User Group from here)

The project describes the whole process how to build fuse on opensolaris.
You need the compilers.
The whole commands build the system and create packages, which can be
installed in your opensolaris installation.

I have also downloaded ntfs-3g. This is a filesystem implementation allowing to
read/write from/to a ntfs filesystem.

During the compilation, I got an error that pkg-config can not be found on
the system. The error message suggests to download from a web site.
OpenSolaris has this pkg-config in the package SUNWgnome-common-devel

Install this package and the
configure;
make
make install


works out of the box.

To find out your NTFS partition use format, select your disk and issue a fdisk
in format.

Than you can do
/bin/ntfs-3g /dev/dsk/c3d0p1 /mnt
and
# ls /mnt
AddOn IO.SYS Program Files
AUTOEXEC.BAT KAV Programme
bootfont.bin Lang.txt Python24
boot.ini MinGW RECYCLER
Config.Msi MSDOS.SYS sdk
CONFIG.SYS nagent_log.txt svn_repository
Dokumente und Einstellungen NTDETECT.COM System Volume Information
Downloads ntldr temp
entw pagefile.sys UNWISE.EXE
i386 pc-bib WINDOWS
Install.LOG prod



A nice description of the whole thing can be found here.

chm viewer for Solaris/OpenSolaris

I downloaded the new version 2.2.4 from VirtualBox.

In the installation-directory /opt/VirutalBox/i386 is a file named
kchmviewer
This is a viewer for compiled help files, where one is supplied with VirtualBox.


May 26, 2009

duplex printing in OpenSolaris

For some time I had duplex printing in my OpenSolaris installation.
But since some time, the printing on HP P3005 was not duplex anymore. Just only
single sided.

The printers are discovered with the SMF-Service
svc:/network/device-discovery/printers:snmp
After looking up the config with
bash-3.2$ lpstat -l -p HP_LaserJet_P3005
printer HP_LaserJet_P3005 idle. enabled since Tue May 26 07:50:48 2009. available.
Form mounted:
Content types: application/postscript
Description: Hewlett-Packard LaserJet P3005
Printer types: unknown
Connection: direct
Interface: /usr/lib/lp/model/uri
PPD: /usr/share/ppd/SUNWfoomatic/HP/HP-LaserJet_P3005_Postscript.ppd.gz
After fault: continue
Users allowed:
(all)
Forms allowed:
(none)
Media supported:
Letter
HalfLetter
Executive
Legal
A4
A5
A6
B5
B6
w558h774
w553h765
w522h737
w612h936
DoublePostcard
Postcard
w612h935
Env10
EnvMonarch
EnvDL
EnvC5
EnvISOB5
Banner page never printed
Character sets:
(none)
Default pitch:
Default page size:
Default port setting:
Options: serial=LLADDR-001E0B1A6B8E
Some time ago I copied there my own PPD file which was from a Solaris 10 SPARC
machine, where the printer is accessed via CUPS.
CUPS had there the duplex unit configured.

So I set the ppd to the new one with

lpadmin -p HP_LaserJet_P3005 -n /usr/share/ppd/SUNWfoomatic/HP/HP-LaserJet_P3005_ewer.ppd.gz
and duplex worked again.
But what I'm missing is the possibility to change the duplex settings in the print dialog or globally.
As I would say, there should be something like a detection mechanism for the duplex unit, but
it doesn't seem to work.

filename completion in ksh

For some users, I have a ksh as the login shell.

The ksh supports also filename completion like the bash with the key.

For ksh set the environment variable EDITOR or VISUAL to emacs or vi.

If you set to vi, than the key sequence is \ for a completion.
If you set to emacs, than the key sequence is

To get a list of possible completions use =

May 20, 2009

"mysterious" core dumps of apache tomcat in a Zone of Solaris 10

We have a Sun Fire V240 with 8 zones. In each zone are some applications running
on apache tomcat or jboss. There are also some other java applications running.

Today a colleague experienced a "mysterious" core dump of tomcat.

After looking into the hserr* log of java it showed a coredump with Signal 10 ( SIGBUS), also a "mdb core" showed this problem.

Looking with "swap -s" showed a nearly exhausted swap memory only 180MB were
available to the whole system.

First step was to allocate some more swap memory from the second hard drive
and everything worked ok.

The other thing was in the parametrization of the applications running in tomcat.
The application can utilize a Threadpool. The starting size of the pool was
parametrized with 1000 threads.
So this caused a problem, because each thread is using memory, although the
thread is just hanging around in the pool.

using different locale in vim than the Gnome-Desktop-Session

The Input-Method-Switcher in OpenSolaris works only, when the desktop session is
started with an UTF-8 locale.

All my files are saved with an ISO-8859-1 locale. So editing files with vim in a
Gnome-Session with UTF-8 destroys the file data.

In OpenSolaris the /usr/bin/vi is a vim implementation.
Vim supports setting encodings.
You can set in your ~/.vimrc the encoding and the files are written with your encoding
Just add
set encoding=iso-8859-15

to your ~/.vimrc and start vim.

If the characters in the terminal are not correct, than you have to set the
encoding of the terminal.
The gnome-terminal and terminator support the changing of the terminal encoding
to.

Here is an example from the terminator-Terminal:



Sorry for the bad quality, but I recorded with Istanbul a screen-session and
made a dump of the replay-display. I didn't get a screenshot when the menu
is open.

Increasing desktop size of Xephyr/gdmflexiserver/Xnest

In OpenSolaris there is a menu entry named "New Login in a Windows" as described
here. This calls the command

gmdflexiserver --xnest
which uses Xnest as the X-Server in the window.

The size of the desktop is relatively small. Even some menus do not show the "ok"
button to quit the dialog.

To increase the size of the desktop in the desktop you click on the desktop of the
Xephyr/Xnest windows and select "Screen Resolution". In this dialog you can change
the size and acknowledge.

The size of the Xnest/Xephyr/gdmflexiserver is changed immediately.

May 19, 2009

Input Method Switcher in OpenSolaris

Using the second complete Gnome-Session in an already running session with
gdmflexiserver as I blogged here, I saw an Input-Method-Switcher Icon in the taskbar which I did not
get in my German localized Desktop.

I could start, but did not get any languages to select.
Setting my desktop to UTF-8 showed the icon for switching the input
method and also the languages to select.

Here is a screenshot with switched input method to arabic:

Using a complete OpenSolaris Desktop-Session inside a running Desktop-Session with a different User

In the menu of OpenSolaris is an entry named "In einem Fenster neu anmelden" ( english "New Login in a Window" ) "Systemwerkzeuge" in German ( System Tools in english).

I have an additional local user. After starting you get a login screen, like in the "real" session.



After the login, a complete desktop is visible:

May 18, 2009

New Multimedia IPS repository for OpenSolaris

Today I found in this blog an entry about a new IPS repository containing
MultiMedia Packages.

You can add this new repository with:
pfexec pkg set-authority -O http://ips.homeunix.com:10000/ homeunix



May 15, 2009

OpenSolaris Build 111a didn't show the icons for dynamically inserted CD, USB storage on the Gnome-Desktop recognized by HAL

Some time ago, I had used my CMX MP3 player to copy mp3 onto it by plugging in
via the USB port.
When the player is plugged in, the icon for the player is displayed on the desktop
automatically ( also with CDROM's inserted into the drive ).
After this I could copy data onto it and remove it again.

The last day's I recognized, that this automatic mounting didn't happen anymore.

After inserting a CDROM, the hal daemon show that the data is recognized, but didn't
get mounted, because volume.ignore is set to true.

To see this, I started the hal daemon in debug mode:
as root
svcadm disable hal
/usr/lib/hal/hald --daemon=no --verbose=yes


Also the command
bash-3.2$ rmmount
mount of cdrom /dev/dsk/c4t0d0s2 failed: Device has /dev/dsk/c4t0d0s2 volume.ignore set to TRUE. Refusing to mount.


issued an error.

To activate the feature again, I had to edit
/etc/hal/fdi/policy/30user/90-solaris-device-allocation.fdi


change from





true


true





to








false


false






and restart the hal daemon
svcadm restart hal


and the icons for the removable media appear again on the desktop.

May 13, 2009

writing on a mounted linux NFS filesystem causes uid to be nobody4

On some of the last versions of OpenSolaris I had problems writing to the
filesystems which were mounted from our old linux file server ( SuSE 8.2 - Kernel 2.4.20) .

I mount the filesystem from the linux servers via automount and if not available
the mount directs to a local fielsystem.
the content of my auto_direct looks like:
/trace -timeo=600,retrans=10,retry=10,rsize=8192,wsize=8192 linux1.hartter.com:/trace localhost(9):/export/remote/trace
/users -timeo=600,retrans=10,retry=10,rsize=8192,wsize=8192 lxserv:/users localhost(9):/export/remote
This causes ( a running autofs service the prerequisite ) a mount from the server as first attempt and if not available mount from the localhost. This is achieved with
the number in brackets.

Locally I have defined my user with the same UID and GID.

A new file on the NFS filesystems is created with user nobody4 when the world writeable flag is set on the directory.

So I could not write to restricted directories on NFS, which worked on some release before.

Now I found a message thread which discusses this problem.

The problem is about the security in NFS.

What I did to solve my problem was to deactivate the security mode none
in /etc/nfssec.conf

# default security mode is defined at the end. It should be one of
# the flavor numbers defined above it.
#
#none 0 - - - # AUTH_NONE
sys 1 - - - # AUTH_SYS
dh 3 - - - # AUTH_DH
After this a newly created file on a newly mounted NFS drive ( also via automount )
get the correct UID/GID as my local user has.

So I can write again from the OpenSolaris installation on the NFS drives of the
linux file servers.

May 7, 2009

Visual Panels in OpenSolaris

The Package repository of OpenSolaris contains the packages for the
Visual Panel project. Look for OSOLvpanel in the packagemanager.

The panels register in the menu some start items.

Starting without any panel as described in this posting does not work
anymore.

The start on the commandline is like
vp apache
vp mysql
vp sysid
vp sharemgr
The GUI for apache is here:

May 5, 2009

SshConsole Plugin for jEdit

Today I found the Plugin SshConsole for jEdit.
see http://plugins.jedit.org/plugindoc/SshConsole/.
This plugin is built to use the plugins FTP, Consoel, ErrorList as
base for its functionality.

When you browse in the filebrowser via SFTP ( see here for a former blog entry),
the Ssh console is updated.
The Plugin also offers a System Shell and a BeanShell.

So you can work on the remote system in a shell directly in jEdit.

Here is a screenshot with the plugin docked at the bottom of the editor:

May 2, 2009

Timeslider in Nautilus will be improved in next OpenSolaris Version 2009.06

See the this blog for some picture about the improvements of the Timeslider integration.

I'm very interested.

May 1, 2009

running an old DOS game on Windows Vista

My little cousin got a very old DOS game. So they wanted to play this on a
Laptop with Windows Vista.

The problem on starting, was, that the system said "fullscreen mode is not available on this system"

After a little searching, I found some hint's about installing Windows XP drivers´, but that
can cause an instable system.
The other link of help was DOSBox. This is a x86 PC emulator.
You can configure a lot of things.
But on Vista, the problem is with the access rights. So you have to execute the dosbox as
Administrator, so that the config could be written as describe in the readme.
I have change the keyboard layout to german and also the language.

To use directories from the host os, you have to mount it.