Skip to content
alaahedhlyPublic

About

GTK3 network share manager with SMB, SFTP, and NFS support for Linux

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

NetMount

Warning: This project is no longer actively maintained. I am migrating away from Linux Mint, and this app was built specifically for that environment. No further updates or bug fixes are planned. Feel free to fork and continue development.

NetMount is a GTK3 desktop app for discovering, mounting, and managing network file shares on Linux. It gives you a dark-themed GUI for working with SMB/CIFS, SFTP, and NFS shares -- so you don't have to run mount.cifs, sshfs, or mount.nfs from the terminal.

NetMount scans your local network using Avahi (mDNS) and ARP table lookups, lists available shares, and lets you mount them with a few clicks. It monitors mount health, detects stale connections, and stores credentials in your system keyring.


Features

  • Network Discovery -- Finds hosts and services on the local network via Avahi mDNS and ARP table scanning (/proc/net/arp). SMB shares are listed automatically using smbclient.
  • Three Protocols -- Mount shares over SMB/CIFS, SFTP (via FUSE/sshfs), and NFS from one interface.
  • Mount Health Monitoring -- Polls /proc/mounts and runs stat() with a timeout thread to detect stale or unresponsive mounts.
  • Credential Storage -- Saves usernames and passwords in the system keyring via libsecret (GNOME Keyring / KDE Wallet), with per-share lookup and management.
  • Bookmarks & Recent Shares -- Save frequently used shares as bookmarks for one-click remounting. Recently mounted shares are tracked automatically (up to 20 entries).
  • Manual Mount Dialog -- Mount any share manually by specifying protocol, server, path, credentials, and mount point. Protocol-specific fields (domain, port, SSH key file) appear dynamically.
  • Open Files Detection -- Before unmounting, checks for processes with open file handles on the mount point using fuser, and warns before proceeding.
  • Catppuccin Mocha Theme -- Dark UI using the Catppuccin Mocha color palette with custom CSS classes.

Supported Protocols

Protocol Backend Mount Method Unmount Method Root Required
SMB/CIFS smbclient (discovery), mount.cifs (mount) pkexec mount.cifs pkexec umount Yes (via pkexec)
SFTP sshfs (FUSE) sshfs (userspace) fusermount -u No
NFS mount.nfs pkexec mount -t nfs pkexec umount Yes (via pkexec)

Screenshots

Screenshots coming soon.


Dependencies

Runtime

Package Purpose
Python 3.10+ Runtime
gir1.2-gtk-3.0 GTK3 UI framework
gir1.2-secret-1 libsecret credential storage (GNOME Keyring)
python3-gi PyGObject (GObject Introspection for Python)
avahi-utils avahi-browse for mDNS network discovery
smbclient SMB share enumeration
cifs-utils mount.cifs for SMB mounting
sshfs SFTP mounting via FUSE (optional, graceful degradation)
nfs-common mount.nfs for NFS mounting (optional)
fuse FUSE support for sshfs
psmisc fuser for open file detection

Install Dependencies (Debian/Ubuntu/Mint)

sudo apt install python3-gi gir1.2-gtk-3.0 gir1.2-secret-1 \
    avahi-utils smbclient cifs-utils sshfs nfs-common fuse psmisc

Installation

  1. Clone or download the source:

    git clone https://github.com/your-username/netmount.git
    cd netmount
  2. Run the install script:

    ./install.sh

    This will:

    • Copy the application to /opt/netmount/
    • Create a launcher at /usr/local/bin/netmount
    • Add a .desktop entry to /usr/share/applications/netmount.desktop
  3. Launch:

    netmount

Manual Installation

If you prefer not to use the install script, you can run directly from the source directory:

cd /path/to/parent-of-netmount
python3 -m netmount

Usage

Network Discovery Page

The Network page is the default view. On launch (if auto-scan is enabled), NetMount scans the local network for hosts advertising SMB, SFTP, or NFS services via mDNS, and also reads the ARP table for additional hosts. Discovered hosts appear as cards with protocol badges and per-share mount buttons.

  • Click Scan Network to trigger a manual rescan.
  • Click Mount on any discovered share to open the mount dialog with pre-filled details.
  • If a host advertises SFTP but has no enumerated shares, a default /home entry is shown.

Active Mounts Page

