在 ubuntu 16.04 MATE 中打开 .sb2 文件

在 ubuntu 16.04 MATE 中打开 .sb2 文件

我正在使用 ubuntu MATE 16.04。我安装了 adobe air 和 scratch2。当我双击 sb2 文件时,scratch2 启动,但它是空白的,并且未加载临时项目。我该怎么做才能通过双击打开 sb2 临时项目?

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/

答案1

Ubuntu 存储库已包含(scratch包),但是有点过时了:

Ubuntu 16.04 LTS 上的 Scratch 1.4(2011 年 12 月 2 日)

我在这里发布了 2011 年 12 月 2 日 16.04 LTS 软件包版本 1.4 的桌面文件内容 -

/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

您可以根据您的路径修改它们。

相关内容