Installation of SketchUp
- Install the Microsoft Windows Compatibility Layer "Wine":
Go to the software center (or the equivalent of your distribution), search for Wine and click on install. The official stable version is wine1.2. However, it is recommended to use the latest (unstable) version 1.3.X which has many significant improvements. You can get the latest versions here http://www.winehq.org/download (or for Ubuntu add this to your software sources http://ppa.launchpad.net/ubuntu-wine/ppa/ubuntu). You can't expect that SketchUp works well with older Wine versions < 1.2.
In your profile folder you will find a folder ~/.wine/drive_c (show hidden files with ctrl+H). That is the equivalent to C:\ on Windows, and there will be the program files and the SketchUp and Plugins folder like you are used to it on Windows.
Download and install SketchUp by right clicking ⇒ "Open with Windows Application Loader Wine".
The installation should work without problems, if not, see in the tricks below.
Use the program Winetricks to install some extras (original windows files, that are not rebuilt by the Wine team) to make the installation work and to make webdialogs work. If Winetricks didn't come with your version of Wine, you can get it here: http://wiki.winehq.org/winetricks).
- Go to ~/.wine/drive_c/Program Files and rename the folder 'Internet Explorer' into 'Internet Explorer backup' or something.
- Start Winetricks either from the menu or by typing winetricks in a terminal. Choose the default Wine prefix and choose to install additional Windows DLLs.
- Then select the checkboxes for 'vcrun2005' (needed for the installation), 'gecko', 'ie8' (needed for webdialogs) and 'flash' (for streetview imagery).
- After installation of IE, delete the newly created folder 'Internet Explorer' and rename the backup into 'Internet Explorer'.
- Open Applications ⇒ Wine ⇒ Configure Wine. On the "library" tab, add an overwrite for wininet (this makes uploading work) and for ctl3d32 (this can be helpful for the component options/attributes window). Those two should be listed as "(native, built-in)".
If you open SketchUp from the Application menu (under Wine ⇒ Programs), you will see the error message "SketchUp was unable to initialize OpenGL!" and a bugsplat. Now we need to change a setting in the Windows registry so that SketchUp will use hardware acceleration. This setting is available in the Preferences of SketchUp, but as we could not open SU, we will change this setting in the Wine registry.
In the Application menu, click on wine ⇒ Browse C:\ and open windows/regedit.exe
In the tree structure, go to the key HKEY_CURRENT_USER\Software\Google\SketchUp7\GLConfig\Display, and change HW_OK to 1.
Additionally, go to the key HKEY_CURRENT_USER\Software\Google\SketchUp6\SnappyInstructor and change "Show" to 0.
- That's it.
The success largely depends on the version of Wine and your Linux distribution. If you still encounter problems, try some of the following tricks that formerly had been necessary:
Use SketchUp with an external 2d graphics editor
Copy this script into a text editor and save it in /usr/bin (or download it from here). You can replace gimp by any other program you like. Make sure it is executable by right clicking ⇒ properties ⇒ permissions.
IMG=$(winepath -u "$*")
- Now open window ⇒ preferences in SketchUp. In the application section, you choose this script (from "Z:\usr\bin").
Set SketchUp files to be opened in SketchUp
The newest version of Wine is supposed to do the correct file format assignments automatically. If this is not the case, you can save the following in a text file and rename it as skp.sh. Make sure that the path matches to the location of your SketchUp.exe file. Then move it into ~/.wine .
QUICKPARLOCATION="c:\\Programme\\Google\\Google SketchUp 7.1\\SketchUp.exe"
PARAM=`winepath -w "$*"`
wine "$QUICKPARLOCATION" "$PARAM"
Right click on any SketchUp file, ⇒ properties, go to the "open with" tab and select the sh script (as custom command)
Make SketchUp beautiful
- Add an icon for SketchUp files: Save this image in the folder ~/.local/share/icons and rename it as
- Wine applications look very minimalist and old like Windows 2000. But you can change the colors or use a windows theme to make it look more like your other GTK applications.
Open Applications ⇒ Wine ⇒ Configure Wine. On the "Desktop Integration" tab, you can either modify the colors of the user interface by selecting an element and then a color or font. Or you choose a windows theme file (*.msstyles, *.theme, that you can find from www.deviantart.com). Note that this can cause conflicts with webdialogs.
For having smooth, antialiased text in Wine, there exists a script that can enable this setting. Run these two commands in the terminal and choose the smoothing mode 3:
Enable thumbnails (in Gnome)
With a little python script, we can extract the thumbnail image that is stored inside a SketchUp file and add it to the system's thumbnails. Unfortunately SketchUp in Wine is not yet capable to create thumbnails (or export png images), so this works only for files that already contain a thumbnail (for example from Windows, or from 3D warehouse).
If you want to create lots of thumbnails for already existing files (or nested directories) at once, you can do this manually with this bash script. It will create thumbnails for all files in the current directory or in a directory that you can pass as an argument.
Download this python script and save it in /usr/bin . Make sure it is executable by right-clicking ⇒ properties ⇒ permissions.
- Now you need to register it as a thumbnailer in the Gnome.
In Gnome 3, save this file in /usr/share/thumbnailers.
If you have Gnome 2, paste these two commands in the terminal:
gconftool-2 -s /desktop/gnome/thumbnailers/application@x-wine-extension-skp/enable --type=bool true
gconftool-2 -s /desktop/gnome/thumbnailers/application@x-wine-extension-skp/command --type=string "python /usr/bin/skp-thumbnailer.py %i %o"
Use SketchUp < 8.0 with Google Earth
Importing terrain from Google Earth can work in SU6-SU7.1 if you use the Windows version in Wine instead of the native Linux version.
Install Google Earth in Wine (make sure you have not the GoogleUpdater, but a complete installer >10 MB, go to the download page and choosing "advanced setup".
- importing terrain from Google Earth works, but it might look like GE freezes for a minute.
- exporting a model to Google Earth does not work, because Sketchup in Wine ( <1.3.7) can't create Collada files.
Make Plugins work in Wine versions < 1.2
Ruby plugins are written in a Windows text format instead of UNIX format (the difference is that windows uses 2 symbols for a line ending and displays them as one). So you will need to convert the Ruby scripts into UNIX format using the program tofrodos (unfortunately only available for the terminal, but that should not be too difficult). You can find and install tofrodos either in the software center or on the terminal:
- Open the terminal and copy this line
sudo apt-get install tofrodos
and press enter to install that program.
- If you have downloaded a Ruby script and want to convert it, open the terminal and go to that folder (example: your Desktop) by typing
- To convert all Ruby scripts (that have the extension .rb) in that folder, copy this line into the terminal and hit enter
- Now you can move the scripts into ~/.wine/drive_c/Program Files/Google/Google SketchUp 7/Plugins
What does not work
Thanks to many efforts from both the Wine developers and the Sketchup team, Sketchup has become very stable. Nevertheless there are some negligible annoyances and only few functions that do not yet work.
- in some installations, the integrated IE browser ("Get models from 3D warehouse" etc.) displays a blank page.
workaround: Installing 'ie8' and 'gecko' via Winetricks as described above should fix that.
- When uploading to 3D Warehouse, the upload button didn't have an effect.
Installing 'ie8' and 'gecko' via Winetricks as described above and
disabling msstyles themes should make uploading work, however in Wine
<1.5.4 thumbnails of uploaded models are black.
- because of the
black thumbnails issue, you would probably prefer to export as kmz and
upload it on the 3D Warehouse website (upper right corner).
- or you use a SketchUp plugin that uses a work-around to upload models with thumbnail: [Plugin] Upload model with custom thumbnail
- When hovering the border of the 3d view (especially after having moved an inspector window), the view pans up/down/sidewards without stopping. This is caused by both a bug in SketchUp and an issue with mouse input in Wine.
- "Make unique texture" can log you out from your user session (eventually depends on the graphics card)
- fixed in Wine 1.3.3: the Ruby Console didn't not recognize the enter key.
- fixed in Wine 1.3.7: kmz/collada xml exporter and importer didn't work (⇒ you could use VirtualBox instead).
- fixed in Wine 1.4-rc3: the inspector windows (materials browser, entity info etc.) can randomly stick to the cursor and move over the screen.
- fixed in Wine 1.5.4: black images resulted from 2d Export, file thumbnails, component/scene/style thumbnails and the print preview (see this bug report of Wine).
- fixed in Wine 1.5.4: Sketchy styles didn't show edges.
- fixed in Wine 1.5.4: in exported 3d models, distorted textures and color shifts were not correctly baked into the textures.
If you create models on Linux and upload them to 3D warehouse (ie. via VirtualBox), please let me know for adding them to our collection.
VirtualBox (previously Sun VirtualBox) is a virtual machine that allows to use different operating systems within your running system. Thus it can demand much resources depending on the requirements of the guest operating system (recommendation: Windows XP).
A virtual machine is the tool of choice to have a reliably working SketchUp or if Wine doesn't satisfy you.
VirtualBox comes in two versions: an opensource edition (OSE) and a commercial version which is free for personal use (PUEL) and contains some additional features like USB support.
After installation, VirtualBox offers a comfortable wizard for creating a virtual harddisk and machine. You'll need either a Windows install CD or an iso image.
- for installing the OSE version, go to the software center (or the equivalent of your distribution) and search for
- for the PUEL version, you can download a debian installer from http://www.virtualbox.org/wiki/Linux_Downloads
Setting up a shared folder
Select the virtual machine and click on the "change" button (yellow gear), on the bottom of the list you can add a shared folder, to which both the Linux and the virtual machine will have access. It might be useful to create a symbolic link to the shared folder on your desktop. Then you can simply drop SketchUp files onto that folder.
[optionally] Optimizing the virtual system
As even Windows XP costs you around 2GB disk space and 300MB RAM, it could be useful to remove Windows components that you wouldn't use either. That way it can be possible to reduce the requirements of XP to 300MB disk space and 50MB RAM.
The program nLite (for XP) or vLite (for Vista) offer a "minimal" preset and lots of expert options (which could result in a not working disk image). The program creates a disk image which you can use instead of the original Windows install CD.