Disclaimer

The views expressed on this blog are my own and do not necessarily reflect the views of my employer.

Thursday, July 31, 2008

Wine on Solaris and Linux


Wine -- the one and probably the only tool for Solaris, Linux (& Unix too) to execute a *.exe file. Actually , "Wine is an Open Source implementation of the Windows API on top of X, OpenGL, and Unix." Wine is available for solaris , bsd unix and various linux distros ( Redhat, Fedora, ubuntu, debian... n more), Check out the full list and get wine now !!

** I think wine installation as root will never create any problem to the system , but running wine as root may give windows viruses access to the system. So it's wise to be a bit careful while working with wine.

I tried wine on various solaris distributions like Solaris 10, SXDE (Solaris Express Developer Edition) 9/07 , SXDE 1/08 , OpenSolaris 2008.05 etc. and found 3 different ways of wine installation.

I) Build from source : Probably the most native way , but worked for me on SXDE 1/08.
What I did to install wine in my system is the following :

1) Download wine from here. Mine version was wine-1.1.0 , it was a *.tar.bz2 file.
2) Extract files using gui tool.
3) copy the wine directory to /opt, and navigate to that directory.
#cp -r /export/home/ritwik/Desktop/wine1.1.0 /opt
#cd /opt
#cd wine1.1.0
4) Add /usr/ccs/bin and /usr/sfw/bin to the path.
#PATH=$PATH:/usr/ccs/bin:/usr/sfw/bin
5) perform "#./configure" . During that process I came to know that in my system some development files were missing :

#./configure

--------------------- many lines omitted ----------------------------------
configure: libXxf86vm development files not found, XFree86 Vidmode won't besupported.
configure: libxrandr development files not found, XRandr won't be supported.
configure: libsane development files not found, scanners won't be supported.
configure: liblcms development files not found, Color Management won't be supported.
configure: libldap (OpenLDAP) development files not found, LDAP won't be supported.
configure: libcapi20 development files not found, ISDN won't be supported.
configure: libcups development files not found, CUPS won't be supported.

configure: Finished. Do 'make depend && make' to compile Wine.

6) Then I tried gmake , it was completed with some warnings like :

regsvr.c:633: warning: visibility attribute not supported in this configuration; ignored
regsvr.c:633: warning: visibility attribute not supported in this configuration; ignored
regsvr.c:633: warning: visibility attribute not supported in this configuration; ignored
regsvr.c:633: warning: visibility attribute not supported in this configuration; ignored

I got the same warning (i.e visibility attribute not supported in this configuration)from a lot of *.c files during this GNU make process.

7) Anyway , after that I added the path to the .profile file at my home. I just append this line to the file :

PATH=$PATH:/opt/wine-1.1.0

8) Now I can use "$wine *.exe" to execute a *.exe file.

I tried this method on SXDE 9/07. Check out what happened.

II) Solaris 9 and 10 : I think Blastwave.org provides the best possible way with different flavors of wine and complete installation instructions. Check out here !

III) Doug Scott's wine build instruction : Applicable for open solaris distros like SXDE (Solaris Express developer Edition ) . Check out Doug Scott's CBE wine build instruction from here !

I tried all of the above said methods on OpenSolaris 2008.05. Here is my experience.

I am also a fedora linux user , and I used to download and install wine on fedora ( Fedora 7, 8, 9) by using yum. One simple "#yum install wine" command does everything !

HP printer behaving strange on OpenSolaris 2008.05

I have a HP Deskjet 3745 printer and trying to print a page from Open Solaris 2008.05 platform. First I tried to configure my printer in the system. I did it in the following way -
1) I connect my printer to the system and powered it on.
2) system -> administration -> print manager
and Solaris print manager was opened.
3) Tools -> Find printer
This tool was able to find my printer and add it to the system. Check out the screenshot.


After that I found my printer in solaris print manager.


Again , a printer icon on the panel told me that the printer is online and ready to print.


I opened a pdf file to take a print , and I was happy to found my printer in the options.


I clicked the 'Print' button , and after that..... No reaction in my printer !!! I opened a text file (written using gedit editor) , but my printer was not present in the 'Print' option. I tried an image file (jpeg) , my printer was present in the options, but again no reaction after clicking the print button.

Finally I was not able to take a printout from any kind of file though my printer is working perfect when I am using a different operating system.

Do you have any idea ?? Please comment ...

Thursday, July 10, 2008

OpenSolaris - Linux file sharing (Fedora 7 and OpenSolaris 2008.05)

I am using NFS to share some files between my linux and open solaris system. I am working behind a router which connects my desktop pc and my laptop . My desktop pc has OpenSolaris 2008.05 installed with ip address 192.168.1.105 and Fedora 7 is installed in my laptop with ip address 192.168.1.102.

