Skip to content

Instantly share code, notes, and snippets.

@gotnix
Last active March 28, 2024 03:30
Show Gist options
  • Save gotnix/513e3d5476999bb6b302ffff4c91224d to your computer and use it in GitHub Desktop.
Save gotnix/513e3d5476999bb6b302ffff4c91224d to your computer and use it in GitHub Desktop.
Debian 12 install Flatpak 和 Localsend

首先,LocalSend (官网,代码仓库:GitHubCodeBerg) 是个 Gtk 应用,只能在 GUI 环境下运行;如果系统运行了 X Window System(本地和远程的都可以,通过 DISPLAY 环境变量设置 xServer),也可以通过 CLI 启动命令运行,然后启动 GUI 窗口,安装和运行步骤如下:

  1. 安装和配置 Flatpak
# Debian 12 配置 Flatpak
# 其它 Linux 发行版请参考 [设置 Flathub | Flathub](https://flathub.org/zh-Hans/setup)
apt install flatpak
# 中国大陆这一步需要代理
flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
# 设置 flathub 使用“上海交通大学 Linux 用户组 软件源镜像服务”
flatpak remote-modify flathub --url=https://mirror.sjtu.edu.cn/flathub
  1. 使用 flatpak 安装 LocalSend
# 安装 LocalSend
flatpak install  flathub org.localsend.localsend_app
Looking for matches…
Required runtime for org.localsend.localsend_app/x86_64/stable (runtime/org.freedesktop.Platform/x86_64/23.08) found in remote flathub
Do you want to install it? [Y/n]: y

org.localsend.localsend_app permissions:
    ipc        network                fallback-x11           wayland                      x11
    dri        file access [1]        dbus access [2]        system dbus access [3]

    [1] xdg-download
    [2] org.kde.StatusNotifierWatcher
    [3] org.freedesktop.NetworkManager, org.freedesktop.hostname1


        ID                                         Branch             Op        Remote         Download
 1. [✓] org.freedesktop.Platform.GL.default        23.08              i         flathub        164.4 MB / 164.6 MB
 2. [✓] org.freedesktop.Platform.GL.default        23.08-extra        i         flathub         18.5 MB / 164.6 MB
 3. [✓] org.freedesktop.Platform.Locale            23.08              i         flathub         17.9 kB / 360.0 MB
 4. [✓] org.freedesktop.Platform.openh264          2.2.0              i         flathub          1.2 MB / 944.3 kB
 5. [✓] org.freedesktop.Platform                   23.08              i         flathub        259.7 MB / 225.8 MB
 6. [✓] org.localsend.localsend_app                stable             i         flathub         20.3 MB / 17.6 MB

Installation complete.
# 启动 LocalSend
flatpak run org.localsend.localsend_app
# 如果没有 X Window System 不能启动,报错如下
(localsend:2): Gtk-WARNING **: 10:55:57.790: cannot open display:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment