sun(1)

NAME
sun - Slackware Update Notifier: tray applet, daemon, and CLI tool.

SYNOPSIS
sun [COMMAND] [OPTIONS]

DESCRIPTION

SUN (Slackware Update Notifier) is a tray notification applet and background daemon that monitors the Slackware ChangeLog.txt for package updates and notifies the desktop user when new updates are available. It can also be used as a CLI tool for checking updates and viewing OS and machine information.

SUN fetches the remote ChangeLog.txt at a configurable interval, compares it with the locally cached copy, and raises a desktop notification if differences are found. The tray icon reflects the current update state and provides quick access to the notifier.

SUN must not be run as root.

COMMANDS

start
    Start the SUN background daemon (sun-daemon). Prints the daemon PID on success, or reports that the daemon is already running.

start --tray
    Launch the tray icon application (sun-tray) as a detached process. The tray icon integrates with the desktop environment and shows notification status.

stop
    Stop the running SUN daemon. Prints the PID of the stopped process.

restart
    Stop and restart the SUN daemon. Equivalent to stop followed by start.

status
    Report whether the SUN daemon is currently running, and if so, its PID.

check [pattern]
    Fetch the remote ChangeLog.txt and print any available package updates to the terminal. Does not require the daemon to be running. An optional pattern argument filters the output to packages whose names contain the given string (case-insensitive). If the configured HTTP_MIRROR does not match the installed Slackware version (stable 15.0 vs current 15.0+), a warning is printed before the results. The warning can be suppressed by setting IGNORE_MIRROR_WARNING = true in sun.conf.

pending
    List installed packages that have a newer version available in the repository but have not yet been upgraded. The package manager is auto-detected from LOG_PATH in sun.conf: data.json is used for slpkg, PACKAGES.TXT for slackpkg. Each line shows the available version and the currently installed version.

info
    Print OS and machine information to the terminal (distribution, kernel version, hostname, CPU, memory, uptime, and similar details).

changelog
    Fetch the remote ChangeLog.txt and display it in a pager (uses $PAGER or falls back to less). Does not require the daemon to be running. The tray icon ChangeLog dialog shows only the first 1000 lines; use this command to view the full file.

log
    Display the sun-daemon log file (~/.local/share/sun/sun-daemon.log) in a pager. Shows daemon start/stop events, update check results, notifications, and errors.

config
    Print the current sun.conf configuration with aligned key = value output per section. Reads the values directly from /etc/sun/sun.conf, including all settings and their defaults.

OPTIONS

--tray
    Start the tray icon application. Used with start.

-n, --no-color
    Disable colored output. Applies to the check, pending, and info commands.

-v, --version
    Show the version number and exit.

-h, --help
    Show the help message and exit.

EXAMPLES

Start the SUN daemon:

    sun start

Start the tray icon from the terminal:

    sun start --tray

Check for available updates without the daemon:

    sun check

Check for updates matching a pattern:

    sun check kernel

List packages pending upgrade:

    sun pending

View the remote ChangeLog in a pager:

    sun changelog

Show daemon status:

    sun status

Show OS and machine information:

    sun info

Restart the daemon after editing the configuration file:

    sun restart

View the daemon log:

    sun log

View the current configuration:

    sun config

UTILITIES

sun-daemon
    The background daemon process. It fetches and compares ChangeLog.txt at the interval defined by INTERVAL in /etc/sun/sun.conf, then raises a desktop notification when updates are detected. Normally managed through the sun start and sun stop commands. Can also be launched directly or via a system init script.

sun-tray
    The tray icon application. Displays a system tray icon that reflects the current update state and provides a graphical interface for the notifier. Requires a running X session and a compatible system tray (e.g. XFCE, KDE, LXQt). A configurable startup delay (DELAY_LOAD in /etc/sun/sun.conf) ensures the desktop environment is fully loaded before the icon appears. When the daemon is not running, the tray icon is displayed in greyscale; it returns to its normal appearance automatically after the daemon is started. A red numeric badge is overlaid on the tray icon when new updates are available in the remote repository, and a yellow badge is shown when packages have been synced but not yet upgraded locally; the tooltip reflects both states. The badge is updated silently in the background at the interval defined by BADGE_INTERVAL and also refreshes immediately when the local ChangeLog.txt, data.json (slpkg), or PACKAGES.TXT (slackpkg) is modified, or when packages are installed or removed from /var/log/packages. The context menu provides a Daemon submenu (Start, Stop, Restart, Status), Check Updates, Pending Upgrades, Os Info, ChangeLog, SUN Log (daemon log viewer), Config (current configuration viewer), Reload app, About, and Exit.

sun-autostart
    Manages the XDG autostart entry for sun-daemon. Accepts one of three actions: enable, disable, or status. Enabling renames the sun-daemon.desktop.sample file to sun-daemon.desktop so that the daemon starts automatically at login. Disabling reverses the operation. Installed to /usr/sbin/sun-autostart.

