A port of CoreDesktop's configure to Pop!_OS 24.04 with COSMIC, in the shape of connector-macos: its own install.sh, update and configure, installed in ~/.local/share/federated-connector/connector. Every configure item is ported: the Core (email, calendars and contacts through GNOME Online Accounts and Evolution, as COSMIC has no accounts of its own; Superpanel; files over davfs2; Element; Tally; the email watcher), Tailscale, backups, AI agents in the sandbox and their sign-ins, languages with mise, AI servers, printers, network storage and the agent sandbox. Folders go in the COSMIC Files sidebar. Each item installs what it needs from apt, Flathub or the tool's own apt repository when you set it up. smoketest/run checks it in Ubuntu 24.04 containers with Docker. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
35 lines
1.4 KiB
Bash
Executable File
35 lines
1.4 KiB
Bash
Executable File
#!/bin/bash
|
|
#
|
|
# Purpose : Mount a folder from another machine over SFTP (sshfs) and stay in
|
|
# the foreground until it's unmounted. A systemd user service that
|
|
# `configure storage` writes runs it at login.
|
|
#
|
|
# It runs as you, not root, so it can use your SSH keys: Bitwarden's SSH agent
|
|
# while Bitwarden is running it, otherwise the keyring's, which Pop!_OS starts
|
|
# with your session. It never asks for a password, so the server has to
|
|
# accept one of those keys.
|
|
#
|
|
# Usage: sftp-mount <user@host:path> <mount point>
|
|
|
|
if [ $# -ne 2 ]; then
|
|
echo "Usage: sftp-mount <user@host:path> <mount point>" >&2
|
|
exit 2
|
|
fi
|
|
|
|
if [ -S "$HOME/.bitwarden-ssh-agent.sock" ]; then
|
|
export SSH_AUTH_SOCK="$HOME/.bitwarden-ssh-agent.sock"
|
|
elif [ -S "${XDG_RUNTIME_DIR:-/run/user/$UID}/keyring/ssh" ]; then
|
|
export SSH_AUTH_SOCK="${XDG_RUNTIME_DIR:-/run/user/$UID}/keyring/ssh"
|
|
elif [ -S "${XDG_RUNTIME_DIR:-/run/user/$UID}/gcr/ssh" ]; then
|
|
export SSH_AUTH_SOCK="${XDG_RUNTIME_DIR:-/run/user/$UID}/gcr/ssh"
|
|
fi
|
|
|
|
# A mount left behind by a crash would make sshfs fail
|
|
mountpoint -q "$2" && fusermount3 -u "$2"
|
|
|
|
# reconnect and ServerAlive* bring it back after the network drops (e.g.
|
|
# suspend); idmap=user shows your files on the server as yours here
|
|
exec sshfs -f "$1" "$2" \
|
|
-o reconnect,ServerAliveInterval=15,ServerAliveCountMax=3 \
|
|
-o BatchMode=yes,ConnectTimeout=15,idmap=user
|