Skip to content

About

No description, website, or topics provided.

Resources

Stars

10 stars

Watchers

0 watching

Forks

Latest commit

 

History

9 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ollama Desktop Linux

Ollama Desktop — Linux (Ubuntu/GTK)

Native GTK3 + WebKit2GTK desktop app for Ollama on Linux.

Platform GTK WebKit Go Ollama License

This is a Linux port of the official Ollama desktop app (from the main ollama/ollama repo).
The official app ships Windows and macOS binaries only. This port removes that restriction.

Tested on: Ubuntu 26.04 · GNOME 50 · Wayland · NVIDIA RTX 5070


What it is

  • A GTK3 window containing a WebKit2GTK browser rendering Ollama's React frontend
  • Talks to your existing Ollama service at localhost:11434 — does not start or manage the Ollama daemon
  • Full chat UI: model selection, file attachments, settings, chat history (SQLite)
  • Single-instance lockfile, zenity file/folder dialogs, dark mode
  • Wayland-native — no XWayland required

Prerequisites

Runtime

sudo apt install libwebkit2gtk-4.1-0 libgtk-3-0 zenity

Build

sudo apt install \
    libwebkit2gtk-4.1-dev libgtk-3-dev \
    golang-go nodejs npm \
    pkg-config git

Go 1.21+ required. Check with go version.


Build & Install

git clone https://github.com/johnohhh1/ollama-webchat-ubuntu.git
cd ollama-webchat-ubuntu
bash build.sh

The script will:

  1. Clone ollama at the pinned tag
  2. Apply the Linux port patch
  3. Build the React frontend (npm run build)
  4. Compile the Go binary

The binary lands at build/ollama-app. Install it:

sudo cp build/ollama-app /usr/local/bin/ollama-app

Usage

Make sure Ollama is running:

ollama serve   # or: sudo systemctl start ollama

Launch the app:

ollama-app

Or search for it in your application launcher.

Stale lockfile

If the app crashes without cleaning up, delete the lock before restarting:

rm -f ~/.ollama/app.lock && ollama-app

How the port works

The upstream app/ directory was gated with //go:build windows || darwin on ~40 files. The underlying C webview library (webview.h) already has full GTK/WebKit2GTK Linux support built in — only the Go build tags were blocking Linux compilation.

Changes made

File / Area Change
~40 app/**/*.go files Build tag: windows || darwin → windows || darwin || linux
app/webview/webview.go Added Linux CGo flags: WEBVIEW_GTK, gtk+-3.0, webkit2gtk-4.1
app/cmd/app/app_linux.go GTK window management, lockfile single-instance, signal cleanup
app/cmd/app/webview_linux.go Webview struct + JS bindings (show/hide/drag/zoom/file picker)
app/cmd/app/filepicker_linux.go zenity directory and multi-file choosers
app/server/server_linux.go Health-check only — never spawns a process, uses existing systemd service
app/updater/updater_linux.go All no-ops — no auto-update on Linux
app/dialog/dlgs_linux.go zenity dialogs (yes/no, info, error, file open/save)
app/ui/app/src/components/ChatSidebar.tsx Settings link was isWindows-gated; fixed to show on Linux too

Known issues

EGL warnings on startup

On NVIDIA proprietary drivers you'll see Mesa EGL warnings — these are harmless. WebKit falls back to Cairo software rendering for the compositor. For a chat UI this is imperceptible.

libEGL warning: egl: failed to create dri2 screen
libEGL warning: pci id for fd N: 10de:XXXX, driver (null)

Compatibility

Distro GTK WebKit Status
Ubuntu 26.04 3.24 4.1 Tested
Ubuntu 24.04 3.24 4.1 Should work
Fedora 40+ 3.24 4.1 Should work
Arch Linux 3.24 4.1 Should work

Requires webkit2gtk-4.1. Ubuntu 22.04 ships 4.0 only — not compatible without a PPA.


License

The Ollama desktop app source is MIT licensed (see ollama/ollama). The Linux port files in this repo are also MIT.

About

No description, website, or topics provided.

Resources

Stars

10 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages