Many times, I find that I need to create a document that includes either code or output from a command-line. I haven’t found that either LibreOffice or Microsoft Word provide good styling to make that code or output look nice in a technical document. Below is how I created some Paragraph styles in both programs to display the code. I would love feed back on how I can improve the look. Please Comment Below.
I’ve been using Word and Excel on my Ubuntu for a while now. For the most part, it works pretty good. Just recently, someone asked me about how Outlook worked.
My personal preference is GMail. I like the interface, and I like having my mail in the cloud. When I refresh my computer, it’s one less thing to have to backup. For a while, I did use Thunderbird. It works natively on Linux. Still, I’ll explore Outlook for a second.
For the instructions on installing Office, you can see my post: Ubuntu 12.04: Office and Play on Linux
One the requirements for my laptop is to be able to edit Microsoft Office documents. LibreOffice works quite well and was installed by default, but when exchanging complex documents with other Office users, Microsoft Office has no substitute.
So, my solution is to run Office using wine. I have used winetricks in the past to install Linux, but that didn’t work this time. This time a project called Play on Linux came through for me.
Here’s what I did…
To exist in a world dominated by Microsoft products, you have to be able to coexist with others using those products. That includes connecting to shares via Samba, using remote desktop, and opening Office documents. When it comes to office documents, Libre Office does the job for the most part. I have had pretty good success using Libre Office even with Microsoft Office files. The problem comes when you bounce a document back and forth between Libre Office and Microsoft Office.
If you are working in a team with other Microsoft Office users, you are going to have to break down and install Microsoft Office. Below you will see the screenshots of how I installed Office. At the end, you can find other methods.
This is my second attempt at writing this article. Office hasn’t been playing nicely with Fedora, but I finally have it working! This How-To is not as clean as I would like, but it works.
First, let’s explore the motivation for installing Microsoft Office on Linux. I would venture to guess that most if not all Linux distributions have LibreOffice in their repositories. That is a full-featured office package that will probably do most of what you want. In my opinion, Microsoft Office is just a little bit better, but that comes with a huge price tag! The value is definitely on LibreOffice’s side. But, here are some reasons you may consider Office instead:
- if you can get Office cheaper — many times you can get Office much cheaper through student licensing or corporate licensing
- if you do a lot of work on Office documents in conjunction with other Microsoft users — LibreOffice can open, edit, and save MS Office documents, but when you go back and forth, you will probably have to constantly fix small formatting issues
My motivation comes from working with textbooks. I was working with large Word documents, and since they were so large, reformatting images and screenshots were not feasible every time we passed them back and forth between LibreOffice and MS Office. Plus, Office was bought for me so the cost was not an issue!
So, with no further adue, let me walk you through what I did to install it on my Fedora 15 OS:
I needed to install Microsoft Office 2007 on my Fedora 15 installation, and my first step was to look for a tutorial that might help clear up any gotchas before I hit them. Unfortunately, the closest I found was these two articles:
- HOW TO INSTALL MICROSOFT OFFICE 2007 IN UBUNTU (UNDER WINE)
- How To Install Microsoft Office 2007 In Ubuntu 9.04
So, my thought was to create my own how to. Instead, I think I have created more of a how NOT to! By the time I was done with all of this, it didn’t work. So, don’t bother with this article if you are trying to figure out how to make it work. If you are looking on something to develop to make the world better for Linux users, look no more. We need help!
They are three different pieces of software, but they can work together:
- Wine: a tool to run Windows-based software on Linux/Unix operating systems
- MS Office: the most popular office suites, a tool that needs Wine to run on Linux
- GVFS: the file system built into Gnome that allows network access
Here is the scenario — you go into the office with your Ubuntu laptop, and your project has an Excel Spreadsheet that you have to use to collaborate on. Sure, Google Docs would be better for collaborating, but you don’t have a say in the matter. So, you can either dust off the installation of Windows on the other partition (and install the 500 updates pending), or you can install Office on top of Linux with Wine.
Now, you can get to the spreadsheet in the Gnome File Manager (nautilus) using the network features. I usually press Ctrl+L to open up the box where you can type in a URL. Then, I type something like — smb://<server name>/<share>/. It will probably ask you for your credentials to login to the share, but you should be able to see the xls file.
The next challenge is how do you open it in Office. Office doesn’t understand the network locations that Gnome knows about. Really, Wine is what doesn’t know about the network. Gnome mounts the network share under the .gvfs directory. Wine doesn’t show the hidden directories, so you can’t get to it.
To solve that problem, I created a network folder that is not hidden, and I linked the .gfvs directory to it:
ln -s ~/.gvfs ~/network
Now, I can see the samba shares in the Office open dialog. I do still have to go to the File Manager and browse to the share first — that is what mounts it. Then, I can open it in Office.
I also had an issue with multiple people having the same spreadsheet open. I opened the spreadsheet, so I should have had the exclusive rights to update it. Then, my coworker opened the same spreadsheet, and it should have made her’s read only. Mine was editable like it should have been but so was hers. Then, when I tried to save it, I gave me an error. I haven’t experimented with it enough to know if that was a one-time glitch in the network, or if that is something I have to worry about.
I found this bug listing, but my problem was different. I have written to the share in the past, so I don’t think it is report 0 bytes free. I found this article that describes what I am doing much better.
The other feature I wish I could have is the ability to drag the files from the file manager to Word or Excel. It works if the file is on my own computer, but it doesn’t when I am on the network. Maybe one day…
Here is a little script that I put together that installs Office 2007 for me.
Now, this script makes the following assumptions:
- I already have a directory created called wine in my home directory.
- I want Office installed in a separate directory/wineprefix
- I have the Office CD mounted already at /media/cdrom0
- I have winetricks in my path (which winetricks = /usr/local/bin/winetricks)
Also, just for information, here is my setup
- Ubuntu 8.10
- Wine version 1.1.16
- I believe I installed Wine with apt-get using the repository at http://wine.budgetdedicated.com/apt
export WINEPREFIX=$HOME/wine/office2007 mkdir $WINEPREFIX winetricks msxml3 dotnet20 gdiplus riched20 riched30 vcrun2005sp1 allfonts ie6 winetricks vista wine /media/cdrom0/setup.exe winetricks winxp
I hope it helps.
I just had a situation at work where I am forced to use Microsoft Office. Normally, Open Office does everything that I need it to do, but this was different. First, the documents were large and had many graphics (textbooks). Open Office seemed to hang just scrolling through them. Second, others in the office would be using Microsoft Word to edit the documents, and if I used Open Office, the document would have to go back and forth between the two.
In order to stay on Linux, I used a tool called Play On Linux to get Word to run inside Wine. Wine is a Windows Emulator that allows Windows programs to run on top of Linux. Play On Linux is a tool to make installation and configuration of Wine much easier.
A script did not exist for Office 2007, but one did for Office 2003. So, I took that script and modified it to work. I did submit it to the Play On Linux website so that others could use it, but it is in the process of being validated. Watch for it here. This is my first script, and so don’t expect too much! Here it is while they validate it:
#!/bin/bash if [ "$PLAYONLINUX" = "" ] then echo "Ce script doit être executé dans PlayOnLinux." exit 0 fi source "$PLAYONLINUX/lib/sources" #Verifier les dépendences cfg_check #Presentation POL_SetupWindow_Init POL_SetupWindow_presentation "Office 2007" "Microsoft" "http://www.microsoft.com" "Tinou modified by Stephen Phillips" "Office2007" 1 5 POL_SetupWindow_cdrom if [ "$POL_LANG" == "en" ]; then POL_SetupWindow_textbox "What is the name of the setup program?" "Office 2007" "setup.exe" else POL_SetupWindow_textbox "Quel est le nom du fichier d'installation ?" "Office 2007" "setup.exe" fi SETUP="$APP_ANSWER" POL_SetupWindow_check_cdrom $SETUP mkdir -p $REPERTOIRE/wineprefix/Office2007 select_prefixe "$REPERTOIRE/wineprefix/Office2007" POL_SetupWindow_prefixcreate cd $WINEPREFIX/dosdevices rm ./* ln -s ../drive_c c: ln -s / z: ln -s $CDROM ./d: #Set_WinVersion_Session 0.9.46 cd $CDROM if [ "$POL_LANG" == "en" ]; then POL_SetupWindow_wait_next_signal "Installation of Office 2007 in progess..." "Office 2007" else POL_SetupWindow_wait_next_signal "Installation de Office 2007 en cours..." "Office 2007" fi wine $SETUP POL_SetupWindow_detect_exit POL_SetupWindow_reboot #Fin du code du jeu #Création du lanceur POL_SetupWindow_make_shortcut "Office2007" "Program Files/Microsoft Office/Office12" "EXCEL.EXE" "excel.xpm" "Excel 2007" POL_SetupWindow_make_shortcut "Office2007" "Program Files/Microsoft Office/Office12" "WINWORD.EXE" "word.xpm" "Word 2007" POL_SetupWindow_make_shortcut "Office2007" "Program Files/Microsoft Office/Office12" "POWERPNT.EXE" "powerpoint.xpm" "Powerpoint 2007" POL_SetupWindow_make_shortcut "Office2007" "Program Files/Microsoft Office/Office12" "MSPUB.EXE" "publisher.xpm" "Publisher 2007" POL_SetupWindow_make_shortcut "Office2007" "Program Files/Microsoft Office/Office12" "ONENOTE.EXE" "onenote.xpm" "OneNote 2007" if [ "$POL_LANG" == "en" ]; then POL_SetupWindow_message "Installation finished" "Office 2007" else POL_SetupWindow_message "Installation terminée" "Office 2007" fi POL_SetupWindow_Close exit