Sailfish OS Setup

This page covers installing Sailfish X on the Xperia 10 V, enabling developer mode, setting up the terminal environment, and configuring SSH connectivity for cyberdeck use.

Installing Sailfish X

Sailfish X is Jolla's official port of Sailfish OS for Sony Xperia devices. You'll need to purchase a licence from the Jolla Shop (around €50) to get the full experience including Android app support.

Prerequisites

Before You Begin

Use the phone with Android for a while first — make calls, test the SIM, verify everything works. Unlocking the bootloader will void Sony's warranty and trip the DRM key, which disables some camera features (not relevant for this project, but worth knowing).

Installation Overview

The full installation process takes about 25 minutes:

  1. Update phone to Android 13 or 14
  2. Enable Developer Options and OEM unlocking
  3. Download Sailfish OS image from Jolla
  4. Download Sony AOSP binaries
  5. Get bootloader unlock code from Sony
  6. Flash Sailfish OS via fastboot
  7. Complete initial setup and sign into Jolla account
Linux Installation
# 1. Download Sailfish X from Jolla Shop (requires login)
# Extract to a folder, e.g. ~/sailfish

# 2. Download Sony binaries
# SW_binaries_for_Xperia_Android_14_5.4_v3a_zambezi.zip
# Extract the .img file to same folder

# 3. Get unlock code from Sony Developer World
# https://developer.sony.com/open-source/aosp-on-xperia-open-devices/get-started/unlock-bootloader

# 4. Boot phone into fastboot mode
# Power off, hold Volume Up, connect USB
# LED should turn blue

# 5. Unlock bootloader
cd ~/sailfish
fastboot oem unlock 0xYOUR_UNLOCK_CODE

# 6. Flash Sailfish OS
./flash.sh

# 7. Reboot and complete setup

For detailed step-by-step instructions, see Jolla's official guides:

Enable Developer Mode

Developer mode gives you terminal access and root privileges via devel-su. This is essential for the cyberdeck use case.

  1. Open Settings
  2. Navigate to Developer tools
  3. Enable Developer mode
  4. Set a password for remote SSH access (optional but recommended)
  5. The Terminal app will now appear in your app drawer
First Terminal Session
# Open Terminal app
# You're now in a bash shell as user 'defaultuser'

# Become root
devel-su
[password if set, or just press enter]

# Check system info
cat /etc/os-release
NAME="Sailfish OS"
VERSION="4.6.0.15"
...

# Update system packages
pkcon refresh
pkcon update

Package Management

Sailfish uses RPM packages with two package managers: pkcon (PackageKit) and zypper.

Basic Package Commands

Package Management
# Using pkcon (user-friendly)
pkcon search name openssh
pkcon install openssh-clients
pkcon remove package-name
pkcon refresh
pkcon update

# Using zypper (more control, needs root)
devel-su
zypper refresh
zypper search mosh
zypper install mosh
zypper remove package-name

Essential Packages for Cyberdeck Use

Essential Packages
devel-su

# SSH client (probably already installed)
pkcon install openssh-clients

# Mosh - mobile shell, handles connection drops gracefully
zypper install mosh

# tmux - terminal multiplexer (useful locally too)
zypper install tmux

# vim/nano - text editors
zypper install vim nano

# Git - for dotfiles and configs
zypper install git

# htop - system monitoring
zypper install htop

# curl/wget - downloads
zypper install curl wget

Community Repositories

The default Jolla repos are limited. For more packages, consider:

SSH Configuration

Setting up SSH keys and configuration for seamless bastion access.

Generate SSH Keys

SSH Key Setup
# Generate ED25519 key (recommended)
ssh-keygen -t ed25519 -C "cyberdeck@sailfish"
Generating public/private ed25519 key pair.
Enter file in which to save the key (/home/defaultuser/.ssh/id_ed25519):
Enter passphrase (empty for no passphrase):
...

# Display public key (copy this to your bastion)
cat ~/.ssh/id_ed25519.pub
ssh-ed25519 AAAA... cyberdeck@sailfish

# Set correct permissions
chmod 700 ~/.ssh
chmod 600 ~/.ssh/id_ed25519
chmod 644 ~/.ssh/id_ed25519.pub

SSH Config File

Create ~/.ssh/config to simplify connections:

~/.ssh/config
# Bastion server via Tailscale
Host bastion
    HostName 100.x.x.x          # Tailscale IP
    User your-username
    IdentityFile ~/.ssh/id_ed25519
    ServerAliveInterval 60
    ServerAliveCountMax 3
    
# Alternative: Direct connection
Host bastion-direct
    HostName your.server.com
    Port 22
    User your-username
    IdentityFile ~/.ssh/id_ed25519

# Global defaults
Host *
    AddKeysToAgent yes
    IdentitiesOnly yes

Now you can simply type ssh bastion instead of the full connection string.

Mosh Setup

Mosh (Mobile Shell) is essential for mobile use. It handles connection drops, roaming between networks, and high-latency connections far better than raw SSH.

Mosh Usage
# Install mosh on both Sailfish device AND bastion server

# Basic connection
mosh bastion

# Connect and attach to tmux session
mosh bastion -- tmux attach -t main

# Specify port (if needed)
mosh --ssh="ssh -p 2222" bastion

# Use with SSH config host
mosh bastion
[mosh uses SSH for initial auth, then UDP for session]
Mosh Ports

Mosh uses UDP ports 60000-61000 by default. If connecting via Tailscale, this should just work. For direct connections, ensure these ports are open on your server's firewall.

Terminal App Configuration

The built-in Sailfish terminal is serviceable, but you might want a better terminal app for extended use.

Terminal App Options

Shell Configuration

Create or edit ~/.bashrc for customisation:

~/.bashrc
# Custom prompt showing hostname
export PS1='\[\033[01;32m\]cyberdeck\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '

# Useful aliases
alias ll='ls -la'
alias b='mosh bastion -- tmux attach -t main || mosh bastion -- tmux new -s main'
alias bs='ssh bastion'

# History settings
export HISTSIZE=10000
export HISTFILESIZE=20000
export HISTCONTROL=ignoredups:erasedups

# Default editor
export EDITOR=vim

Tailscale on Sailfish

Tailscale provides a zero-config VPN to your bastion server. There's a community port for Sailfish.

Tailscale Setup
# Check Chum or OpenRepos for Tailscale packages
# Or install manually from Tailscale's Linux packages

# Start Tailscale
devel-su
tailscaled --state=/var/lib/tailscale/tailscaled.state &

# Authenticate
tailscale up
[Opens browser for authentication]

# Check status
tailscale status
100.x.x.x   cyberdeck    ...
100.x.x.y   bastion      ...

# Now you can SSH to bastion via Tailscale IP
ssh 100.x.x.y
Alternative: WireGuard

If you prefer manual VPN configuration, WireGuard is also available. It requires more setup but doesn't depend on a third-party coordination server.

Troubleshooting

USB OTG Not Working

SSH Connection Refused

Mosh Connection Issues