Nov 13

Fixing DAViCal and PostgreSQL on Ubuntu 11.10 (Oneric Ocelot)

DAViCal is a great server for calendar sharing. It is an implementation of the CalDAV protocol which is designed for storing calendaring resources (in iCalendar format) on a remote shared server. I have used it for sharing with my wife and I at home with our iPads, iCal on OS X and iPhones to allow us to have a shareed schedule for the house and our events. There are now other options like Google Calendar and iCloud, but I still like to run my own stuff and control my own data. DAViCal was running fine for me over the last year or so, but it stopped ater I did my recent upgrade to Ubuntu 11.10 server for mergy.org. I deleted it all and did a reset from scratch on the calendar setups.

After spending some time this weekend getting this fixed again, I found some simple fixes that aren’t out there yet in the docs. My problems were related to the PostgreSQL version bump to 9.1. Hope this is helpful if you are seeing issues with this as I have.

The installation page for DAViCal is pretty close, but now with PostgreSQL 9.1, things have changed a bit.


1. Slight Adjustments to the Database Setup

You can install DAViCal via the

$ su apt-get install davical

but the files in /usr/share/davical/dba need to be modified because PostgreSQL 9.1 uses port 5433 instead of 5432 as PostgreSQL did.

From the DAViCal Installation Docs

BUT Before you attempt to run this script to do the setup

/usr/share/davical/dba/create-database.sh

you need to modify

/usr/share/davical/dba/update-davical-database

Change this line under  ”Options variables” towards the start of the file to

my $dbport = 5433;

then you can run the create database script.

 

2. Adjust the DAViCAL Configuration in /etc/davical/

Under the DAViCal configuration area, you should change the port to 5433 as well for your setup config.

From the DAViCal Installation Docs

In the pg_connect line, change the port to 5433 to get it to work with PostgreSQL defaults.

After doing those items, I was able to get back up and running and hit the web interface for DAViCal (depending on how you setup the Apache stuff) and add users / groups / resources. Because we don’t have a lot of accounts, it wasn’t that big of a deal. DAViCal has been a great way for us to share dynamic calendars for personal events and sync OTA.

 


					
Sep 29

Host Only Networking Setup With VMWare Fusion 4

 

I have used VMWare Workstation and Fusion for many years now on Linux, Windows and Mac OS X host operating systems. I have used the “host only” networking on Windows and Linux host operating systems, but never on OS X with VMWare Fusion until recently when I had the need to test some new firewall software setups.

On VMWare Workstation or Server, it is pretty easy to set network addresses for the virtual networks and hosts, but turns-out it is kind of a pain with VMWare Fusion (the Mac app.) For whatever reason, they didn’t include the configs in VM configuration GUI. This makes the whole setup more of a pain than it should be. I suppose they didn’t add this level of configuration because of the way the VMWare Tools may or may not integrate with the guest OS or something in OS X. Also, maybe Mac users just don’t really request the need to have this in a nice GUI due to lack of overall interest. Whatever the case, there are some great reasons to have it operational.

In testing the recently released IPCop 2, I needed to play around with settings and see how the configurations I use in production would and could work on the new build. VirtualBox, VMware and Parallels are great applications for these sorts of development testing situations. I have always had a preference for VMWare because of their commitment to have the vm images be able to move back and forth between host operating system applications versions of VMWare. It has come in handy many times when I have moved from Windows to Linux or back as I have changed my main operating system.

By default, a VMware Fusion guest OS will initial be setup with an initial network interface. You can set in the VMWare settings whether you want it to act as a NAT or Bridged. That is all standard, in the VMWare Fusion application host config settings. In my case, I need the VMWare guest to have at least two network adapters so I can test different network nodes as I try to mimic servers with multiple physical network cards running the Linux-based firewall. So, in my case, I added an additional network adapter in the guest settings interface.

VMWare Fusion 4 Guest OS Settings

At each of the network adapters, you can set the use setting. In my situation, I  wanted the first network adapter to be used to provide access to the real network my MacBook Pro is using to access the real network (wired or ethernet) on the machine.