sun-tray_autostart
    Launches sun-tray at login via the XDG autostart mechanism. The corresponding .desktop file is installed to /etc/xdg/autostart/.

FILES

  Configuration

/etc/sun/sun.conf
    Main configuration file. Controls the HTTP mirror URL, local ChangeLog.txt path, check interval, standby time, and tray icon startup delay. On upgrade the new version is installed as /etc/sun/sun.conf.new and the existing file is preserved.

/etc/sun/blacklist.conf
    Blacklist file for the pending command. Package names listed under PACKAGES in the [BLACKLIST] section are excluded from the pending upgrade check. One name per line, no version or architecture. On upgrade the new version is installed as /etc/sun/blacklist.conf.new and the existing file is preserved.

  Runtime

~/.run/sun-daemon.pid
    PID file written by sun-daemon on startup and removed on exit. Used by sun status to determine whether the daemon is running.

~/.run/sun-tray.pid
    PID file written by sun-tray on startup and removed on exit. Used by sun-daemon to send SIGUSR1 to the tray process after finding updates, so the badge refreshes immediately.

~/.local/share/sun/sun-daemon.log
    Rotating log file written by sun-daemon. Records daemon start/stop events, update check results, notifications shown, and errors. Maximum size 1 MB with 2 backups.

  Autostart

/etc/xdg/autostart/sun-tray_autostart.desktop
    XDG autostart entry for the tray icon application. Enables automatic launch of sun-tray when the desktop session starts.

/etc/xdg/autostart/sun-daemon.desktop.sample
    Sample XDG autostart entry for sun-daemon. Copy and rename without the .sample suffix to enable autostart of the daemon.

CONFIGURATION

The configuration file /etc/sun/sun.conf uses INI-style sections. The main settings are:

[REPOSITORY]

HTTP_MIRROR
    URL of the Slackware mirror from which ChangeLog.txt is fetched. Replace with a regional mirror from /etc/slackpkg/mirrors.

LOG_PATH
    Path to the directory containing the local ChangeLog.txt (e.g. /var/lib/slackpkg/ for slackpkg or /var/lib/slpkg/repos/slack/ for slpkg).

LOG_FILE
    Name of the changelog file. Default: ChangeLog.txt.

IGNORE_MIRROR_WARNING
    Set to true to suppress the warning shown by sun check and the tray Check Updates dialog when the configured HTTP_MIRROR does not match the installed Slackware version. Useful if you intentionally track a different branch. Default: false.

HTTP_TIMEOUT
    Timeout in seconds for HTTP requests to the mirror. Increase this value on slow connections to avoid premature failures. Default: 30.

[TIME]

INTERVAL
    How often (in minutes) the daemon checks for updates. Default: 720 (12 hours).

STANDBY
    Time (in minutes) the notifier icon remains visible after a notification. Default: 5.

NOTIFICATIONS
    Enable or disable desktop notifications. Set to false to suppress notifications while the tray badge continues to update normally. Requires a daemon restart to take effect. Default: true.

[TRAY_ICON]

DELAY_LOAD
    Seconds to wait after session start before launching the tray icon, to allow the desktop environment to load theme settings. Increase this value if the icon does not match the OS theme. Default: 5.

MAX_PACKAGES
    Maximum number of packages displayed in the tray icon popup when updates are available. If more packages exist, an and more... note is appended. Default: 10.

BADGE_INTERVAL
    How often (in minutes) the tray icon silently checks for updates and refreshes the badge counter. Independent of INTERVAL (daemon notification). Default: 180.

COLORED_OUTPUT
    Enable or disable colored output in the tray icon dialogs. Set to false to display plain text. Default: true.

LOG_FONT_SIZE
    Font size in points for the ChangeLog and SUN Log dialogs. Default: 10.

After editing /etc/sun/sun.conf, changes to [REPOSITORY] and [TIME] require a daemon restart:

    sun restart

Changes to [TRAY_ICON] take effect after selecting Reload app from the tray icon context menu.

EXIT STATUS

0   Successful execution.

1   Error: invalid arguments, daemon already running, daemon not running, or the tool was invoked as root.

REPORT BUGS

Please report any found to: https://gitlab.com/dslackw/sun/-/issues.

NOTES

To enable or disable automatic startup of the daemon at login, use the sun-autostart utility (requires root privileges):

    sun-autostart enable
    sun-autostart disable
    sun-autostart status

SEE ALSO
slackpkg(8), slpkg(1)

AUTHOR

Dimitris Zlatanidis <dslackw@gmail.com>

COPYRIGHT
Copyright © 2015-2026 Dimitris Zlatanidis. Licensed under the GNU General Public License v3 or later (GPLv3+).