It is currently Thu Sep 02, 2010 9:57 pm

Registration
Login Help

Advertise Here

SketchUp and Rubies on Linux (yes, it works)

FAQMembersRegisterLogin

SketchUp and Rubies on Linux (yes, it works)

Postby lewiswadsworth on Wed May 14, 2008 6:15 am

Anyone have the slightest idea what this warning means on SketchUp startup?

Screenshot-1.png


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?
You do not have the required permissions to view the files attached to this post.
User avatar
lewiswadsworth
 
Posts: 722
Joined: Wed Jan 30, 2008 4:09 pm
Location: Boston
Name: Lewis Wadsworth
Operating system: Win7 64-bit, Ubuntu Linux
SketchUp version: ha!

Re: Rubies and SketchUp on Linux (yes, it works)

Postby linea on Wed May 14, 2008 7:53 am

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.
User avatar
linea
 
Posts: 1093
Joined: Tue Nov 13, 2007 9:13 am
Location: Hull, UK
Name: jon
Operating system: Vista / linux dabbler
SketchUp version: SU Pro 6

Re: Rubies and SketchUp on Linux (yes, it works)

Postby AdamB on Wed May 14, 2008 9:10 am

lewiswadsworth wrote:Anyone have the slightest idea what this warning means on SketchUp startup?

Screenshot-1.png


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
Developer of LightUp http://www.light-up.co.uk
User avatar
AdamB
 
Posts: 455
Joined: Wed Dec 12, 2007 10:49 am
Location: Brighton, UK
Name: Adam Billyard
Operating system: WinXP, Mac OSX

Re: Rubies and SketchUp on Linux (yes, it works)

Postby lewiswadsworth on Wed May 14, 2008 2:37 pm

AdamB wrote:
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, 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.3

Feel free to bring this up on any other forum.

--Lewis
User avatar
lewiswadsworth
 
Posts: 722
Joined: Wed Jan 30, 2008 4:09 pm
Location: Boston
Name: Lewis Wadsworth
Operating system: Win7 64-bit, Ubuntu Linux
SketchUp version: ha!

Re: Rubies and SketchUp on Linux (yes, it works)

Postby lewiswadsworth on Wed May 14, 2008 3:27 pm

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:

http://linuxcommand.org/man_pages/dos2unix1.html
User avatar
lewiswadsworth
 
Posts: 722
Joined: Wed Jan 30, 2008 4:09 pm
Location: Boston
Name: Lewis Wadsworth
Operating system: Win7 64-bit, Ubuntu Linux
SketchUp version: ha!

Re: Rubies and SketchUp on Linux (yes, it works)

Postby linea on Wed May 14, 2008 4:02 pm

Thanks Lewis
User avatar
linea
 
Posts: 1093
Joined: Tue Nov 13, 2007 9:13 am
Location: Hull, UK
Name: jon
Operating system: Vista / linux dabbler
SketchUp version: SU Pro 6

Re: Rubies and SketchUp on Linux (yes, it works)

Postby lewiswadsworth on Wed May 14, 2008 5:11 pm

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).
User avatar
lewiswadsworth
 
Posts: 722
Joined: Wed Jan 30, 2008 4:09 pm
Location: Boston
Name: Lewis Wadsworth
Operating system: Win7 64-bit, Ubuntu Linux
SketchUp version: ha!

Re: Rubies and SketchUp on Linux (yes, it works)

Postby yugami on Fri May 16, 2008 8:22 pm

Lewis,

Thanks for posting this, solved my question!
yugami
 
Posts: 4
Joined: Mon Apr 14, 2008 12:39 am

Re: Rubies and SketchUp on Linux (yes, it works)

Postby lewiswadsworth on Fri May 16, 2008 10:40 pm

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."
User avatar
lewiswadsworth
 
Posts: 722
Joined: Wed Jan 30, 2008 4:09 pm
Location: Boston
Name: Lewis Wadsworth
Operating system: Win7 64-bit, Ubuntu Linux
SketchUp version: ha!

Re: Rubies and SketchUp on Linux (yes, it works)

Postby CraigD on Tue May 20, 2008 6:04 pm

lewiswadsworth wrote: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
Google SketchUp
User avatar
CraigD
Google SketchUp Team
 
Posts: 431
Joined: Sat Nov 17, 2007 6:39 am
Location: Boulder, CO USA

Re: Rubies and SketchUp on Linux (yes, it works)

Postby linea on Thu May 22, 2008 1:25 pm

:ecstatic: hurry up!
User avatar
linea
 
Posts: 1093
Joined: Tue Nov 13, 2007 9:13 am
Location: Hull, UK
Name: jon
Operating system: Vista / linux dabbler
SketchUp version: SU Pro 6

Re: Rubies and SketchUp on Linux (yes, it works)

Postby lewiswadsworth on Sat May 31, 2008 5:22 pm

WINE Review has some more notes on SU on Linux and other OS, like FreeBSD.

http://wine-review.blogspot.com/2007/12 ... eebsd.html

(And yes, I posted a comment telling them to look at this thread...so we might see a bit of traffic.)
User avatar
lewiswadsworth
 
Posts: 722
Joined: Wed Jan 30, 2008 4:09 pm
Location: Boston
Name: Lewis Wadsworth
Operating system: Win7 64-bit, Ubuntu Linux
SketchUp version: ha!

Re: Rubies and SketchUp on Linux (yes, it works)

Postby michelinux on Fri Jul 04, 2008 2:16 pm

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
User avatar
michelinux
 
Posts: 6
Joined: Fri Jul 04, 2008 2:12 pm
Location: rimini, italia
Name: michele delbianco
Operating system: linux ubuntu 8.04
SketchUp version: 6

Re: Rubies and SketchUp on Linux (yes, it works)

Postby lewiswadsworth on Fri Jul 04, 2008 3:08 pm

michelinux wrote: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


Sorry, 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.
User avatar
lewiswadsworth
 
Posts: 722
Joined: Wed Jan 30, 2008 4:09 pm
Location: Boston
Name: Lewis Wadsworth
Operating system: Win7 64-bit, Ubuntu Linux
SketchUp version: ha!

Re: Rubies and SketchUp on Linux (yes, it works)

Postby lewiswadsworth on Fri Jul 04, 2008 5:42 pm

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).

conv15v3b.jpg


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.
You do not have the required permissions to view the files attached to this post.
User avatar
lewiswadsworth
 
Posts: 722
Joined: Wed Jan 30, 2008 4:09 pm
Location: Boston
Name: Lewis Wadsworth
Operating system: Win7 64-bit, Ubuntu Linux
SketchUp version: ha!

SketchUcation One-Liner Adverts

by Ad Machine on 5 minutes ago

IRender nXt - Photorealistic Rendering Tools to Enhance SketchUp
Ad Machine
Robot
 
Posts: 2010

Next

 

Advertise Here

Who is online

Users browsing this forum: No registered users and 5 guests