1

I am using ubuntu MATE 16.04. I have installed adobe air and scratch2. When I double click an sb2 file, scratch2 starts but it is blank and the scratch project is not loaded. What can I do to open an sb2 scratch project with double click?

File:  /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=scratch2
Comment=Programming system and content development tool
Categories=Application;Education;Development;ComputerScience;
MimeType=application/scratch2project    


File: /usr/share/mime/packages/scratchxml.xml
<?xml version="1.0" encoding="utf-8"?>
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
<mime-type type="application/scratch2project">
<glob pattern="*.sb2"/>
</mime-type>
</mime-info>

In the file /usr/share/applications/defaults.list  I added the line:
 application/scratch2project=scratch2.desktop

sudo chmod +x /usr/share/applications/scratch2.desktop
sudo update-desktop-database
sudo update-mime-database /usr/share/mime/
aspd
  • 11
  • I'm sorry but what was wrong with packaged version (scratch package)? – N0rbert Jun 21 '18 at 20:11
  • Also see https://askubuntu.com/questions/913892/how-to-install-scratch-2-on-ubuntu-16-10-or-17-04-64bit?s=8|0.0000 . – N0rbert Jun 21 '18 at 20:27
  • Adobe air and scratch2 are installed. When you double click an sb2 file, is it opened in scratch2; In my system scratch 2 program starts without loading the file. – aspd Jun 21 '18 at 21:46

1 Answers1

0

Ubuntu repositories already include (scratch package), but it is a bit outdated:

Scratch 1.4 of 2-Dec-11 on Ubuntu 16.04 LTS

I post here contents of desktop-files of 16.04 LTS packaged version 1.4 of 2-Dec-11 -

/usr/share/mimelnk/application/x-scratch-project.desktop:

[Desktop Entry]
Encoding=UTF-8
Type=MimeType
MimeType=application/x-scratch-project
Comment=Scratch Application
Comment[es]=Aplicación de Scratch
Icon=scratch.png
Patterns=*.sb;

/usr/share/applications/scratch.desktop:

[Desktop Entry]
Encoding=UTF-8
Version=1.0
Type=Application
Exec=scratch %f
Icon=scratch
Terminal=false
Name=Scratch
Comment= Programming system and content development tool
Categories=Application;Education;Development;ComputerScience;
MimeType=application/x-scratch-project

You can modify them according to your paths.

N0rbert
  • 99,918
  • I do not have any problem with scratch 1.4. Is is already installed on my computer. I have also installed scratch2, but when I double click an .sb2 file scratch2 program starts without loading the file. – aspd Jun 21 '18 at 21:41