Shows all currently active network mounts (CIFS, NFS, NFS4, FUSE/sshfs) detected from /proc/mounts. Each mount displays:

  • A color-coded health indicator (green = connected, yellow = stale)
  • The local mount path and filesystem type
  • Open -- Open the mount point in the default file manager
  • Bookmark -- Save the mount as a bookmark
  • Unmount -- Unmount the share (with open-file warning if processes are using it)

Bookmarks Page

Displays saved bookmarks and recently mounted shares (up to 20). Bookmarks support one-click remounting: if credentials are saved in the keyring, the mount proceeds automatically; otherwise, the mount dialog opens for credential entry.

Settings Page

Configure application preferences:

Setting Default Description
Mount base directory /mnt/netmount Root directory for mount points
Default SMB version 3.0 SMB protocol version (2.0, 2.1, 3.0, 3.1.1)
UID / GID 1000 / 1000 File ownership for mounted SMB shares
Scan interval 60 seconds Time between automatic network scans
Monitor interval 5 seconds Polling interval for mount health checks
Auto-scan on launch Enabled Scan the network automatically when the app starts

The Settings page also lists all saved credentials from the system keyring with the option to delete individual entries.

Debug Mode

Run with verbose logging:

netmount --debug

Configuration

All configuration is stored under ~/.config/netmount/:

File Format Contents
settings.json JSON Application preferences (mount base, SMB version, intervals, UID/GID)
bookmarks.json JSON Saved share bookmarks
recent.json JSON Recently mounted shares (max 20)

Credentials are stored in the system keyring (GNOME Keyring or compatible) under the schema com.netmount.credentials, indexed by protocol, server, and share name.


Architecture

netmount/
├── __init__.py              # Package metadata (version, app ID)
├── __main__.py              # Entry point: argument parsing, logging, app launch
├── app.py                   # GtkApplication: wires backends, services, and UI
├── install.sh               # Installation script (/opt, launcher, .desktop)
│
├── models/
│   ├── share.py             # Share, DiscoveredHost, Protocol enum
│   └── mount_point.py       # MountPoint, MountStatus enum
│
├── backends/
│   ├── discovery.py         # NetworkScanner: Avahi mDNS + ARP table scanning
│   ├── smb_backend.py       # SmbBackend: smbclient enumeration, mount.cifs
│   ├── sftp_backend.py      # SftpBackend: sshfs FUSE mount/unmount
│   ├── nfs_backend.py       # NfsBackend: mount.nfs via pkexec
│   ├── credential_store.py  # CredentialStore: libsecret keyring integration
│   └── mount_monitor.py     # MountMonitor: /proc/mounts polling + stat() health
│
├── services/
│   ├── mount_service.py     # MountService: async mount/unmount orchestration
│   └── bookmark_service.py  # BookmarkService: bookmarks + recent shares (JSON)
│
└── ui/
    ├── theme.py             # Catppuccin Mocha CSS theme
    ├── main_window.py       # MainWindow: sidebar navigation + page stack
    ├── network_page.py      # NetworkPage + MountDialog
    ├── mounts_page.py       # MountsPage: active mount list with health status
    ├── bookmarks_page.py    # BookmarksPage: bookmarks + recent shares
    └── settings_page.py     # SettingsPage: preferences + credential management

Key Design Patterns

  • GObject Signals -- The NetworkScanner, MountMonitor, and MountService emit GObject signals (host-found, scan-done, mount-success, mount-stale, etc.) that the UI listens to for reactive updates.
  • Threaded Backends -- All network operations (scanning, mounting, unmounting) run in background threads via ThreadPoolExecutor or threading.Thread. Results are marshalled back to the GTK main loop using GLib.idle_add.
  • Health Monitoring -- MountMonitor runs a GLib timer that reads /proc/mounts to detect network filesystem entries (cifs, nfs, nfs4, fuse.sshfs) and performs a stat() call with a timeout thread to detect hung/stale mounts.
  • Privilege Escalation -- SMB and NFS mounts require root privileges. NetMount uses pkexec (PolicyKit) for graphical privilege escalation rather than requiring the app to run as root. SFTP mounts via sshfs run entirely in userspace.
  • Graceful Degradation -- If sshfs is not installed, the SFTP backend shows an install hint in the mount dialog. Other protocols still work fine.

License

MIT

About

GTK3 network share manager with SMB, SFTP, and NFS support for Linux

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages