Monday Oct 12, 2009

Blurb BookSmart software on OpenSolaris

I would like to create my first photo book. After short investigation I decided to give a chance to Blurb. But wait, their BookSmart software is just for Macintosh and Windows. Short Internet search revels that it's actually Java application and that some Linux guys were successful to run it. So, why I should not run it on OpenSolaris?

Following is the procedure to install and run Blurb BookSmart software on OpenSolaris and other similar systems with Java (tested with BookSmart version 2.5.0). It is based on Ubuntu documentation.

1. Download BookSmart version for Macintosh from Blurb web pages.
(After download I had it in following location ~/Downloads/BookSmart_2.5.0.dmg)

2. As OpenSolaris cannot handle DMG images, we need to install just another Java application which can do it - HFSExplorer.

mkdir ~/hfsexplorer
cd ~/hfsexplorer
wget http://sourceforge.net/projects/catacombae/files/HFSExplorer/0.21/hfsexplorer-0_21-bin.zip/download
unzip hfsexplorer-0_21-bin.zip

3. Now we will extract software into ~/BookSmart directory.

mkdir ~/BookSmart
./unhfs.sh -o ~/BookSmart -fsroot BookSmart.app/Contents/Resources/Java ~/Downloads/BookSmart_2.5.0.dmg

4. There is also need for script which will start the application.

cat > ~/BookSmart/run.sh << EOF
#!/bin/sh

cd ~/BookSmart
classpath=""

# Build classpath with all jars in the lib directory
for jar in lib/\*.jar
do
classpath=\\$classpath:\\$jar
done

java -Xincgc -ea -Xms256m -Xmx1024m -classpath \\$classpath com.blurb.booksmart.application.BookSmart

exit \\$?
EOF
chmod a+x ~/BookSmart/run.sh

5. From now and on Blurb BookSmart application can be started using new run script.

~/BookSmart/run.sh

Monday Jun 01, 2009

Network Auto Magic and Profiles

One of the wifi networks I connect to with my OpenSolaris 2009.06 laptop provides wrong list of DNS servers. In order to get properly working Internet I need after connecting change content of /etc/resolv.conf. But you don't want to do such thing manually every time you connect.

At this situation I learned in nwadm(1) info about Profiles which perfectly solved my problem.

First I had to prepare script which will determine whether I have just connected to my problematic wifi (used BSSID is just an example):

$ cat /etc/nwam/ulp/check-conditions
#!/bin/sh
dladm show-wifi -o BSSID | grep 0:1:2:3:4:5 > /dev/null && echo bad-dns-wifi

Then I had to create "bringup" script for new "bad-dns-wifi" profile which will modify resolv.conf file. Again, IPs are just an exmple:

$ cat /etc/nwam/ulp/bad-dns-wifi/bringup
#!/bin/sh
echo "nameserver 1.2.3.4\\nnameserver 1.2.3.5" > /etc/resolv.conf

Note: These interfaces can change in future as it's stated in above mentioned man page.

Wednesday Jan 21, 2009

Tomcat 6 in OpenSolaris

In OpenSolaris build 106 there were some important changes to bundled version of Tomcat:
- Tomcat was upgraded to version 6.0.18
- Tomcat was moved under SMF(5) control
- SMF executes Tomcat with "webservd" user credentials
- Tomcat started via SMF service can be configured to use privileged TCP ports (< 1024)
- Tomcat is now installed in different locations /usr/tomcat6 and /var/tomcat6
- New symbolical link /etc/tomcat6 to configuration directory /var/tomcat6/conf
- New man page tomcat(1M)

Starting Tomcat SMF service

Tomcat is shipped with default configuration file (/etc/tomcat6/server.xml) so it can be immediately started via:

# svcadm enable tomcat6

Status of Tomcat SMF service can be queried as follows:

# svcs tomcat6
STATE STIME FMRI
online 4:41:46 svc:/network/http:tomcat6

And finally Tomcat is stopped:

# svcadm disable tomcat6

Configuring Tomcat to listen on port 80

With default configuration Tomcat listens on TCP port 8080. You may need to change it to standard HTTP port 80 (and 443).

The port number is defined in /etc/tomcat6/server.xml as following:

Connector port="8080" protocol="HTTP/1.1"

This is especially nice if you want to use Tomcat alone without Apache Web Server.

Tomcat and HTTPS

Tomcat is using Java Secure Socket Extension (JSSE) for SSL HTTP implementation. Following are steps based on Tomcat ssl-howto which shows how to enable it:

Certificate key store creation:

# /usr/java/bin/keytool -genkey -alias tomcat -keyalg RSA -keystore /etc/tomcat6/keystore

Server configuration (/etc/tomcat6/server.xml) then need uncomment following section and to add in it "keystoreFile" and "keystorePass" attributes:

<Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
maxThreads="150" scheme="https" secure="true"
keystoreFile="/etc/tomcat6/keystore" keystorePass="changeit"
clientAuth="false" sslProtocol="TLS" />

Running Tomcat as ordinary user

Even if OpenSolaris bundled Tomcat is primary meant to be controlled via SMF service and to be run with "webservd" user credentials, also other users can still use it.

For such a reasons there is CATALINA_BASE environment variable which specifies part of Tomcat directory structure which must be per Tomcat instance unique, contains server configuration and which is writable. Therefore user will first need to create such data. The easiest way is to copy it:

$ cp -r /var/tomcat6/ ~/tomcat

User can then start Tomcat as follows:

$ CATALINA_BASE=~/tomcat /usr/tomcat6/bin/catalina.sh start

And of course to stop it:

$ CATALINA_BASE=~/tomcat /usr/tomcat6/bin/catalina.sh stop

Friday May 23, 2008

Have you played your OpenSolaris today?

I did. And it wasn't on Atari as one would guess from paraphrasing one old commercial but really on OpenSolaris 2008.05.

In reality it was Windows game running via Wine 1.0rc1.

The game was Live For Speed S2 (LFS) which is reported in Wine application database as running very nice. And indeed it is...

Live for Speed S2

Notes:

\* The game was without sound as currently Solaris doesn't compile Wine with audio support out of box.
\* You need to have accelerated graphics of course (I used nVIDIA Quadro FX 370).
\* Screenshot was taken with desktop as kind of evidence but of course you can switch to full screen.
\* After LFS installation I had to change current directory to LFS folder and start game like this:
cd ~/.wine/drive_c/Program\\ Files/LFS; wine LFS.exe
\* In order to compile Wine under OpenSolaris 2008.05 you will need Xorg development headers.
\* For running it on Nevada you must be on or above build 85 (see also my previous blog entry).

Monday Apr 21, 2008

Let's check out Wine on OpenSolaris

Last Friday Wine community released Wine 0.9.60. As Wine 1.0 is approaching (see schedule) it would be nice to make some love to Wine on Solaris and check out how is Wine doing comparing to Linux (main Wine development platform).

For compilation you need to have i386 box and recent Solaris (I used Nevada build 83). And then do just usual stuff:

CFLAGS=-std=gnu99 ./configure --prefix=/opt/wine
gmake install

Notes:

- you need to have /usr/sfw/bin in your PATH (because of gcc)
- above CFLAGS are needed as workaround for #12008

Sunday Jan 20, 2008

My favorite Windows photo application running now on OpenSolaris via Wine

There are only few things which prevent me to remove Windows from my laptop and use OpenSolaris exclusively on it. One of them is good application for photo managing and processing.

I use Zoner Photo Studio (ZPS) which is application for people like me. While I do like taking picture I'm not willing to do any complicated post processing in GIMP for just fixing red eyes or bad horizon. This kind of application lets me to do this and many more similar tasks within few intuitive clicks. Problem is that it's Windows application. So up till now I had to chose whether I want to work or manage/view my pictures. Changing between these tasks would eventually mean to reboot from one operating system to another.

And here cones Wine which is Open Source implementation of the Windows API for Unix systems. So, Why not to run ZPS using Wine? Wine was historically primary develped for Linux systems and few years ago when I tried to compile it for Solaris it wasn't possible. But now it compiles!

Configuration

Solaris Nevada (build 78)
Wine 0.9.52
Zoner Photo Studio 10 (build 7)

One rather minor compilation problem I had with Wine is described in following mail thread on OpenSolaris-discuss:

http://www.opensolaris.org/jive/message.jspa?messageID=191854#191854

Screen shot

Zoner Photo Studio is really running under OpenSolaris. Note that it's Czech version of ZPS.

ZPS

Stability and usability

While screen shot of ZPS running on OpenSolaris looks very nice there are still some problems. The main problem I see is stability where whole application tends to crash because of X protocol errors [e.g: BadAccess (attempt to access private resource denied)]. There are also other rather minor problems like not receiving events from file system and thus not refreshing content of current directory.

Speed

Speed is very positive surprise for me. While some content redrawing after window resize is rather slow all others seems to be fast. If I say fast I mean really fast and probably faster then any comparable native application I have ever seen on Solaris.

To support this I have created kind of benchmark test. It was based on comparison of duration for JPEG file resizing using ZPS and graphical application bundled with Solaris. For test I used a directory with set of high resolution JPEG files (46 files with resolution up to 3456x2304 and total size of all about 146MB).

As native Solaris application I used convert command which comes with ImageMagick software suit. I tried to set comparable JPEG parameters as much as I was able. Finally there was still some difference because resulted files from ImageMagick were about 16% bigger then files from ZPS.

Following command was used to measure ImageMagick:

time find ZONER_SPEED/B/\*.JPG -exec convert {} -sampling-factor 2x1 -quality 98 -resize 1280x853 {} \\;

For ZPS I set equivalent parameters however time measurement had to be done manually (as for GUI application time command was useless).

Results were following:

ImageMagick 2m41.5s
Zoner Photo Studio 0m54s

It means that ZPS was almost three time faster!

Why is that? Probably ZPS code is more optimized (especially JPEG DLL used in ZPS against JPEG library in Solaris)?

ZPS speed test

Specific support for running under Wine

Interesting is also possibility to switch ZPS to special mode where it won't use some specific Windows resources (in this case Internet Explorer). This is done via creation of specific file in program directory (more info on this can be found on Zoner Wiki in Czech).

Thursday Nov 16, 2006

Sun Tech Days Praha/Prague 2006 (photos)

Last three days I spent at Sun Tech Days in Prague. Solaris team in Prague prepared for this event four stands where we answered questions by attenders regarding OpenSolaris. We had stand for OpenSolaris installation, BrandZ, DTrace and Sun Rays. I was volunteering on BrandZ stand. Our presentation was mainly prepared by Vita Batrla and it consisted from several Centos zones using ZFS cloning feature. There were several nice discussions about it and virtualization at all. But I also attended several interesting talks at OpenSolaris track, plus hang about through congress center with its really nice views on Prague and took some photos:

SUN TECH DAYS SUN TECH DAYS
SUN TECH DAYS SUN TECH DAYS
SUN TECH DAYS SUN TECH DAYS SUN TECH DAYS

You can see more pictures from this event in my flickr set.

Thursday Oct 26, 2006

SNIA CIFS confererence and plugfest 2006

In middle of September (18-21, 2006) Jiri Sasek and me attended this year Storage Developer Conference. Since one of our tasks in Sun is to maintain Samba server bundled with Solaris Operating System, this conference is important for us with its CIFS track and mainly CIFS/iSCSI plugfest.

The conference was organized by Storage Networking Industry Association (SNIA) and it was held in Doubletree Hotel in San Jose as last year, when we attended for the first time.

CIFS/iSCSI plugfest is meant as opportunity for various vendors to test their product within friendly and confidential environment. And that's what we did.

First day was rather affected by setting everything for later testing. This works were at least twice disrupted by Emergency evacuation when everybody had to leave the building. Some apologizing woman at doors said, it might have been caused by air conditioning system. I don't know, but at least I could take picture of some Samba core team members in day light.

SAMBA team unsheltered

Our testing environment was built on Sun Fire T2000 fully loaded with eight CPU cores (overall 32 processing threads) and 32 gigs of memory. We chose this sever, beside its popularity and its catchy sex appeal, mainly because we were planning to run several versions of Samba server at the same time using Solaris Containers (zones). I was positively surprised that while this computer belongs rather into server room it wasn't the most loud hardware at the plugfest. We had installed this system with Solaris 10 6/06 (aka update 2) and we were testing on it our latest version of Samba 3.0.23c (ADS support) and also latest developing version of Samba 4.

Side the CIFS track at the conference, it was not so rich as at last year event. This was little bit disappointment to me. There was only one afternoon dedicated for CIFS with following talks and finally "Chalk Talk":
- Exploring the SMB2 Protocol, Andrew Tridgell
- Multihead Samba Export using GPFS, Sven Oehme
- Update on CIFS Unix Extensions, Jeremy Allison and Steve French

Beside Samba team and other people from industry we could meet also some our CIFS colleagues from Sun. On CIFS plugfest it was mainly Afshin Ardakani torturing his NAS Storedge and on conference it was Pavan Mettu (aka Reddy) one member of our CIFS client team. I believe next year they will be testing our CIFS FS for the first time. However "torturing" CIFS client is in many ways more complicated then server and mainly you cannot use SMB torture tool.

Overall it was good opportunity to meet people and discuss issues and I am looking forward for next year event. Especially it might be very interesting if CIFS plugfest is held at Starbuck coffee as Andrew Tridgell joked at one point during his speech ;-)

Friday Oct 13, 2006

Apache 2 support for files larger then 2GB

Recent patches for Solaris 10 operating system newly enable Apache 2 Web Server ability to serve files larger then 2GB:

120543-06 Synopsis: SunOS 5.10: Apache 2 Patch
120544-06 Synopsis: SunOS 5.10_x86: Apache 2 Patch

This change can be also found in OpenSolaris since bulid 46 (Nevada SFW project).

Why am I mentioning this? Because you might bump into some problems when upgrading to this version without proper reading of patch README file.

According to information from official Apache web pages you might get feeling that larger file support for 32 bits binaries is available from version 2.2 only. But it's not true as you can find out from Apache 2.0 ChangeLog. It's is fully functional from version 2.0.53.