I have configured my fedora system in the following way :

*A ping test to make sure that they are reachable to each other.

[root@ritwik ~]# ping 192.168.1.105
PING 192.168.1.105 (192.168.1.105) 56(84) bytes of data.
64 bytes from 192.168.1.105: icmp_seq=1 ttl=255 time=3.53 ms
64 bytes from 192.168.1.105: icmp_seq=2 ttl=255 time=1.18 ms
64 bytes from 192.168.1.105: icmp_seq=3 ttl=255 time=1.18 ms
64 bytes from 192.168.1.105: icmp_seq=4 ttl=255 time=1.16 ms
64 bytes from 192.168.1.105: icmp_seq=5 ttl=255 time=1.30 ms
64 bytes from 192.168.1.105: icmp_seq=6 ttl=255 time=1.44 ms

--- 192.168.1.105 ping statistics ---
6 packets transmitted, 6 received, 0% packet loss, time 5000ms
rtt min/avg/max/mdev = 1.161/1.636/3.537/0.856 ms

** System -> Administration -> Server settings -> services.
I looked for NFS service and make sure that's running.

*** System -> Preferences -> system -> NFS.
click on 'Add'. I selected '/home/ritwik/study' directory to share .
Host(s) : 192.168.1.105
I checked 'Read-Write'.

now , /etc/exports was looking like :

/home/ritwik/study 192.168.1.105(rw,sync)

I have also checked the following :

[root@ritwik ~]# exportfs -rv

exporting 192.168.1.105:/home/ritwik/study
[root@ritwik ~]# showmount -e
Export list for ritwik:
/home/ritwik/study 192.168.1.105

My firewall service trusts NFS4 as trusted service , though I have used NFS version 3 to mount shared files.

Now configuration details for OpenSolaris 2008.05 :

*A ping test to make sure that they are reachable to each other.

-bash-3.2# ping 192.168.1.102
192.168.1.102 is alive
** Go to services. (for OpenSolaris 2008.05, browse it from system -> administration -> Services). Activate NFS services.

*** Go to Administration -> Share Folder. Click on 'Add'.

1)Now select the path to the folder you want to share , by default your home directory will be selected. I have shared '/export/home/ritwik/softwares'.

2)Share with : NFS

3)Click on "Add Host"

Allowed hosts : Specify IP address
enter IP address : 192.168.1.103
Check out the 'Read Only' box in Hosts settings if necessary.

Click OK to exit the wizards.

Optional Steps :

Now check out whether NFS server is running properly :
# svcs network/nfs/server
You should get a result like :

STATE STIME FMRI
online 21:22:11 svc:/network/nfs/server:default

Now check out Shared files :
#exportfs
From my laptop I got a result like :

- /export/home/ritwik sec=sys,ro=192.168.1.105 ""

and from my desktop,

- /export/home/ritwik/softwares sec=sys,ro=192.168.1.103 ""

You may also check /etc/dfs/dfstab , the file in my laptop was looking like :

# Do not modify this file directly.
# Use the sharemgr(1m) command for all share management
# This file is reconstructed and only maintained for backward
# compatibility. Configuration lines could be lost.
#
# share [-F fstype] [ -o options] [-d ""] [resource]
# .e.g,
# share -F nfs -o rw=engineering -d "home dirs" /export/home2
share -F nfs -o sec=sys,ro=192.168.1.105 /export/home/ritwik


Now , I make a mount point in my fedora system.

[ritwik@ritwik ~]$ mkdir OSolShare

Then I used the following command to mount OpenSolaris shared files in that directory :

[root@ritwik ~]# mount -t nfs -o vers=3 192.168.1.105:/export/home/ritwik/mysql/docs /home/ritwik/OSolShare

Then I was trying to mount fedora shared files in my Opensolaris system.

first I make a mount point :

ritwik@ritwik:~$ mkdir linxShare

then I tried the following command :

-bash-3.2# mount -F nfs -o vers=3 192.168.1.102:/home/ritwik/study /export/home/ritwik/linxShare

but got the following error :

nfs mount: 192.168.1.102: : RPC: Rpcbind failure - RPC: Timed out
nfs mount: retrying: /export/home/ritwik/linxShare
nfs mount: 192.168.1.102: : RPC: Rpcbind failure - RPC: Timed out
nfs mount: 192.168.1.102: : RPC: Rpcbind failure - RPC: Timed out
nfs mount: 192.168.1.102: : RPC: Rpcbind failure - RPC: Timed out

then I checked whether rpc is running :

-bash-3.2# ps -ef | grep rpc
daemon 339 1 0 23:28:42 ? 0:00 /usr/sbin/rpcbind
root 896 716 0 00:30:12 pts/2 0:00 grep rpc

which means rpc is running !!

Now I am trying to solve this problem... I'll post the solution asap.