Skip to content

Instantly share code, notes, and snippets.

@aaronsb
Last active April 5, 2024 12:04
Show Gist options
  • Save aaronsb/15d25df0b718f3f9cc342589f3dfb7b8 to your computer and use it in GitHub Desktop.
Save aaronsb/15d25df0b718f3f9cc342589f3dfb7b8 to your computer and use it in GitHub Desktop.
Rhino3D 7 on Linux

Install Rhino 7 on Ubuntu based OS (KDE on Jammy in this case)

This assumes a non existant wine prefix or even a wine installation. If you have an existing wine prefix there may be things that interfere with this guide.

  • Start by installing wine and some required adjacent libraries.

sudo apt install wine wine32 winetricks mono-complete winbind

  • Initialize your default Wine environment (which will be located under ~/.wine

wineboot -u

  • install gecko browser for wine (required for license config to work)

mkdir ~/.cache/wine

cd ~/.cache/wine

wget http://dl.winehq.org/wine/wine-gecko/2.47.2/wine-gecko-2.47.2-x86_64.msi

wget http://dl.winehq.org/wine/wine-gecko/2.47.2/wine-gecko-2.47.2-x86.msi

wineboot

  • various winetricks commands will log a lot of errors and warnings and yet still work. (Task Failed Successfuly?) so don't get too worried

winetricks --force dotnet48

  • Click "restart now" lol
  • kill all existing wine services so reg server doesn't get messed up.

kill -9 $(ps aux |grep -i '\.exe' |awk '{print $2}'|tr '\n' ' ')

  • Install needed fonts. (personally, I think the missing fonts seems to kill Rhino on Wine the most)

winetricks allfonts

  • A few more winetricks to install here.

winetricks vulkanrt

winetricks dxvk

winetricks gdiplus

  • Force wine to appear as Windows 10

Sometimes this hangs, so control-c to break back to terminal prompt if necessary.

wine winecfg -v win10

The only libraries in Wine Configuration (winecfg) should be the following:

  1. *gdiplus (native)

  2. *mscoree (native)

No other libraries should be present

  • Navigate to libraries and do the dirty work 🔪

winecfg

  • Set renderer to gdi - although Rhino still uses gpu acceleration? this part is magic to me. ✨

winetricks renderer=gdi

  • 🔪 Kill all existing remaining wine processes. This can be done in any terminal in your current session. (bash/zsh)

kill -9 $(ps aux |grep -i '\.exe' |awk '{print $2}'|tr '\n' ' ')

  • Download latest Rhino 7 installer and run it. (Filename might change here)

wine ~/Downloads/rhino_en-us_7.24.22308.15001.exe

  • Installer will appear to exit, but it won't actually - it leaves the installer stub and main installer running.
  • 🔪 Kill all remaining wine processes again. Do this from another terminal window if it pleases you. (bash/zsh)

kill -9 $(ps aux |grep -i '\.exe' |awk '{print $2}'|tr '\n' ' ')

  • A Rhino 7 shortcut should appear on your desktop, you can just use that link to start it after finishing this process.
  • Change to installed Rhino directory and run rhino

cd ~/.wine/drive_c/Program Files/Rhino 7/System

wine rhino.exe

  • First time running rhino.exe brings up the installer dialog (the one asking to reinstall or repair). I've tried this a few times and it's repeatable, so just close the dialog box with the upper right X. The web based license process will then proceed.
  • Type your email in and log in via your regular web browser

The license service is listening on tcp:1717 for the authorization string - depending on your system configuration (firewall), the request url to authorize the license will be an http on loopback tcp:1717, so that traffic needs to be allowed.

  • Answer/dismiss the usage tracking dialog
  • Run Grasshopper from within Rhino and select any example document to start it.
  • Grasshopper font mapper will announce that Segoe Print is not available. Confirm the suggested alternative, Tahoma

Now, use Rhino! Save your work often, this isn't a supported configuration and it could crash in unexpected ways. From this point, I have been using Rhino for some projects that aren't exotic - default out of the box features. It works for me so far without much drama.

You might want to change your UI DPI in winecfg (I brought mine up to 133 DPI for my 4K monitor), and definitely experiment with customizing the settings in UI and font to your taste.

Notes and ideas.

Using wine-staging (7.1) I can use vulkan, gl, gdi, or no3d. They all appear to have similar performance and all seem to use the gpu for in-UI viewport rendering. Using any other renderers causes various nterface artifacts such as black regions around some dialog and UI elements. Currently it seems using Vulkan has the least artifacts when using the application.

I definitely think staging 7.1 has less overall glitchy stuff going on such as viewport refresh issues.

I installed nvidia cuda support, and my system shows cuda available, but rhino does not detect cuda capability passeed to it from wine(-staging). I had read that staging has better cuda support.

Render command seems fairly broken. Doesn't matter if it's new render or old render method. Render UI has black button regions and other artifacts.

  • Get vulkan renderer to work
  • Get some sort of acceleration for cycles so rendering is useful.
  • Get the auto updater to auto update reliably.
@karakasa
Copy link

karakasa commented Dec 21, 2022

great job!

@xxcodianxx
Copy link

Works on Fedora 34 with Wine 7.2 staging and NVIDIA proprietary drivers

Change apt install wine wine32 winetricks mono-complete winbind
to dnf install wine winetricks mono-complete samba-winbind

No issue with fonts

@aaronsb
Copy link
Author

aaronsb commented Feb 3, 2023

@xxcodianxx Thanks for the confirmation on the different environment!

@rlyfun
Copy link

rlyfun commented Apr 26, 2023

If you are so willing, could you do one for running TouchDesigner ?

@petrasvestartas
Copy link

petrasvestartas commented Aug 7, 2023

Is there a solution to this problem?

This does not help: wine winecfg -v win10

image
image

@danielkrajnik
Copy link

danielkrajnik commented Aug 18, 2023

Is there a solution to this problem?

This does not help: wine winecfg -v win10

I can reproduce this issue when running Rhino installer with wine compiled from source. @petrasvestartas have you ever solved it?

@aaronsb
Copy link
Author

aaronsb commented Sep 25, 2023

This sounds paradoxical, but do you have win32 configured as well?

@rlyfun
Copy link

rlyfun commented Sep 25, 2023 via email

@Tanneguydv
Copy link

Is there a solution to this problem?

This does not help: wine winecfg -v win10

image image

same here

@danielkrajnik
Copy link

danielkrajnik commented Nov 17, 2023

@Tanneguydv this may be a stupid idea, but what if you kill all wine processes

kill -9 $(ps aux |grep -i '\.exe' |awk '{print $2}'|tr '\n' ' ')

delete your wine filesystem

rm -rf ~/.wine

and run the installer again

wine Downloads/rhino_en-us_7.32.23221.10241.exe

? Does it still come up with the same problem? That may be an issue with the wine package then. Are you on Ubuntu?

@Tanneguydv
Copy link

Yes, same problem (and before running the installer I had to switch winecfg back to windows 10, the rm -rf had turned it to win7).
I'm on Ubuntu 22.04.3 LTS 64 Bits, Gnome 42.9 , X11

@danielkrajnik
Copy link

@Tanneguydv sorry to hear that, maybe you can try a newer version of wine? I've read here that wine offers it's own ppa with more up to date version of wine. I remember having this problem a few months ago, but last month wine was always correctly configured to be windows 10 after installing Rhino. My wine version is wine-8.20 (ArchLinux).

@Tanneguydv
Copy link

@Tanneguydv sorry to hear that, maybe you can try a newer version of wine? I've read here that wine offers it's own ppa with more up to date version of wine. I remember having this problem a few months ago, but last month wine was always correctly configured to be windows 10 after installing Rhino. My wine version is wine-8.20 (ArchLinux).

Hello, thank you for your advice!
I tried that both on Ubuntu 22 and ArchLinux, it seems better now, I succeed in installing Rhino 7 and find the .exe file.
Except the local server licence check wich fails instantly everytime (no time between button click and fail dialog apparition), same problem on Bottles :(

@danielkrajnik
Copy link

Cool, glad to hear that. Oh you even managed to run it on Bottles? I've never got it to work there.

local server licence check fails

I don't think that anyone managed to get the offline licence check to work. You may need to register online on the first run, however after that I could run it completely offline.

@Tanneguydv
Copy link

Cool, glad to hear that. Oh you even managed to run it on Bottles? I've never got it to work there.

I've just followed the advices of @aaronsb on https://www.reddit.com/r/rhino/comments/ylo72e/rhino_on_linux_with_bottles/
Thnak you @aaronsb ;)

@danielkrajnik
Copy link

@Tanneguydv thanks, I must have missed that post. I tried bottles again, but sadly it still kept crashing. I'm having some problems with nvidia driver (optimus laptop) with other programs as well, so it may be unrelated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment