SketchUp and Rubies on Linux (yes, it works)
-
Anyone have the slightest idea what this warning means on SketchUp startup?
I should explain that (probably uniquely among SCF members) I sometime run SketchUp on Ubuntu Linux. Yep, it works just dandy if you tweak the WINE registry settings in a minor way...it just started working, quite suddenly, a few weeks ago with some major updates to Ubuntu and WINE. I'm told that Google has been contributing a great deal of code to the WINE runtime environment, which allows one to run Windows software on Linux (sometimes). Perhaps this is the result.
The only problem is that certain Rubies will not load properly...I get an error like this or else warnings about syntax. Usually it is completely inexplicable (sometimes syntax errors are indicated for commented lines!).
I strongly suspect that somehow there is something encoded in the rb text that is not properly interpreted. For instance, I had a number of syntax errors pop up with the subsmooth_loader.rb. I retyped it, word for word, with Ubuntu's equivalent of Notepad (Gedit), saved it, added the .rb file type, dropped it in the plugins folder...and it works fine now.
Rubies that ship with SketchUp normally (from Google) load just fine...it is only third-party rubies written by you fine folks that balk.
I've read Chris Pine's book on Ruby programming (which is free and part of the Ubuntu program repositories) and I see nothing wrong with your scripts (like FFD)...which incidentally run just fine if I boot the same machine up with Windows XP. And if I completely re-type your scripts in Linux, from a blank text document, they work fine on Linux.
Any thoughts about this? And why is it that Rubies from @Last or Google work just dandy, but not anyone else's?
Any thoughts?
-
Hi Lewis
Good Work, I knew SU on Ubuntu & Wine would work eventually. Good to see Google are showing some support to Linux too. Please can I quote your text at Linux Outlaws and the Lug Radio forum? There are members there that will be interested in this.
That error message greets me daily. I'm pretty sure it is a sketchy physics error, I cannot get sketchy physics to work on Vista no matter what I do.
-
@lewiswadsworth said:
Anyone have the slightest idea what this warning means on SketchUp startup?
[attachment=0:31y361fk]<!-- ia0 -->Screenshot-1.png<!-- ia0 -->[/attachment:31y361fk]
I should explain that (probably uniquely among SCF members) I sometime run SketchUp on Ubuntu Linux. Yep, it works just dandy if you tweak the WINE registry settings in a minor way...it just started working, quite suddenly, a few weeks ago with some major updates to Ubuntu and WINE. I'm told that Google has been contributing a great deal of code to the WINE runtime environment, which allows one to run Windows software on Linux (sometimes). Perhaps this is the result.
The only problem is that certain Rubies will not load properly...I get an error like this or else warnings about syntax. Usually it is completely inexplicable (sometimes syntax errors are indicated for commented lines!).
I strongly suspect that somehow there is something encoded in the rb text that is not properly interpreted. For instance, I had a number of syntax errors pop up with the subsmooth_loader.rb. I retyped it, word for word, with Ubuntu's equivalent of Notepad (Gedit), saved it, added the .rb file type, dropped it in the plugins folder...and it works fine now.
Your retyping stuff making it works makes me think it could be line-endings perhaps. You could check by finding a script that doesn't work and a version of the same that does and compare them. (eg: od -x file1.rb) to see whether it is just things that work end each line unix-style with 0x0d,0x0a (CR,LF) whereas Windows typically just has 0x0a.
(Kinda cool it works at all though!)
Adam -
Adam, you were right...it is something to do with character encoding. Short of retyping every Ruby, the workaround for me is to open up the terminal, navigate to the Plugins directory, and type something like:
dos2unix jointpushpull.rb
I was first prompted by bash to apt-get the package that includes that dos2unix utility. Here is the link for the command options, once you have it:
-
Thanks Lewis
-
Thought I should add a comment on running SU on Ubuntu Linux...everything works, seemingly, on SU like this, except for Fast Feedback. There is also a tendency, when you resize your SU window or switch to another app, for the background or whole viewport in SU to flicker or momentarily turn black. Returning focus to SU by doing anything will bring it back to normal. Also, floating tool windows and toolbars want to right-click-toggle-drag and not right-click-hold-drag.
And even if you have as much video RAM as I do on this machine, don't try to run the Gnome Desktop with any of the fancy settings at all. No Compiz, in other words. Bad things happen if you do (SU turns invisible, or you crash your desktop, or you lock up your system).
-
@adamb said:
Your retyping stuff making it works makes me think it could be line-endings perhaps. You could check by finding a script that doesn't work and a version of the same that does and compare them. (eg: od -x file1.rb) to see whether it is just things that work end each line unix-style with 0x0d,0x0a (CR,LF) whereas Windows typically just has 0x0a.
(Kinda cool it works at all though!)
AdamAdam, I think that is it...let me play with it for a while and see if I can make a script that is working not work. Thanks!
Jon, settings for SU 6 Pro on Linux, as they have worked for me:
(WINE 1.0-rc1 under Ubuntu 8.04)
Post install, you have to let SketchUp run (and crash) at least once so that the registry keys all are written. Then make the changes, as below, with WINE's regedit program:
[HKEY_CURRENT_USER\Software\Google\SketchUp6\GLConfig\Display]
"FIRST_TIME"=dword:00000000
"HW_OK"=dword:00000001[HKEY_CURRENT_USER\Software\Google\SketchUp6\Google SketchUp TOTD]
"HelpPage"="0"
"ShowOnStartUp"="false"[HKEY_CURRENT_USER\Software\Google\SketchUp6\SnappyInstructor]
"Show"="0"Layout will not function at all...it doesn't even write keys so that I can tweak it.
Incidentally, I have had these SU settings work on two relatively modern workstations with NVIDIA video cards (and I let Ubuntu find and install the latest Proprietary drivers). On a slightly older notebook computer with an ATI card, this did not work, no matter how I tweaked the settings. But I think that is ATI's fault, for some reason.
Here are my current OpenGL details as SU (on Ubuntu 8.04 and WINE) interprets them:
Vender: NVIDIA Corporation
Renderer: GeForce 8800 Ultra/PCI/SSE2
GL Version: 2.1.2 NVIDIA 169.12
GLU Version: 1.3Feel free to bring this up on any other forum.
--Lewis
-
Lewis,
Thanks for posting this, solved my question!
-
I was at the AIA convention in Boston today and spoke about this topic to the usual Google suspects. They assured me that it must have been changes to WINE that makes it possible to reliably run SU on Linux, because they knew nothing about any changes to SU that would have allowed it. I'll add my list of tweaks to the registry and the plugins to the WINE page for SU tonight or tomorrow. I suggested to the Googlers that they put together a binary package of SketchUp with the registry tweaks, translator, and WINE itself to make it easier for the non-technical to set this up, rather the way Google does with Picasa for Linux (which comes with the appropriate WINE libraries). They didn't seem too excited about the prospect, but said they would "bring it up" with HQ.
There are a lot of 3D modelers available in Linux...either FOSS (and therefore either cryptic like Blender or perpetually-in-development like Ayam, unfortunately) or hopelessly expensive (like Maya). But suddenly the ability to run dependable old SketchUp opens up completely new possibilities...the Ubuntu distro suddenly becomes (almost) a valid professional option to me, given that I have a number of other Windows graphics programs (Photoshop, Dreamweaver, etc.) or capable Linux apps (Cinelerra, Blender, Inkscape, etc.) also available on my Ubuntu workstations now. I can tell both Mr. Gates and Mr. Jobs to take a hike, if I can get past losing Rhino 4 (licensing manager hates WINE!).
Anyway...
A certain not-to-be-named Googler asked me at the convention, "Did you try the 7.0 beta with WINE yet?"
I replied, "What 7.0 beta?"
He quickly backtracked. "Oh, I forgot...we haven't let that one out yet."
-
@lewiswadsworth said:
Anyway...
A certain not-to-be-named Googler asked me at the convention, "Did you try the 7.0 beta with WINE yet?"
I replied, "What 7.0 beta?"
He quickly backtracked. "Oh, I forgot...we haven't let that one out yet."
....I never backtrack, I only add range to my attack. he he he
-
hurry up!
-
WINE Review has some more notes on SU on Linux and other OS, like FreeBSD.
http://wine-review.blogspot.com/2007/12/google-sketchup-6-on-linux-and-freebsd.html
(And yes, I posted a comment telling them to look at this thread...so we might see a bit of traffic.)
-
thanks for the useful tricks, now sketchup on my ubuntu-8.04 works at 95%
The only one feature blocking the program is jpg export that's very important for my job
Have someone experienced the same and found the solution?thank you
Mick -
@michelinux said:
thanks for the useful tricks, now sketchup on my ubuntu-8.04 works at 95%
The only one feature blocking the program is jpg export that's very important for my job
Have someone experienced the same and found the solution?thank you
MickSorry, that one works on the two Ubuntu boxes I have set up. However, SU6 has always had some weird graphics export problems...the other day I had a 3500x3500 pixel image fail, inexplicably, on a Windows box until I changed the export resolution to 3499x3499.
Did you try the export with another image format, like PNG? Also, see what happens if you turn off antialiasing under options when you export a 2D graphic file.
If you really want to test the file, post it to me and I'll try an export using SU on Wine on my Ubuntu workstation.
-
Just to make sure it works and no update has broken the functionality recently, I just switched over to Linux and did some JPG exports. In fact, for some reason, the export process seemed much faster than it did using the same file on XP. And this is a fairly elaborate model, with shadows and antialiasing turned on, at 3000 pixels in its longest direction (resized here with GIMP).
Mick, you might want to check and see if your current Ubuntu installation can view or create JPG files using any application (try GIMP). I've never had to look for a library for viewing or writing JPGs on Linux, but it is a non-Open-Source format so perhaps you managed to not install it or delete it.
-
While making these JPG tests, I decided to let Ubuntu update the NVidia GLX driver for my computer, and in fact most elements of graphic performance improved after a restart. Except in one area: when unselecting an object, or when closing a group/component open for editing, actually seeing the change on the screen is delayed until one moves the camera or starts another operation.
That's surprisingly annoying with a complex model full of nested components, and I don't think it was happening prior to the latest batch of updates!
-
sure, with gimp and other sw I can manage jpg without any problem.
Fortunately, thanks to you, I can export in png perfectly
can you paste the output of the command:aptitude search jpeg
compliments for your work
see you
Mick -
@michelinux said:
sure, with gimp and other sw I can manage jpg without any problem.
Fortunately, thanks to you, I can export in png perfectly
can you paste the output of the command:aptitude search jpeg
compliments for your work
see you
MickHere you go:
@unknownuser said:
p avifile-mjpeg-plugin - MJPEG video plugin for libavifile
p cl-jpeg - A JPEG library for Common Lisp
p jpeginfo - Prints information and tests integrity of
p jpegoptim - utility to optimize jpeg files
p jpegpixi - Remove hot spots from JPEG images with min
p libclan2c2a-jpeg - JPEG module for ClanLib game SDK
v libjpeg-dbg -
v libjpeg-dev -
p libjpeg-progs - Programs for manipulating JPEG files
i libjpeg62 - The Independent JPEG Group's JPEG runtime
p libjpeg62-dbg - Development files for the IJG JPEG library
p libjpeg62-dev - Development files for the IJG JPEG library
p libmjpegtools-dev - MJPEG video capture/editting/playback MPEG
i A libmjpegtools0c2a - MJPEG video capture/editting/playback MPEG
v libplayerjpeg-dev -
p libplayerjpeg2 - Networked server for robots and sensors -
p libplayerjpeg2-dev - Networked server for robots and sensors -
i A mjpegtools - MJPEG video capture/editting/playback MPEG
p ov51x-jpeg-source - Source for the ov51x-jpeg driver
p recoverjpeg - Recover jpeg pictures from a filesystem imI hope that helps, Mick.
-
I have the same packages installed, maybe it happens bacause I have a 64bit version
Thanks anyway, today I've tried to modify export resolution with png format, after that the program makes error exporting in png, even re-turning on use view dimension...
See you
Mick -
@michelinux said:
I have the same packages installed, maybe it happens bacause I have a 64bit version
Thanks anyway, today I've tried to modify export resolution with png format, after that the program makes error exporting in png, even re-turning on use view dimension...
See you
MickUsually SketchUp starts having problems with export resolutions greater than 4000 pixels in any direction, independent of platform, unless antialiasing is turned off, under Options in the export dialog. You might see if that helps; otherwise you're probably right about the 64-bit version being the issue, although I can't imagine why that would be such an issue.
Quite a few people on this link have been able to run SU on various other distros than SU; if you have the time and partition space, why not test one out, or for that matter make a partition for booting Ubuntu 32-bit? At least that would be one way of isolating the problem.
If I can find the time, I'll download the Ubuntu 64-bit and see if the problem is there for me. Might be a few days, though, until I have that much spare time.
Just out of curiosity, Mick, do you generally see much performance improvement with Ubuntu 64-bit, outside of the SU problem? What applications show the most difference, if you do?
Advertisement