But to have large file support working you have to use proper compilation environment (see lfcompile(5)). This for Solaris OS means to define macro _LARGEFILE_SOURCE to be 1 and _FILE_OFFSET_BITS to be 64.

And here comes the problem. Since these definitions change size of off_t which is used by different Apache modules and since we didn't use these macros before, all third party Apache 2 modules must be recompiled with these macros to run correctly. If you don't do it, you will most likely see Apache 2 Web Server crash with segfault during its start.

So, please recompile your modules and if you cannot use apxs to build entirely your module, you can obtain proper macro definitions issuing following command:

/usr/apache2/bin/apxs -q EXTRA_CPPFLAGS
-DSOLARIS2=11 -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64

Enjoy sharing your DVD images and other big files via our Apache 2 :-)

Wednesday Apr 19, 2006

CZOSUG #7 - Watch now! (video link included :-)

Ok, it's little bit late, but why not to mention this. Last week there was seventh CZOSUG meeting with two presentations. First was about Sun Grid Engine. It was done by Lubos Kosco (sorry Lubos, I didn't manage somehow to take picture with you) and Martin Man. Btw, they showed us their small "red" grid in action.

The other presentation by Frank Hofmann was about writing OpenSolaris filesystem drivers. This time everything was recorded and you can watch it or lesson to audio record.

IMG_5321 IMG_5325
IMG_5319 IMG_5330

Monday Mar 13, 2006

Photos and some notes from Saturday's OpenSolaris BootCamp and InstallFest

Last weekend we had here in Prague just another OpenSolaris event organized by CZOSUG. This time it was BootCamp and InstallFest.

BootCamp Invitation

It was held in one of the Charles University buildings in very center of Prague. You can see that the building is very old. I was warned, that there can be ghosts in there. But I am used to them, so it wasn't problem for me...

Very old building Castle could be also seen from window
Saint Micolas from window

In the morning there was one presentation by Martin Cerveny about things you should know to be able to do basic administration of Solaris box. At that time organizers were finishing preparations for InstallFest.

Martin Cerveny speaking, speaking... Quite a lot of people
Preparations BootCamp Organizers

InstallFest itself started in the afternoon. There were several guys who really came and installed Solaris. We could see different types of hardware. Hopefully more on that will have Lukas in his blog entry. I would also mentioned nice debat with guys from Czech SuSE. Yes, we don't support bluetooth nor OpenSolaris will boot on ARM, but wait. We will see in a few years.

InstallFest - OpenSolaris goes to Dell (or hell? ;-) InstallFest
InstallFest InstallFest
InstallFest OpenSolaris or Penguin
InstallFest

In Paralell with InstallFest, BootCamp continued with yet another presentation by Martin Cerveny about driver development and presentation about USB devices and mainly connecting USB CDMA modem to Solaris by Vita Batrla and Milan Jurik.

USB CDMA modem presentation USB CDMA modem presentation

Tuesday Jan 31, 2006

NexentaOS (elatte) Alpha 2 released

New version of another OpenSolaris distribution Nexenta is out. Seems a lot of changes is in it: new installer, KDE, Wifi support and lots of others... Will have to check it. The only problem for now is that the live CD is not linked anywhere on their pages. One must be patient :-)

Friday Jan 27, 2006

SchilliX 0.4.3 – Go Schilli, Go, Go...

New version of OpenSolaris distribution SchillX was announced today. It's based on OpenSolaris build 31.

Wednesday Jan 11, 2006

Author of SchilliX in Prague (CZOSUG)

Yesterday there was just another Czech OpenSolaris user's group meeting (CZOSUG). It was fourth such a meeting and this time we had a special guest - Jörg Schilling, the author of SchilliX and cdrtools.

There were two presentations. First was done by Jörg Schilling and it was about background of the first OpenSolaris distribution - SchilliX. He explained how he could come with this distribution so soon after sources of OpensSolaris were published, problems to which he had to face (and how long it took him to solve them). He also mentioned cooperation between people around SchilliX and Blastwave. He plans made Blastwave packages to run with SchilliX as soon as X Server and Solaris package database will be incorporated. Schilling also mentioned PowerPC port of Operating System Solaris (also known as Polaris). He expects first version of SchilliX for PowerPC this summer.

Interesting was also later discussion where Jörg explained his attitude towards some GNU tools and explained why he introduced some of his tools: strar, smake, sfind (note that ssh is not abbreviation for Schilliy's shell and it has nothing to do with Schilling ;-). But overall I got very nice feeling about Jörg and I think it's great we have such a people in OpenSolaris community.

After small break Frank Hofmann talked about Operating System Virtualisation. He has got nice overview of the topic but some of us were missing some practical examples on live system (BrandZ). But anyway it's great to have Frank coming to Prague regularly.

Overall it was nice evening and it seems that number of attending people is growing. My roughly guess for number of attenders was about forty heads.

About

psum

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today