运行 AppImage软件:Running AppImages (***)

How to run an AppImage

Running AppImages

使用 AppImage (appImagetool) 进行 Linux 软件包管理 (带笔记*****)

-------------------------------------------------------------

要点:

1. 需要运行权限。

通常 linux软件的运行,都需要运行权限。

Before you can run an AppImage, you need to make it executable. This is a Linux security feature. There are three main ways to make an AppImage executable:

2. 挂载

2.1. 并非一定要。

可以自动挂载。

2.2. 部分场景,单一AppImage文件运行时,有些应用一定要。否则,需要解压 –appimage-extract。

比如,.AppImage软件需要访问 用户自定义的目录(非 OS规定的目录),及其文件时,

在没有其他方式对路径记录进行引导时,必须要挂载。否则,难以获取这类自定义的目录、或文件。

For type 1 AppImages:

> mkdir mountpoint
> sudo mount my.AppImage mountpoint/
# you can now inspect the contents
> sudo umount mountpoint/

For type 2 AppImages:

> mkdir mountpoint
> my.AppImage --appimage-offset
> 123456
> sudo mount my.AppImage mountpoint/ -o offset=123456
# you can now inspect the contents
> sudo umount mountpoint/

Note that the number 123456 is just an example here, you will likely see another number.

To inspect the contents of any AppImage, it is possible to either mount them without running them, or extract the contents to a directory in the current working directory..

–appimage-extract command line option of the AppImage, and then re-packing it as an AppImage by using appimagetool -u.

3. Making AppImages updateable

  https://docs.appimage.org/packaging-guide/optional/updates.html?highlight=extract

更新:单一文件形式的AppImage,解压,替换掉过时的、或者新增缺失版本的文件,再打包。

====================================

How to run an AppImage

  How to run an AppImage - Using AppImages - AppImage

probono
Oct '16

Before you can run an AppImage, you need to make it executable. This is a Linux security feature. There are three main ways to make an AppImage executable:

2. On the command line

chmod a+x Some.AppImage

Jan '18

Chinese:
https://jingyan.baidu.com/article/d5a880ebdfc12d13f047cc62.html 75

  1. 如图一进入下载目录,找到AppImage文件右键它选择属性。

  2. 在菜单里面则点击权限,所有者选择可读写,在数字3这里选择可执行,然后点击确定。

  3. 接着双击这个AppImage文件即可运行软件。当然一切正常则会运行,不正常有可能是发行版或者本身AppImage文件构建的问题。

 Running AppImages

  https://docs.appimage.org/user-guide/run-appimages.html

  https://docs.appimage.org/packaging-guide/optional/updates.html?highlight=extract

Mount or extract AppImages

To inspect the contents of any AppImage, it is possible to either mount them without running them, or extract the contents to a directory in the current working directory..

Mount an AppImage

AppImages can be mounted in the system to provide read-only access for users to allow for inspecting the contents.

To mount an AppImage temporarily, you have two options. The easiest way to do so is to call AppImages with the special parameter --appimage-mount, for example:

> my.AppImage --appimage-mount
/tmp/mount_myXXXX
# now, use another terminal or file manager to inspect the contents in the directory printed by --appimage-mount

The AppImage is unmounted when the application called in the example is interrupted (e.g., by pressing Ctrl+C, closing the terminal etc.).

Note

This is only available for type 2 AppImages. Type 1 AppImages do not provide any self-mounting mechanism. To mount type 1 AppImages, use mount -o loop.

This method is to be preferable, as other methods have some major disadvantages explained below.

Another way to mount AppImages is to use the normal mount command toolchain of your Linux distribution. Mounting and unmounting devices, files, images and also AppImages requires root permissions. Also, you need to provide a mountpoint. Please see the following example:

For type 1 AppImages:

> mkdir mountpoint
> sudo mount my.AppImage mountpoint/
# you can now inspect the contents
> sudo umount mountpoint/

For type 2 AppImages:

> mkdir mountpoint
> my.AppImage --appimage-offset
> 123456
> sudo mount my.AppImage mountpoint/ -o offset=123456
# you can now inspect the contents
> sudo umount mountpoint/

Note that the number 123456 is just an example here, you will likely see another number.

Warning

AppImages mounted using this method are not unmounted automatically. Please do not forget to call umount the AppImage as soon as you don’t need it mounted any more.

If an AppImage is not unmounted properly, and is moved to a new location, a so-called “dangling mount” can be created. This should be avoided by properly unmounting the AppImages.

Note

Type 2 AppImages which are mounted using the --appimage-mount parameter are not affected by this problem!

See also

There is currently no way to use the former method without calling the target AppImage. This might not always be appropriate, e.g., if the AppImage is not trustworthy.

The AppImage team is working on implementing a mount option in appimagetool. Please see the related GitHub issue for progress on this.

Extract the contents of an AppImage

An alternative to mounting the AppImages is to extract their contents. This allows for modifying the contents. The resulting directory is a valid AppDir, and users can create AppImages from them again using appimagetool.

Analog to mounting AppImages, there is a simple commandline switch to extract the contents of type 2 AppImages without external tools. Just call the AppImage with the parameter --appimage-extract. This will cause the runtime to create a new directory called squashfs-root, containing the contents of the AppImage’s AppDir.

Type 1 AppImages require the deprecated tool AppImageExtract to extract the contents of an AppImage. It’s very limited functionality wise, and requires a GUI to run. It creates a new directory in the user’s desktop directory.

See also

There is currently no way to use the former method without calling the target AppImage. This might not always be appropriate, e.g., if the AppImage is not trustworthy.

The AppImage team is working on implementing a mount option in appimagetool. Please see the related GitHub issue for progress on this.

Integrating AppImages into the desktop

AppImages are standalone bundles, and do not need to be installed. However, some users may want their AppImages to be available like distribution provided applications. This primarily involves being able to launch desktop applications from their desktop environments’ launchers. This concept is called desktop integration.

appimaged

appimaged is a daemon that monitors the system and integrates AppImages. It monitors a predefined set of directories on the user’s system searching for AppImages, and integrates them into the system using libappimage.

See also

More information on appimaged can be found in appimaged.

AppImageLauncher

AppImageLauncher is a helper application for Linux distributions serving as a kind of “entry point” for running and integrating AppImages. It makes a user’s system AppImage-ready™.

AppImageLauncher must be installed into the system to be able to integrate into the system properly. It uses technologies that are independent from any desktop environment features, and therefore should be able to run on most distributions.

After install AppImageLauncher, you can simply double-click AppImages in file managers, browsers etc. You will be prompted whether to integrate the AppImage, or run it just once. When you choose to integrate your AppImage, the file will be moved into the directory ~/Applications. This helps reducing the mess of AppImages on your file system and prevents you from having to search for the actual AppImage file if you want to e.g., remove it.

To provide a complete solution for managing AppImages on the system, AppImageLauncher furthermore provides solutions for updating and removing AppImages from the system. These functions can be found in the context menus of the entries in the desktop’s launcher.

See also

More information about AppImageLauncher can be found in AppImageLauncher.

Troubleshooting

Please refer to our Troubleshooting page.

使用 AppImage (appImagetool)进行 Linux 软件包管理 (带笔记*****)

  https://www.codenong.com/cs106774108/

摘要:

1. 首先,请确保本地已安装 AppStream 包、file 包。

对于基于 Debian 的系统,运行:

$ sudo apt install appstream

$ sudo apt install file

 下载二进制文件后,使文件可执行,并将 hello-world-appimage 目录传给它。但是首先,你需要告诉它你想要的架构。

2. desktop 文件

Linux GUI 系统会读取 helloworld.desktop 文件来知道如何呈现桌面图标。事实证明,当前的这个文件会在以后给你带来点麻烦,因此请进行一些小修改:添加 Categories= 这行并为其赋予值 GNOME。不要忘记最后的分号:

$ nano hello-world-appimage/helloworld.desktop
        add Categories=GNOME;

错误提示信息:没有设置 Categories的结果。

Categories entry not found in desktop file
.desktop file is missing a Categories= key

原因:

appimage官方有一个仓库,专门用来发布 用户制作的 appimage文件。

因此,这个仓库有一个分类,与用户 app desktop中的分类相对应;才能启动 appimage软件。

这造成一个麻烦,就是用户首先需要手动设置好自己的 desktop的 Categories=分类,才能运行这个软件。也许未来会改变成半自动吧?

Categories= key:key需要按要求给出,才能通过。随便写一个不合规定的字符串,是 NG的。

 

3. 运行

$ wget <https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage>
$ chmod +x appimagetool-x86_64.AppImage
$ ARCH=x86_64 ./appimagetool-x86_64.AppImage hello-world-appimage

如果你没有看到任何错误消息,那么表示完成了,请运行:

$ ls
$ ./hello-world-appimage-x86_64.AppImage

注:

1. 红色部分,应该是自动增加的。

2. 不同架构的 cpu,需要下载对应版本的 appimagetool ?

github 说明:cpu架构 与appimagetool的版本

Build log: https://github.com/AppImage/AppImageKit/runs/454445892
Assets 18

appimagetool-aarch64.AppImage
617 KB 2020-12-31T12:13:21Z
appimagetool-aarch64.AppImage.zsync
2.03 KB 2020-12-31T12:13:21Z
appimagetool-armhf.AppImage
552 KB 2020-12-31T12:13:22Z
appimagetool-armhf.AppImage.zsync
1.84 KB 2020-12-31T12:13:22Z
appimagetool-i686.AppImage
2.04 MB 2020-12-31T12:13:23Z
appimagetool-i686.AppImage.zsync
6.33 KB 2020-12-31T12:13:23Z
appimagetool-x86_64.AppImage
2.07 MB 2020-12-31T12:13:24Z
appimagetool-x86_64.AppImage.zsync
6.44 KB 2020-12-31T12:13:24Z
AppRun-aarch64
35.5 KB 2020-12-31T12:13:25Z
AppRun-armhf
26.3 KB 2020-12-31T12:13:25Z
Source code (zip)
2020-12-31T11:47:31Z
Source code (tar.gz)
2020-12-31T11:47:31Z

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值