|
| 1 | +# Linux Dev: Dock Icon Setup |
| 2 | + |
| 3 | +When running `npm run tauri:dev` on Linux (GNOME, KDE, etc.), the app appears in the dock/taskbar without an icon. This is expected — during development there's no installed `.desktop` file, so the desktop environment can't match the window to an icon. |
| 4 | + |
| 5 | +This only affects development. Installed packages (.deb, .rpm, Flatpak, AUR) include a proper `.desktop` file and icons. |
| 6 | + |
| 7 | +## Fix |
| 8 | + |
| 9 | +### 1. Find the WM_CLASS |
| 10 | + |
| 11 | +Start the app with `npm run tauri:dev`, then in another terminal: |
| 12 | + |
| 13 | +```bash |
| 14 | +xprop WM_CLASS |
| 15 | +``` |
| 16 | + |
| 17 | +Click the Fluux window. You'll see something like: |
| 18 | + |
| 19 | +``` |
| 20 | +WM_CLASS(STRING) = "fluux", "fluux" |
| 21 | +``` |
| 22 | + |
| 23 | +Note the value (likely `fluux`, the binary name from `Cargo.toml`). |
| 24 | + |
| 25 | +### 2. Create a dev .desktop file |
| 26 | + |
| 27 | +Create `~/.local/share/applications/fluux-messenger-dev.desktop`: |
| 28 | + |
| 29 | +```ini |
| 30 | +[Desktop Entry] |
| 31 | +Name=Fluux Messenger (Dev) |
| 32 | +Exec=/absolute/path/to/fluux-messenger/apps/fluux/src-tauri/target/debug/fluux |
| 33 | +Icon=/absolute/path/to/fluux-messenger/apps/fluux/src-tauri/icons/128x128.png |
| 34 | +Terminal=false |
| 35 | +Type=Application |
| 36 | +StartupWMClass=fluux |
| 37 | +``` |
| 38 | + |
| 39 | +Replace `/absolute/path/to/fluux-messenger` with your actual checkout path, and adjust `StartupWMClass` to match the value from step 1. |
| 40 | + |
| 41 | +### 3. Update the icon cache |
| 42 | + |
| 43 | +```bash |
| 44 | +update-desktop-database ~/.local/share/applications/ |
| 45 | +``` |
| 46 | + |
| 47 | +### 4. Verify |
| 48 | + |
| 49 | +Restart `npm run tauri:dev` — the Fluux icon should now appear in the dock. |
| 50 | + |
| 51 | +## Notes |
| 52 | + |
| 53 | +- This file is local to your machine and not tracked in git. |
| 54 | +- If you switch between debug and release builds, the `Exec` path doesn't matter for icon matching — only `StartupWMClass` needs to match. |
| 55 | +- On Wayland, the app ID may come from the GTK application ID (`com.processone.fluux`) instead of `WM_CLASS`. If the icon still doesn't appear, try setting `StartupWMClass=com.processone.fluux`. |
0 commit comments