We have a mix of Linux and Windows users at work. My department use Linux and the rest of the business use Windows. We been running a mixture of LibreOffice and Microsoft Office, which works pretty well until you start trying to collaborate, then it gets messy pretty quickly.
So, it was decided at the end of last year to migrate everyone, including the Linux users, to Microsoft Office 2010.
What follows is an installation guide for Wine and the 60 day trial version of Office Home and Business 2010 on Arch Linux and Ubuntu. Most of this information was sourced from the Wine AppDB
Install Wine on Ubuntu as follows.
sudo apt-add-repository ppa:ubuntu-wine/ppa sudo apt-get update sudo apt-get install ttf-mscorefonts-installer samba wine1.5 wine-gecko1.8 wine-monoFor 64-bit also install the following.
sudo apt-get install ia32-libsInstall Wine on Arch Linux as follows.
sudo pacman -S --needed icoutils libwbclient samba wine wine_gecko sudo packer -S --noedit --noconfirm ttf-ms-fonts wine-mono-binFor 64-bit also install the following.
sudo packer -S --noedit --noconfirm lib32-libwbclientOnce Wine is install, installing Office 2010 is the same for Arch Linux and Ubuntu.
Create a clean wine prefix.
export WINEPREFIX="${HOME}/.msoffice2010" export WINEARCH="win32" winecfgClick the Libraries tab, select riched20 and click Add. The default entry should read riched20 (native, builtin). Click Apply, then click OK. This will ensure that PowerPoint starts and selection boxes display correctly.
Start the Office 2010 setup. In the example below X17-75058.exe is the name of the 60 day trial version of Office Home and Business 2010 I downloaded.
wine X17-75058.exeFollow the installation wizard, we are only interested in running the essentials, Word, Excel and PowerPoint. This is what I selected during the install.
That's it. Office 2010 is installed and should be associated with the appropriate file types.
Uninstalling Office 2010Should you ever need to, you can uninstall Office 2010 as follows.
rm -rfv ${HOME}/.msoffice2010/ rm -rfv ~/.local/share/applications/wine-extension-* rm -rfv ~/.local/share/applications/wine/Programs/Microsoft\ Office/Here are some observations of running Office 2010 under Wine.
This week’s live video Q&A is in the normal time slot of every Wednesday at 7pm UTC (click here for the time in your location this week).
As ever, you are welcome to ask me absolutely anything about Ubuntu, Free Software, Community Management, Technology, or anything else. The only questions I don’t accept are tech support questions – Ask Ubuntu, IRC and the Ubuntu Forums are better resources for that.
To join, head over to Ubuntu On Air at 7pm UTC on Wednesday and you can ask your questions in the embedded chat box.
Look forward to seeing you all there!
When I went into Cat and Kian’s kitchen, one of the first things I noticed was an OggCamp mug. Although they hadn’t attended that summer’s event, Cat and Kian move in similarly geeky circles to me and the redoubtable Les Pounder had sold them the mug at another event.
There was definitely a geeky theme to the wedding too. Guests were given their own Lego figurine to assemble as favours, and, as Cat and Kian had met after a late night at a Terry Pratchett convention, the tables were named after the Discworld novels. The wedding even had its own Twitter hashtag.
Cat and Kian were married at Bolton School, Lancashire. It was a pleasure to travel up north from Hampshire to photograph their wedding. Bolton School is one of the oldest schools in Lancashire, with grand wooden interiors and stone courtyards. The ceremony and reception were both in the Arts Centre, itself an impressive building with exposed beams. We were able to use the grand cloisters and gardens for photographs.
Cat’s dress had striking red panels and detailed embroidery was topped off with a delicate shawl Cat had knitted herself. Cat and Kian were almost inseparable during our photo session.
If you’re interested, you can see more of Cat and Kian’s wedding.
Pin ItAfter some discussion upstream (mostly on IRC I’m sad to say), I have pushed a patch to use GCC’s __attribute__((cleanup)) extension (also supported by LLVM, but not by anything else).
This attribute causes a destructor to run automatically when a variable goes out of scope. In libguestfs we’ve added some CLEANUP_* macros to make things a little bit simpler, so I’m going to use those macros in these examples:
{ CLEANUP_FREE char *buf = NULL; ... if (asprintf (&buf, "%s/%s", tmpdir, filename) == -1) { reply_with_perror ("asprintf"); return -1; } ... return 0; }The CLEANUP_FREE macro ensures that the equivalent of free (buf) is called on every exit path from the scope where the variable ‘buf’ is defined, which means on every return, but also on other exits such as goto or falling off the end.
For most functions, this may save a line or two. Occasionally it can make functions a lot simpler. Compare before:
static char * icon_windows_xp (guestfs_h *g, struct inspect_fs *fs, size_t *size_r) { char *filename = NULL; char *filename_case = NULL; char *filename_downloaded = NULL; char *pngfile = NULL; char *ret; struct command *cmd; int r; /* Download %systemroot%\explorer.exe */ filename = safe_asprintf (g, "%s/explorer.exe", fs->windows_systemroot); filename_case = guestfs___case_sensitive_path_silently (g, filename); if (filename_case == NULL) goto not_found; filename_downloaded = guestfs___download_to_tmp (g, fs, filename_case, "explorer.exe", MAX_WINDOWS_EXPLORER_SIZE); if (filename_downloaded == NULL) goto not_found; pngfile = safe_asprintf (g, "%s/windows-xp-icon.png", g->tmpdir); /*...*/ if (r == -1) goto error; if (!WIFEXITED (r) || WEXITSTATUS (r) != 0) goto not_found; if (read_whole_file (g, pngfile, &ret, size_r) == -1) goto error; free (filename); free (filename_case); free (filename_downloaded); free (pngfile); return ret; error: free (filename); free (filename_case); free (filename_downloaded); free (pngfile); return NULL; not_found: free (filename); free (filename_case); free (filename_downloaded); free (pngfile); return NOT_FOUND; }and after:
static char * icon_windows_xp (guestfs_h *g, struct inspect_fs *fs, size_t *size_r) { CLEANUP_FREE char *filename = NULL; CLEANUP_FREE char *filename_case = NULL; CLEANUP_FREE char *filename_downloaded = NULL; CLEANUP_FREE char *pngfile = NULL; char *ret; struct command *cmd; int r; /* Download %systemroot%\explorer.exe */ filename = safe_asprintf (g, "%s/explorer.exe", fs->windows_systemroot); filename_case = guestfs___case_sensitive_path_silently (g, filename); if (filename_case == NULL) return NOT_FOUND; filename_downloaded = guestfs___download_to_tmp (g, fs, filename_case, "explorer.exe", MAX_WINDOWS_EXPLORER_SIZE); if (filename_downloaded == NULL) return NOT_FOUND; pngfile = safe_asprintf (g, "%s/windows-xp-icon.png", g->tmpdir); /*...*/ if (r == -1) return NULL; if (!WIFEXITED (r) || WEXITSTATUS (r) != 0) return NOT_FOUND; if (read_whole_file (g, pngfile, &ret, size_r) == -1) return NULL; return ret; }It’s not all good news though. It’s almost certainly less efficient: a function call is made on every exit path, even ones which you could prove are irrelevant.
It may make the code more obscure, particularly for people who aren’t used to this feature.
It won’t work at all on non-GCC non-LLVM compilers, although I don’t think that is relevant to libguestfs.
There is some scope for error, especially double-freeing or accidentally freeing buffers which are returned from the function.
Getting vmware tools to work on ubuntu:
apt-get install build-essential linux-headers-`uname -r` psmisc
After some issues with the ruby libraries it depends on, I ran it over a couple of my smaller manifests and I have to say the output is very readable and quite presentable. If you write manifests for other peoples use then this is well worth a look.