安裝SCRATCH 2.0的方法 18.04 UBUNTU

安裝SCRATCH 2.0 OFFLINE在UBUNTU 18.04

# install necesary i386 libraries
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

sudo ln -s /usr/lib/i386-linux-gnu/libgnome-keyring.so.0 /usr/lib/libgnome-keyring.so.0
sudo ln -s /usr/lib/i386-linux-gnu/libgnome-keyring.so.0.2.0 /usr/lib/libgnome-keyring.so.0.2.0

wget http://airdownload.adobe.com/air/lin/download/2.6/AdobeAIRSDK.tbz2
sudo mkdir /opt/adobe-air-sdk
sudo tar jxf AdobeAIRSDK.tbz2 -C /opt/adobe-air-sdk


wget https://aur.archlinux.org/cgit/aur.git/snapshot/adobe-air.tar.gz
sudo tar xvf adobe-air.tar.gz -C /opt/adobe-air-sdk
sudo chmod +x /opt/adobe-air-sdk/adobe-air/adobe-air

https://scratch.mit.edu/scratch2download/
sudo mkdir /opt/adobe-air-sdk/scratch
wget https://scratch.mit.edu/scratchr2/static/sa/Scratch-456.0.1.air
sudo cp Scratch-456.0.1.air /opt/adobe-air-sdk/scratch/
cp Scratch-456.0.1.air /tmp/
cd /tmp/
unzip /tmp/Scratch-456.0.1.air
sudo cp /tmp/icons/AppIcon128.png /opt/adobe-air-sdk/scratch/scratch.png

Create launcher:

$ cat << _EOF_ > /usr/share/applications/Scratch2.desktop
[Desktop Entry]
Encoding=UTF-8
Version=1.0
Type=Application
Exec=/opt/adobe-air-sdk/adobe-air/adobe-air /opt/adobe-air-sdk/scratch/Scratch-456.0.1.air
Icon=/opt/adobe-air-sdk/scratch/scratch.png
Terminal=false
Name=Scratch 2
Comment=Programming system and content development tool
Categories=Application;Education;Development;ComputerScience;
MimeType=application/x-scratch-project
_EOF_

$ chmod +x /usr/share/applications/Scratch2.desktop

And that’s it. First run is a little bit longer, as the Air is unpacking Scratch 2 application to ~/.appdata/edu.media.mit.Scratch2Editor folder.

原文:

https://askubuntu.com/questions/913892/how-to-install-scratch-2-on-ubuntu-16-10-or-17-04-64bit

報廢舊ANDROID手機變成PC版MINECRAFT 伺服器

報廢舊ANDROID手機變成PC版MINECRAFT 伺服器

用HTC M7為例:

最近因為小朋友在吵想要玩MINECRAFT,所以除了原來的伺服器還要再加設一台小解謎用的小服務器,所以使用手機來當服務器應該可以快速更換小解謎遊戲.

1.下載 java arm版jdk_u8_162
http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
下載後用手機esfile解壓縮後放到Download/Minecraft裡

2.下載 Minecraft 1.12.2 .
https://launcher.mojang.com/mc/game/1.12.2/server/886945bfb2b978778c3a0288fd7fab09d315b25f/server.jar

下載後用手機esfile解壓縮後放到Download/Minecraft裡

 

install.sh

#!/bin/bash
cp -a /sdcard/Download/Minecraft /home/*/Minecraft
chmod 755 /home/*/Minecraft

Start.sh

#!/bin/bash
cd “$(dirname “$0″)”
exec /home/*/Minecraft/jdk1.8.0_162/bin/java -Xms1G -Xmx1G -jar server.jar nogui