{"id":6,"date":"2024-05-14T14:55:51","date_gmt":"2024-05-14T14:55:51","guid":{"rendered":"https:\/\/blog.rat9.co.uk\/?p=6"},"modified":"2024-08-21T08:43:18","modified_gmt":"2024-08-21T08:43:18","slug":"running-gaffer-in-wsl","status":"publish","type":"post","link":"https:\/\/blog.rat9.co.uk\/index.php\/2024\/05\/14\/running-gaffer-in-wsl\/","title":{"rendered":"Running Gaffer in WSL"},"content":{"rendered":"\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"heading-why\">Why?<\/h2>\n\n\n\n<p>I run windows on my workstation at home. I&#8217;m not proud, and I wont say anything good about it.<\/p>\n\n\n\n<p>I have been using the windows version of gaffer for sometime, and it&#8217;s pretty good now.<\/p>\n\n\n\n<p>However, Gaffer is a tool for automating things, and there is no escaping the fact that automating anything reliably on a windows machine is like balancing pingpong balls.<\/p>\n\n\n\n<p>On top of this I am using a remote render farm, which consists of Linux render nodes. Cross rendering is possible &#8211; but there is a limit to how much&nbsp;<em>gaffer tape<\/em>&nbsp;I can handle.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"heading-installation\"><a href=\"https:\/\/purest.hashnode.dev\/running-gaffer-in-wsl#heading-installation\"><\/a><\/h3>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"heading-installation\">Installation.<\/h2>\n\n\n\n<p>Make sure virtualization is enabled in your machine bios<\/p>\n\n\n\n<p>Run a command prompt as admin<\/p>\n\n\n\n<pre class=\"wp-block-code alignwide has-background\" style=\"background-color:#d4dada\"><code><code>wsl \u2013install Ubuntu-22.04<\/code><\/code><\/pre>\n\n\n\n<p>You will likely need to reboot<\/p>\n\n\n\n<p>The Ubuntu os will need a username and password &#8211; you can use whatever you want.<\/p>\n\n\n\n<p>There are lots of required dependencies (UI stuff) which don\u2019t come with this Ubuntu, I found installing audacity to be an easy hack to get most of them. (probably a better way, but this works for me):<\/p>\n\n\n\n<pre class=\"wp-block-code alignwide has-background\" style=\"background-color:#d4dada\"><code><code>sudo apt-get update<\/code>sudo apt-get upgrade\nsudo apt-get install libgl1 libglu1\nsudo apt-get install audacity<\/code><\/pre>\n\n\n\n<p>Download and unpack gaffer:<\/p>\n\n\n\n<pre class=\"wp-block-code alignwide has-background\" style=\"background-color:#d4dada\"><code>wget https:\/\/github.com\/GafferHQ\/gaffer\/releases\/download\/1.3.16.1\/gaffer-1.3.16.1-linux.tar.gz\ntar -xvf gaffer-1.3.16.1-linux.tar.gz<\/code><\/pre>\n\n\n\n<p>Run gaffer:<\/p>\n\n\n\n<pre class=\"wp-block-code alignwide has-background\" style=\"background-color:#d4dada\"><code><code>.\/gaffer-1.3.16.1-linux\/bin\/gaffer<\/code><\/code><\/pre>\n\n\n\n<p>For convenience I created a symlink in \/usr\/bin\/ that points to the gaffer executable (I also moved gaffer to a different location on disk):<\/p>\n\n\n\n<pre class=\"wp-block-code alignwide has-background\" style=\"background-color:#d4dada\"><code><code>cd \/usr\/bin\/<\/code>\n<code>sudo ln -s &#91; your path to gaffer ]\/gaffer-1.3.16.1-linux\/bin\/gaffer gaffer<\/code><\/code><\/pre>\n\n\n\n<p>I also used the auto-created audacity start menu item as a template to make a gaffer shortcut, so now I can launch gaffer directly from the desktop or start menu.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"heading-performance\"><a href=\"https:\/\/purest.hashnode.dev\/running-gaffer-in-wsl#heading-performance\"><\/a><\/h3>\n\n\n\n<div class=\"wp-block-group is-content-justification-center is-nowrap is-layout-flex wp-container-core-group-is-layout-1 wp-block-group-is-layout-flex\">\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"657\" height=\"494\" src=\"https:\/\/blog.rat9.co.uk\/wp-content\/uploads\/2024\/05\/shortcut.png\" alt=\"\" class=\"wp-image-11\" style=\"width:418px;height:auto\" srcset=\"https:\/\/blog.rat9.co.uk\/wp-content\/uploads\/2024\/05\/shortcut.png 657w, https:\/\/blog.rat9.co.uk\/wp-content\/uploads\/2024\/05\/shortcut-300x226.png 300w\" sizes=\"(max-width: 657px) 100vw, 657px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"516\" height=\"443\" src=\"https:\/\/blog.rat9.co.uk\/wp-content\/uploads\/2024\/05\/CaptureStart.png\" alt=\"\" class=\"wp-image-12\" style=\"width:362px;height:auto\" srcset=\"https:\/\/blog.rat9.co.uk\/wp-content\/uploads\/2024\/05\/CaptureStart.png 516w, https:\/\/blog.rat9.co.uk\/wp-content\/uploads\/2024\/05\/CaptureStart-300x258.png 300w\" sizes=\"(max-width: 516px) 100vw, 516px\" \/><\/figure>\n<\/div>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"heading-performance\">Performance.<\/h2>\n\n\n\n<p>I&#8217;m have been testing &#8216;WSL Gaffer&#8217; and &#8216;Windows Gaffer&#8217;, running both at the same time on different monitors and comparing. You get a little penguin on WSL processes on the taskbar, which is cute ( and also helpful ).<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"601\" height=\"319\" src=\"https:\/\/blog.rat9.co.uk\/wp-content\/uploads\/2024\/05\/taskbarIcons.png\" alt=\"\" class=\"wp-image-10\" srcset=\"https:\/\/blog.rat9.co.uk\/wp-content\/uploads\/2024\/05\/taskbarIcons.png 601w, https:\/\/blog.rat9.co.uk\/wp-content\/uploads\/2024\/05\/taskbarIcons-300x159.png 300w\" sizes=\"(max-width: 601px) 100vw, 601px\" \/><\/figure>\n\n\n\n<p>Initially the UI was very sluggish on WSL &#8211; something like a quarter of a second delay on anything. I persevered however, and for unknown reasons it now runs much better.<\/p>\n\n\n\n<p>Even so, I would say that the windows version is slightly more responsive, but its so close that I am not sure if its my imagination or not.<\/p>\n\n\n\n<p>Startup time for WSL is normally about 4 seconds, which is good &#8211; the windows version takes a little more than this, and is occasionally very slow to get going, like over 90 seconds.<\/p>\n\n\n\n<p>Rendering seems identical between the two versions.<\/p>\n\n\n\n<p>Disk access is generally similar speed, except when accessing the windows file system from WSL ( available as \/mnt\/c ), this is slow, and so I have been copying all my data &#8216;local&#8217; to the WSL.<\/p>\n\n\n\n<p>I have found filesystem access to be more predictable on WSL than on windows.<\/p>\n\n\n\n<p>Both versions have been very stable, no crashes.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion.<\/h2>\n\n\n\n<p>If you are a full on windows user, and have no desire to use linux tools\/features, then this is pretty much pointless &#8211; you can just run the Windows version.<\/p>\n\n\n\n<p>If you are a linux user, or will be interacting with other linux users, this can be a good solution. maybe niche, but its working well for me.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Why? I run windows on my workstation at home. I&#8217;m not proud, and I wont say anything good about it. I have been using the windows version of gaffer for sometime, and it&#8217;s pretty good now. However, Gaffer is a tool for automating things, and there is no escaping the fact that automating anything reliably [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":8,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"_links":{"self":[{"href":"https:\/\/blog.rat9.co.uk\/index.php\/wp-json\/wp\/v2\/posts\/6"}],"collection":[{"href":"https:\/\/blog.rat9.co.uk\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.rat9.co.uk\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.rat9.co.uk\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.rat9.co.uk\/index.php\/wp-json\/wp\/v2\/comments?post=6"}],"version-history":[{"count":3,"href":"https:\/\/blog.rat9.co.uk\/index.php\/wp-json\/wp\/v2\/posts\/6\/revisions"}],"predecessor-version":[{"id":14,"href":"https:\/\/blog.rat9.co.uk\/index.php\/wp-json\/wp\/v2\/posts\/6\/revisions\/14"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.rat9.co.uk\/index.php\/wp-json\/wp\/v2\/media\/8"}],"wp:attachment":[{"href":"https:\/\/blog.rat9.co.uk\/index.php\/wp-json\/wp\/v2\/media?parent=6"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.rat9.co.uk\/index.php\/wp-json\/wp\/v2\/categories?post=6"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.rat9.co.uk\/index.php\/wp-json\/wp\/v2\/tags?post=6"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}