It will want to make the first network adapter use NAT by default so nothing crazy here except, I did flip the “Advanced options” and generated a MAC address and kept generating addresses until I got an “A” in the final segment so when I am testing and looking and packets coming and going from device addresses, I can know that the host with the “A” is this first network adapter. You don’t need to do this, but if you can insert some sort of label to help troubleshoot or tag traffic/addresses/information in this sort of setup is useful to me. My VM is titled “ipcop2″ but it could have been titled “Linux” or something else.

VMWare Fusion 4 Network Adapter 1 Settings

The second network adapter is when I dip into virtual / host only world. I create it and designate it as a private network only available to the host mac I am running VMware Fusion 4 on, then keep generating a MAC address until I get one that has a “B” in the final segment to continue the configuration pattern of tagging the network interfaces.

VMWare Fusion 4 Network Adapter 2 Settings

I also had to go into the guest OS and assign the virtual network interface to the correct address that matched the one I will put in the VMware config for the host only. Because it was IPCop 2, it looks like this. But, your setup will differ if you are running something else and want a fixed ip across the configs.

Assigning Virtual Host Only MAC To IPCop Green

Assigning the NAT MAC To IPCop RED

Assigning the fixed IP to the virtual network host only adapter in the guest OS (IPCop)

Then I went in a edited the networking file where VMWare maps the IP addresses to the virtual network interfaces. In VMWare Fusion 4, they moved it to /Library/Preferences/VMWare Fusion from the previous location under Application support. I gave my private network adapter a fixed IP in the reserved space since I will also be assigning the address to one of the settings in the guest host as a fixed address. You can hit this via an OS X terminal.

$ sudo vi /Library/Preferences/VMware\ Fusion/networking

and modify to assign the interface a IP. My example is changing it from the default setting or DHCP and setting it as 10.111.1.1

editing /Library/Preferences/VMWare Fusion/networking

Anytime you modify this config, you need to restart the the VMWare Fusion application to get it to use the new settings. I would also restart and confirm the settings in the guest host on network addresses on any testing or modifications. After all settings and restarts of guest OS (if they were in a suspended state) and the VMWare Fusion app, make sure the ping the address. You can also arp -a the network from the OS X terminal to see if you get a bite. You should see the MAC address you generated and the IP you set in the networking config.

arp -a in OS X terminal confirms vm network address

This process will at least get you a basic host only networking between the host and guest OS in a contained way. It is my hope that VMWare makes this easier in later updates of VMWare Fusion 4 and regardless of what host OS you are running (Windows, Linux, Ubuntu, etc.) At the time of this post, we were at VMWare Fusion 4.0.2.

Feb 12

Desktop Paging Finally Back On Mac OS X

After the demise of Codetek’s Virtual Desktop a few years ago, many Mac users who love desktop paging and virtual desktops were left with no real options. CodeTek’s software was actually very nice, but they just stopped updating it perhaps due to major OS changes from Apple or the developers disbanded. The website is still up for some crazy reason http://codetek.com/ctvd/ and they continue to sell a product that doesn’t work on OS X versions beyond 10.4. I hope people are not being taken, but who knows.

Apple came out with Spaces in meant to provide some level of functionality along the lines of traditional virtual desktops, but Spaces on it’s own is pretty worthless and more of a hassle then a benefit for many of us who typically have a dozen or so applications running simultaneously and constantly bouncing back and forth. Exposé is another tool that Apple includes as part of the OS starting in OS X 10.5 onward, but again, not very helpful and most just get confused by it.

Enter the newly released Hyperspaces from The Cocoabots. I was dubious that it could provide something close to the wonderful utility built-into all Linux GUIs from CentOS and RedHat to Ubuntu in Gnome or KDE. Good news is that it comes pretty close yet still feels very Mac-like. It works in conjunction with Apple’s Spaces to get me back in business with multiple virtual screens to leave applications open and maximized in their ready positions. The setup with Spaces and Hyperspaces is also aware and capably of handling apps based in X11 and in Windows VMWare apps like Internet Explorer.

Here are some screenshots of my setup -

My only issue would be that I do miss the option to have a floating palette switcher option or to be able to put the switcher in the menu bar full-time. But, this tool is a major, major help for me and I am sure in future versions, more options will be available and the product will continue to improve. It is well worth the $10 though in the OS X App store. If you just want to try it, you can via the website download, but you can only work with three desktops which will not be enough when you really get used to working effectively with desktop paging.

Oct 13

Fixing issues with Gallery 2 Import to Gallery 3

http://gallery.menalto.com/

