Ponderings of a kind

This is my own personal blog, each article is an XML document and the code powering it is hand cranked in XQuery and XSLT. It is fairly simple and has evolved only as I have needed additional functionality. I plan to Open Source the code once it is a bit more mature, however if you would like a copy in the meantime drop me a line.

Atom Feed

Connecting to OpenIndiana by XDMCP

Enabling XDMCP in OpenIndiana

I have a small NAS which I have built which run's OpenIndiana oi_151 and I wanted to be able to headlessly administer it, whilst I have SSH and thats all I really need, sometimes its nice to use a remote desktop environment.

XDMCP is a fundamental part of the X Window System, and one feature it offers is the ability to export your display across a network.

To enable XDMCP on OpenIndiana simply modify the XDMCP section in the file /etc/gdm/custom.conf so that it looks something like this -

# GDM configuration storage







Now you just need to restart the GDM service -

$ sudo svcadm restart gdm                

Thats all there is to it!

Testing the XDMCP Connection

To connect to the XDMCP server, you need an X Server for your client machine, for Windows you can use Xming, or if you are on a Linux/Unix like platform you could use Xephyr, Xvfb, Xnest or similar. Personally im on MacOSX and Xephyr works very well for me -

$ Xephyr -query mnemosyne                

Screenshot of MacOSX Xephyr connected to OpenIndiana

Adam Retter posted on Saturday, 23rd July 2011 at 17.02 (GMT+02:00)
Updated: Saturday, 23rd 2011 at July 17.02 (GMT+02:00)

tags: OpenIndianaXDMCPMacOSXXephyrSolaris

0 comments | add comment

Installing Netatalk on OpenIndiana

ZFS for Mac Storage and Time Machine

It is possible to configure your OpenIndiana system to operate as a file server for your Mac using the AFP protocol, and if you have lots of lovely ZFS storage attached then it makes lots of sense. You can also configure OpenIndiana to act as as Time Capsule for your Mac's Time Machine!

The instructions below relate to OpenIndiana oi_151, and Apple Mac OSX Snow Leopard, however the procedure is probably much the same for all OpenIndiana versions. The Time Machine configuration does not work yet for Apple Mac OSX Lion, when I figure this out I will post the details.

Configuring OpenIndiana as an AFP File Server

First you need to install the pre-requisites for building Netatalk on OpenIndiana. You need gcc and BerkelyDB -

$ sudo pkg install gcc-dev 

You can download Berkeley DB from here. There are reported issues with version 5 and Netatalk, and so I used the latest 4.8 release. You then need to build and install Berkeley DB -

$ tar zxvf db-4.8.30.tar.gz
$ cd db-4.8.30/build_unix
$ ../dist/configure --prefix=/usr/local
$ make
$ sudo make install

Netatalk is a software package that acts as an AFP server. You can download Netatalk from here. You then need to build and install Netatalk -

$ tar xvjf netatalk-2.1.5.tar.bz2
$ cd netatalk-2.1.5
$ ./configure
$ make
$ sudo make install

After the install, Netatalk will be configured to share each users home folder. If you have additional folders that you wish to share with all users via. AFP you need to add them to /usr/local/etc/netatalk/AppleVolumes.default. I added these entries for my system -

/thevault/private/%u Private allow:@vusers
/thevault/public Public allow:@vusers
/thevault/timemachine TimeMachine allow:aretter

If you have different requirements for different Users then you can copy /usr/local/etc/netatalk/AppleVolumes.default to a Users home folder as AppleVolumes or .AppleVolumes and override the share settings for the user there.

If you want your AFP File Server to be auto-magically found via Apple's Bonjour service, you need to configure an Avahi service, this is done by creating the file /etc/avahi/services/afpd.service -

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
    <name replace-wildcards="yes">%h</name>

You now need to enable the Netatalk service and also the Avahi service, if you configured it above. Avahi also requires the Multicast DNS service -

$ sudo svcadm enable dns/multicast:default
$ sudo svcadm enable system/avahi-bridge-dsd:default

$ sudo /etc/rc2.d/S90netatalk start
Configuring TimeMachine on the Mac

If you created a TimeMachine AFP share above and wish to use your OpenIndiana server as a TimeCapsule also, then firstly you have to tell the Mac to allow unsupported network volumes for Time Machine. This can be done from the thusly -

$ defaults write TMShowUnsupportedNetworkVolumes 1

You need to create a sparse disk image file, which will be used for the content of the TimeMachine backups. This can be done with the The naming of the disk image is quite specific and should be of the form hostname_MACaddress.sparsebundle. e.g. -

Find your hostname -

$ hostname

Find your MAC Address -

$ ifconfig
    ether 90:27:e4:ea:7b:d4 
    inet6 fe80::9227:e4ff:feea:7bd4%en1 prefixlen 64 scopeid 0x4 
    inet netmask 0xffffff00 broadcast
    media: autoselect
    status: active

Now substituting your own Hostname in place of 'hollowcore' and your own MAC Address in place of '9027e4ea7bd4' -

$ hdiutil create -size 300g -type SPARSEBUNDLE -fs JHFS+ -volname 'Backup of hollowcore' hollowcore_9027e4ea7bd4.sparsebundle                

Screenshot of MacOSX Connect to Server dialogYou should now mount your Time Machine share through the Finder by clicking Go -> Connect to Server... Entering afp://your-openindiana-hostname-here and then selecting the 'TimeMachine' share. You now need to copy the above Image file that you created to the mounted share.

Screenshot of MacOSX Time MachineYou can now launch TimeMachine, click 'Select Disk', wait for the mounted 'TimeMachine' share to appear and then click 'Use Backup Disk'.

Adam Retter posted on Saturday, 23rd July 2011 at 15.57 (GMT+02:00)
Updated: Saturday, 23rd 2011 at July 15.57 (GMT+02:00)

tags: OpenIndianaMacOSXTime MachineAFPNetatalkAvahiSolaris

3 comments | add comment

Tag Cloud