{"id":3701,"date":"2018-01-24T23:03:43","date_gmt":"2018-01-24T22:03:43","guid":{"rendered":"https:\/\/monodes.com\/predaelli\/?p=3701"},"modified":"2018-01-24T23:03:43","modified_gmt":"2018-01-24T22:03:43","slug":"dpkg-how-to-install-scratch-2-on-ubuntu-16-10-or-17-04-64bit-ask-ubuntu","status":"publish","type":"post","link":"https:\/\/monodes.com\/predaelli\/2018\/01\/24\/dpkg-how-to-install-scratch-2-on-ubuntu-16-10-or-17-04-64bit-ask-ubuntu\/","title":{"rendered":"dpkg &#8211; How to install Scratch 2 on Ubuntu 16.10. or 17.04 (64bit)? &#8211; Ask Ubuntu"},"content":{"rendered":"<p>Today my daughter asked me to install Scratch.<\/p>\n<p>But not the tablet. I already did it. On the computer. I tought it was a breeze.<\/p>\n<p>Actually it was as simple as &#8220;<code class=\"\" data-line=\"\">sudo apt install scratch<\/code>&#8220;. Too bad I got an oldish 1.4 version and her book refers to version 2.0.<\/p>\n<p>To make a long story short, they relied on the piece of rotting proprietary software known as &#8220;Adobe AIR&#8221;.<\/p>\n<p>There are several guides on how to install it on Linux too, but the one I found to actually work is in a comment of<\/p>\n<h2><em><a href=\"https:\/\/askubuntu.com\/questions\/913892\/how-to-install-scratch-2-on-ubuntu-16-10-or-17-04-64bit\">dpkg &#8211; How to install Scratch 2 on Ubuntu 16.10. or 17.04 (64bit)? &#8211; Ask Ubuntu<\/a><\/em><\/h2>\n<p>which works also on Debian.<\/p>\n<p><!--more--><\/p>\n<p>You can find it also at <a href=\".\/2\">page 2\u00a0<\/a>while we wait for\u00a0 Scratch 3.<\/p>\n<p>Luckily they realized that relying on proprietary software is quite a bad choice, as they are writing Scratch 3 <a href=\"https:\/\/wiki.scratch.mit.edu\/wiki\/Scratch_3.0\">using completely free software<\/a>:<\/p>\n<blockquote><p>Scratch 3.0 will be written in <a title=\"HTML5 Player\" href=\"https:\/\/wiki.scratch.mit.edu\/wiki\/HTML5_Player\">HTML5<\/a>, which is a general term for the latest HTML, CSS, and Javascript web-based markup and <a title=\"Programming Language\" href=\"https:\/\/wiki.scratch.mit.edu\/wiki\/Programming_Language\">programming languages<\/a>. Scratch 3.0 will primarily use the WebGL, Web Workers, and Web Audio Javascript libraries.<sup id=\"cite_ref-Scratch_Conference_.40_MIT_2016_4-0\" class=\"reference\"><a href=\"https:\/\/wiki.scratch.mit.edu\/wiki\/Scratch_3.0#cite_note-Scratch_Conference_.40_MIT_2016-4\">[4]<\/a><\/sup> Javascript is a widely supported language across all web browsers, and WebGL was picked for its speed and ability to perform operations like &#8220;touching color&#8221;. Unlike Adobe Flash, Javascript works without requiring any browser extensions.<\/p><\/blockquote>\n<p>I found it looking for <a href=\"https:\/\/wiki.scratch.mit.edu\/wiki\/Source_code#Scratch_3.0\">its sources<\/a><\/p>\n<blockquote><p>The <a title=\"Scratch 3.0\" href=\"https:\/\/wiki.scratch.mit.edu\/wiki\/Scratch_3.0\">Scratch 3.0<\/a> source code is in GitHub. it is from some different source, but everything is written by <a class=\"mw-redirect\" title=\"JavaScript\" href=\"https:\/\/wiki.scratch.mit.edu\/wiki\/JavaScript\">JavaScript<\/a>.<\/p><\/blockquote>\n<p>If you cannot get the sources for a software you&#8217;re never free, you&#8217;re shackled and enslaved to someone&#8217;s else will.<\/p>\n<p><!--nextpage--><\/p>\n<blockquote><p>I have been playing around with this couple of hours. First I tried to trace the <code class=\"\" data-line=\"\">Adobe Air Application Installer<\/code> and find, what&#8217;s happening inside.<\/p>\n<pre><code class=\"\" data-line=\"\">$ sudo strace -s 500 -t -o air_scratch.txt Adobe\\ AIR\/Versions\/1.0\/Adobe\\ AIR\\ Application\\ Installer ~\/Downloads\/Scratch-456.0.1.air \n<\/code><\/pre>\n<p>And I found this line:<\/p>\n<pre><code class=\"\" data-line=\"\">read(18, &quot;dpkg-deb: error: treewalk root \/tmp\/FlashTmp.3TWnKI\/build\/DEBIAN is not a directory\\n&quot;, 4096) = 84\n<\/code><\/pre>\n<p>It seems to new <code class=\"\" data-line=\"\">dpkg<\/code> cannot handle links as the previous one. This can be fixed by wrapper script placed e.g. to <code class=\"\" data-line=\"\">~\/air\/bin\/dpkg<\/code> and changing the <code class=\"\" data-line=\"\">PATH<\/code> variable before running Adobe Air Application Installer. Unfortunately, the Scratch cannot be installed without sudo, and changing <code class=\"\" data-line=\"\">PATH<\/code> for sudo is not so easy.<\/p>\n<p>Then I found a polish forum of unhappy tax payers, which are solving similar problems (they need run some Air app from ministry of finance on Debian\/Ubuntu): <a href=\"https:\/\/forum.dug.net.pl\/viewtopic.php?pid=310108\" rel=\"noreferrer\">https:\/\/forum.dug.net.pl\/viewtopic.php?pid=310108<\/a>.<\/p>\n<p>And deep inside this forum I found some hints, how to run Scratch 2 on Ubuntu 16.10\/17.04 (even without <code class=\"\" data-line=\"\">adobeair.deb<\/code> installation).<\/p>\n<p>This is my final working solution, tested on clean installation.<\/p>\n<pre><code class=\"\" data-line=\"\"># install necesary i386 libraries\n$ sudo apt-get install libgtk2.0-0:i386 libstdc++6:i386 libxml2:i386 libxslt1.1:i386 libcanberra-gtk-module:i386 gtk2-engines-murrine:i386 libqt4-qt3support:i386 libgnome-keyring0:i386 libnss-mdns:i386 libnss3:i386\n\n# make keyring visible for Adobe Air\n$ sudo ln -s \/usr\/lib\/i386-linux-gnu\/libgnome-keyring.so.0 \/usr\/lib\/libgnome-keyring.so.0\n$ sudo ln -s \/usr\/lib\/i386-linux-gnu\/libgnome-keyring.so.0.2.0 \/usr\/lib\/libgnome-keyring.so.0.2.0\n\n# Download Adobe Air\ncd ~\/Downloads\nwget http:\/\/airdownload.adobe.com\/air\/lin\/download\/2.6\/AdobeAIRSDK.tbz2\n$ sudo mkdir \/opt\/adobe-air-sdk\n$ sudo tar jxf AdobeAIRSDK.tbz2 -C \/opt\/adobe-air-sdk\n\n# Download Air runtime\/SDK from Archlinux\nwget https:\/\/aur.archlinux.org\/cgit\/aur.git\/snapshot\/adobe-air.tar.gz\n$ sudo tar xvf adobe-air.tar.gz -C \/opt\/adobe-air-sdk\n$ sudo chmod +x \/opt\/adobe-air-sdk\/adobe-air\/adobe-air\n\n# Get actual scratch file URL from https:\/\/scratch.mit.edu\/scratch2download\/\n$ sudo mkdir \/opt\/adobe-air-sdk\/scratch\nwget https:\/\/scratch.mit.edu\/scratchr2\/static\/sa\/Scratch-456.0.1.air\n$ sudo cp Scratch-456.0.1.air \/opt\/adobe-air-sdk\/scratch\/\ncp Scratch-456.0.1.air \/tmp\/\ncd \/tmp\/\nunzip \/tmp\/Scratch-456.0.1.air\n$ sudo cp \/tmp\/icons\/AppIcon128.png \/opt\/adobe-air-sdk\/scratch\/scratch.png\n<\/code><\/pre>\n<p>Create launcher:<\/p>\n<pre><code class=\"\" data-line=\"\">$ cat &lt;&lt; _EOF_ &gt; \/usr\/share\/applications\/Scratch2.desktop\n[Desktop Entry]\nEncoding=UTF-8\nVersion=1.0\nType=Application\nExec=\/opt\/adobe-air-sdk\/adobe-air\/adobe-air \/opt\/adobe-air-sdk\/scratch\/Scratch-456.0.1.air\nIcon=\/opt\/adobe-air-sdk\/scratch\/scratch.png\nTerminal=false\nName=Scratch 2\nComment=Programming system and content development tool\nCategories=Application;Education;Development;ComputerScience;\nMimeType=application\/x-scratch-project\n_EOF_\n\n$ chmod +x \/usr\/share\/applications\/Scratch2.desktop\n<\/code><\/pre>\n<p>And that&#8217;s it. First run is a little bit longer, as the Air is unpacking Scratch 2 application to <code class=\"\" data-line=\"\">~\/.appdata\/edu.media.mit.Scratch2Editor<\/code> folder.<\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p class=\"excerpt\">Today my daughter asked me to install Scratch. But not the tablet. I already did it. On the computer. I tought it was a breeze. Actually it was as simple as &#8220;sudo apt install scratch&#8220;. Too bad I got an oldish 1.4 version and her book refers to version 2.0. To make a long story&hellip;<\/p>\n<p class=\"more-link-p\"><a class=\"more-link\" href=\"https:\/\/monodes.com\/predaelli\/2018\/01\/24\/dpkg-how-to-install-scratch-2-on-ubuntu-16-10-or-17-04-64bit-ask-ubuntu\/\">Read more &rarr;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"activitypub_content_warning":"","activitypub_content_visibility":"","activitypub_max_image_attachments":4,"activitypub_interaction_policy_quote":"anyone","activitypub_status":"","footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[53],"tags":[193],"class_list":["post-3701","post","type-post","status-publish","format-standard","hentry","category-proprietary-software","tag-scratch"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p6daft-XH","jetpack-related-posts":[{"id":4621,"url":"https:\/\/monodes.com\/predaelli\/2018\/10\/08\/how-to-run-android-apps-on-linux\/","url_meta":{"origin":3701,"position":0},"title":"How To Run Android Apps On Linux","author":"Paolo Redaelli","date":"2018-10-08","format":false,"excerpt":"How To Run Android Apps On Linux? Very informative, but the answer is summarized in \"install Google Chrome plus arc-welder extension\". If I had to run proprietary sw then one more doesn't make such a difference Update: well, it's not that simple. So let's write all the steps. Go to\u2026","rel":"","context":"In &quot;Android&quot;","block_context":{"text":"Android","link":"https:\/\/monodes.com\/predaelli\/category\/android-2\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1254,"url":"https:\/\/monodes.com\/predaelli\/2016\/04\/06\/aptyum-cheatlist\/","url_meta":{"origin":3701,"position":1},"title":"apt\/yum cheatlist","author":"Paolo Redaelli","date":"2016-04-06","format":false,"excerpt":"apt-cache se I'm actually doing the reverse: SwitchingToUbuntu\/FromLinux\/RedHatEnterpriseLinuxAndFedora\u00a0 but it's easy as a quick Ctrl-F or \/ Table of Equivalent Commands Below is a table of equivalent commands for package management on both Ubuntu\/Debian and Red Hat\/Fedora systems. Task Red Hat\/Fedora Ubuntu Adding, Removing and Upgrading Packages Refresh list of\u2026","rel":"","context":"In &quot;Debian&quot;","block_context":{"text":"Debian","link":"https:\/\/monodes.com\/predaelli\/category\/debian\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":2174,"url":"https:\/\/monodes.com\/predaelli\/2017\/02\/19\/how-to-install-ubuntu-on-computer-with-uefi\/","url_meta":{"origin":3701,"position":2},"title":"How to install Ubuntu on computer with UEFI","author":"Paolo Redaelli","date":"2017-02-19","format":false,"excerpt":"How to install Ubuntu on computer with UEFI Nice! I may just need it soon. My wife asked for a new laptop. But while she finds Linux great - I've been exclusively using Linux since 1997 - some software requires for schooling out children sadly runs only on Windows. So\u2026","rel":"","context":"In &quot;Senza categoria&quot;","block_context":{"text":"Senza categoria","link":"https:\/\/monodes.com\/predaelli\/category\/senza-categoria\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":11302,"url":"https:\/\/monodes.com\/predaelli\/2024\/02\/05\/quickemu\/","url_meta":{"origin":3701,"position":3},"title":"Quickemu","author":"Paolo Redaelli","date":"2024-02-05","format":false,"excerpt":"This quickemu could easily dislodge VirtualBox as my favorite desktop virtualization solution: Quickly create and run highly optimized desktop virtual machines for Linux, macOS and Windows; ... Quickemu now also includes comprehensive support for macOS and Windows. Features macOS Monterey, Big Sur, Catalina, Mojave & High Sierra Windows 10 and\u2026","rel":"","context":"In &quot;Apple&quot;","block_context":{"text":"Apple","link":"https:\/\/monodes.com\/predaelli\/category\/apple\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/monodes.com\/predaelli\/wp-content\/uploads\/sites\/4\/2024\/02\/quickemu-logo.webp?fit=512%2C512&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":805,"url":"https:\/\/monodes.com\/predaelli\/2015\/11\/22\/upgrades\/","url_meta":{"origin":3701,"position":4},"title":"Upgrades","author":"Paolo Redaelli","date":"2015-11-22","format":false,"excerpt":"Upgrading oldish releases are a pain. I tried \"official\" ways to upgrade my Saucy Salamander Eeepc. No way. I got to do it the hard way, treating that Ubuntu like the Debian it is underneath. A power blow of apt-fu: %s\/saucy\/wily\/gc :wq apt-get update && apt-get dist-upgrade Now, that's taking\u2026","rel":"","context":"In &quot;Mood&quot;","block_context":{"text":"Mood","link":"https:\/\/monodes.com\/predaelli\/category\/mood\/"},"img":{"alt_text":"eeepc-and-beer","src":"https:\/\/i0.wp.com\/monodes.com\/predaelli\/wp-content\/uploads\/sites\/4\/2015\/11\/eeepc-and-beer-300x210.jpg?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":12744,"url":"https:\/\/monodes.com\/predaelli\/2025\/02\/14\/how-to-share-virtual-extended-screen\/","url_meta":{"origin":3701,"position":5},"title":"How to Share Virtual Extended Screen","author":"Paolo Redaelli","date":"2025-02-14","format":false,"excerpt":"\u00a0 How to Share Virtual Extended Screen in Ubuntu 22.04 | 24.04 This simple tutorial shows how to enable RDP remote desktop for extended screen in Ubuntu 22.04, Ubuntu 24.04, and Ubuntu 23.10 with default GNOME desktop. Since Ubuntu 22.04, the default GNOME desktop has built-in RDP support. The function\u2026","rel":"","context":"In &quot;Tricks&quot;","block_context":{"text":"Tricks","link":"https:\/\/monodes.com\/predaelli\/category\/documentations\/tricks\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/monodes.com\/predaelli\/wp-content\/uploads\/sites\/4\/2025\/02\/extend-virtual-monitors.webp?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/monodes.com\/predaelli\/wp-content\/uploads\/sites\/4\/2025\/02\/extend-virtual-monitors.webp?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/monodes.com\/predaelli\/wp-content\/uploads\/sites\/4\/2025\/02\/extend-virtual-monitors.webp?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/monodes.com\/predaelli\/wp-content\/uploads\/sites\/4\/2025\/02\/extend-virtual-monitors.webp?resize=700%2C400&ssl=1 2x, https:\/\/i0.wp.com\/monodes.com\/predaelli\/wp-content\/uploads\/sites\/4\/2025\/02\/extend-virtual-monitors.webp?resize=1050%2C600&ssl=1 3x"},"classes":[]}],"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/posts\/3701","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/comments?post=3701"}],"version-history":[{"count":0,"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/posts\/3701\/revisions"}],"wp:attachment":[{"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/media?parent=3701"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/categories?post=3701"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/tags?post=3701"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}