I have used Gallery for over 7 years or so now and really have found it incredibly valuable to have to share pictures with family and friends. I have migrated through many version updates and now that Gallery just released the flashy looking Gallery 3, I wanted to go ahead and move to that. We have a personal image collection of about 12,000 images or so in our gallery that we have been adding to over the many years and knew an upgrade to the new version 3 was going to be a challenge. I moved off version 1 a couple of years ago and was not really happy with version 2 and the various updates so that was another big reason I wanted to get the new GUI tools and look of the Gallery 3 environment.

To upgrade to Gallery 3, you need to really install 3 in a separate directory, create a new database in mysql and get that all squared-away first then enable the Gallery 2 import module and import your existing Gallery 2 setup and albums. This is a departure from previous updates in that you really need to get a clean parellel struture up and running then run the old environment through the import/scrubbing process. Documentation for this is sparse at the moment since Gallery 3 just really was formally released last week or so.

Anyway, so you do that and I what I did was get that all going by creating a mysql db for Gallery 3 data tables and ran the Gallery 3 installer, etc. and enabled the G2 Import, pointed the importer at the old G2 install path and watched as it grinded-away at the import of the 12k or so images. But, after the multiple hour import process was done, it was a mess in that I didn’t have thumbnails of images at the smallest or resized sizes. I checked the Gallery 3 Forum, but not much help yet. So, I thought, let’s just redo the setup and try the import again. I did and was really careful about permissions in the Apache directory where the new Gallery was going to be and everything, but still no dice. I did notice that when I click through down to the full-sized image, it was present – it was just the the small thumbnail and resized thumbnails were hosed (not present).

At the unix-level, going into the new location where G3 wants to put albums – now in (GalleryDirectory)/var BTW, I noticed for whatever reason there were no thumbnails in the album sub-folders. So, went into the Admin area and did all the Maintenance stuff, but no dice either. The generic ‘Fix’ option that goes through the various low-level checks was no help. Also, the ‘Rebuild Images’ came back with zero images for whatever reason.

I was able to get to a solution by kicking-off a rebuild through the Theme Options under the Admin>Appearance menu. If you do that and change your ‘Thumbnail Size’ and ‘Resized Image’ size, it wants to kick-off a total rebuild for out-of-date files. You will get a prompt at the top of the browser window to have the rebuild go. Even if the values are correct, I changed them to a different value, let the rebuild run and then changed them back and let it run again.

Gallery 3 Theme Options Modified

Gallery 3 Image Rebuild

After making the Theme Options changes and kicking off the rebuild you have to sit for a while and it grinds but after, you will get your thumbnails and resized images back. This is something to try in case you make the plunge and your Gallery 2 Import to Gallery 3 doesn’t fully take. I am sure later versions will check for this, but for now it is a workaround.

Sep 15

Using VLC as a workaround for DVD Region Codes

Despite industry efforts to enforce DVD region limits, there are a lot of legitimate times for using DVDs coded for other regions in the in the US. A great example of this is in schools. Most international DVDs that are perfect for History courses and specifically for World Language courses where teachers want students to see and hear the language with native speakers in local context. Since the typical built-in applications with Windows or OS X have artificial limits to the number of times you can change regions, something is needed to bridge the gap.

Enter VLC. This is a wonderful piece of free and open source software for multimedia playback. They are even branching out into media conversion. It is a very mature tool and highly recommended. Using it instead of the Apple DVD Player.app or the built-in Windows apps you may be using is a great solution.

Other workarounds might include resetting the region change counts, etc. with the programs but that is a waste of time IMHO. Once you download and do the drag and drop install (on Mac OS X) you will be able to go into your CD/DVD System Preferences and change the mapping of what to do when you insert a DVD from the Apple DVD Player to VLC.

Changing the Insert a video DVD Preference

After you have mapped it there in your System Preferences (in OS X) when you insert a DVD of whatever region, VLC will launch and give you an initial controller palette. Pressing play will then prompt for the user to tell it where to obtain the media and in general all you will need to do is click over to the ‘Disk’ tab as it will recognize the DVD and click play. You also have full-screen viewing options as well. Playing the DVD through VLC will not prompt for a region code change.

VLC is not only great for handling region code issues with DVDs, but great as an all-around media player for Quicktime movies, .avi and other formats.