[Slackbuilds-users] Easy typo
Yiannis
rizitis at gmail.com
Wed Aug 12 12:02:53 UTC 2026
Please when you have free time read attachment.
You will save a lot of time just to correct it than to create it from
scratch
Στις Τετ 12 Αυγ 2026 στις 2:08 μ.μ., ο/η B. Watson <urchlay at slackware.uk>
έγραψε:
>
>
> On Wed, 12 Aug 2026, Yiannis wrote:
>
> > Thank you for the answer.
> > In fact I have my answer now, because it is not a real package manager
> as we know
> > and probably since it only search for packages + download them
> > I think Categories=Network;FileTransfer; is the correct?
>
> That makes sense. And it's more specific than "System", which tends
> to be a catch-all category when people don't put much thought into
> picking a category...
>
> > In any case a HOWTO for .desktop entries is worth it!!
>
> Yeah. Maybe a whole new "Maintainer HOWTOs" section on the site. If
> I'm doing the writing, I tend to be long-winded, so it's better not
> to just jam all the unrelated stuff (.desktop files, cmake variable
> overrides, icons, using the correct -std= for CFLAGS, etc) into one
> long page.
>
> It'd be better if I wasn't the only one doing the writing. But a
> lot of this stuff never gets discussed, so I have no idea what other
> people do or don't know about
> it._______________________________________________
> SlackBuilds-users mailing list
> SlackBuilds-users at slackbuilds.org
> https://lists.slackbuilds.org/mailman/listinfo/slackbuilds-users
> Archives - https://lists.slackbuilds.org/pipermail/slackbuilds-users/
> FAQ - https://slackbuilds.org/faq/
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.slackbuilds.org/pipermail/slackbuilds-users/attachments/20260812/d5ea7870/attachment.htm>
-------------- next part --------------
======================================================================
.desktop FILES FOR SLACKBUILDS - A SHORT GUIDE
======================================================================
If your package installs a .desktop file, this is what you need to
get right. Everything here was tested with desktop-file-validate 0.27.
----------------------------------------------------------------------
THE LINE
----------------------------------------------------------------------
Categories=Network;WebBrowser;ConsoleOnly;
Rules:
- At least one MAIN category (the list below). Without it your
program lands in a catch-all menu.
- Additional categories are optional and make placement precise.
- Case-sensitive. "network" is not "Network".
- Anything not in the lists must start with X- -> X-Slackware
- End with a semicolon. Technically optional, but everyone does it.
----------------------------------------------------------------------
MAIN CATEGORIES - pick one
----------------------------------------------------------------------
AudioVideo multimedia, audio and/or video
Audio audio only (must also include AudioVideo)
Video video only (must also include AudioVideo)
Development programming tools
Education educational software
Game games
Graphics images, drawing, 3D
Network anything that talks over a network
Office documents, mail, calendars
Science scientific software
Settings changes the USER'S desktop (theme, keyboard)
System inspects or administers the MACHINE (logs, disks)
Utility small tools that fit nowhere else
Two main categories means the entry shows up in two menus. Rarely
what you want.
Do NOT use HealthFitness. It is in the newest spec draft but
desktop-file-validate rejects it, so sbopkglint fails your package.
----------------------------------------------------------------------
ADDITIONAL CATEGORIES - the ones you will actually use
----------------------------------------------------------------------
Network WebBrowser Email Chat IRCClient FileTransfer P2P
News Feed RemoteAccess Telephony Monitor
Development Building Debugger IDE RevisionControl Profiling
Translation WebDevelopment
Office WordProcessor Spreadsheet Presentation Calendar
Database Chart Finance Viewer Publishing
Graphics 2DGraphics 3DGraphics RasterGraphics VectorGraphics
Photography Scanning OCR Viewer
AudioVideo Player Recorder Mixer Sequencer Midi Tuner TV
AudioVideoEditing DiscBurning
System Monitor Security FileTools FileManager Filesystem
TerminalEmulator Emulator PackageManager
Settings DesktopSettings HardwareSettings Printing Security
Accessibility
Utility Calculator Clock TextEditor TextTools Archiving
Compression FileTools
Game ActionGame AdventureGame ArcadeGame BoardGame
BlocksGame CardGame KidsGame LogicGame RolePlaying
Shooter Simulation SportsGame StrategyGame Emulator
Science Astronomy Biology Chemistry Physics Math Robotics
Education Geography Geology History Languages Literature
ComputerScience MedicalSoftware DataVisualization
Any ConsoleOnly Documentation Amusement Engineering
Electronics GTK Qt
If nothing matches exactly, add nothing. An approximate additional
category is worse than none.
----------------------------------------------------------------------
SOME NEED A COMPANION
----------------------------------------------------------------------
A few additional categories expect a second one alongside them.
Leave it out and the entry gets filed badly:
RasterGraphics needs Graphics;2DGraphics
VectorGraphics needs Graphics;2DGraphics
OCR needs Graphics;Scanning
FileManager needs System;FileTools
Compression needs Utility;Archiving
Printing needs HardwareSettings;Settings
Mixer, Midi,
Sequencer, Tuner need AudioVideo;Audio
TV needs AudioVideo;Video
Example:
Categories=Graphics;RasterGraphics; wrong
Categories=Graphics;2DGraphics;RasterGraphics; right
----------------------------------------------------------------------
HOW TO PICK
----------------------------------------------------------------------
Finish this sentence: "This program lets the user ______."
Then match the verb to one main category, and add one additional
category if a precise one exists.
browses the web in a terminal
Categories=Network;WebBrowser;ConsoleOnly;
Terminal=true
edits photographs
Categories=Graphics;2DGraphics;RasterGraphics;Photography;
sets volume and picks an output device
Categories=AudioVideo;Audio;Mixer;
watches CPU and memory
Categories=System;Monitor;
manages files
Categories=System;FileTools;FileManager;
takes notes
Categories=Utility;TextEditor;
plays a Tetris clone
Categories=Game;BlocksGame;
is Slackware-specific with no good fit
Categories=System;X-Slackware;
----------------------------------------------------------------------
THE OTHER KEYS
----------------------------------------------------------------------
Terminal=true
Required for any console program. Forget it and clicking the
menu entry appears to do nothing at all.
Version=1.0
Version of the SPECIFICATION, not of your program. Accepted
values are 1.0 to 1.5. This trips up nearly everyone once.
Icon=foo
A name from the icon theme - no path, no extension.
Ship the icon upstream provides:
mkdir -p $PKG/usr/share/icons/hicolor/48x48/apps
cat $CWD/$PRGNAM.png \
> $PKG/usr/share/icons/hicolor/48x48/apps/$PRGNAM.png
and use Icon=$PRGNAM. The Icon Naming Specification says an
application must either install an icon named after its
executable, or use one of the generic APPLICATION names - and
it explicitly says application icons must not fall back to
generic mimetype icons.
NO ICON AT ALL? Leave the Icon= line out entirely. It is not a
required key, the file validates clean without it, and the
desktop then picks its own fallback - which is guaranteed to
exist. Do not borrow a mimetype name like package-x-generic:
it is the wrong context, and whether it exists depends on the
user's theme.
Nothing checks that the icon exists. A wrong name passes every
test and gives the user a blank square.
Keywords=archive;download;fetch;
Extra menu search terms. Semicolons, never commas - the comma
form is old KDE syntax, nothing flags it, and it collapses into
one useless keyword.
NoDisplay=true
Valid entry, hidden from menus. For MIME-handler helpers.
Encoding=UTF-8
Obsolete. Delete the line if upstream ships it.
----------------------------------------------------------------------
WHAT SBOPKGLINT CHECKS
----------------------------------------------------------------------
Build the package, then run sbopkglint. Its desktop test wants:
1. desktop-file-validate must exit 0.
Only errors matter. Hints and warnings are printed but do not
fail the test - so read the log even when it says OK.
2. Mode 644, owner root:root. Add an explicit chmod 644 in the
SlackBuild; nothing else guarantees it.
3. Only .desktop files in /usr/share/applications
(plus *-mimeapps.list, which is allowed).
4. doinst.sh MUST run update-desktop-database:
if [ -x /usr/bin/update-desktop-database ]; then
/usr/bin/update-desktop-database -q usr/share/applications \
>/dev/null 2>&1
fi
Ship icons too? Then it also wants gtk-update-icon-cache.
To check one file without rebuilding:
desktop-file-validate foo.desktop
Silence means clean.
----------------------------------------------------------------------
A COMPLETE EXAMPLE
----------------------------------------------------------------------
[Desktop Entry]
Type=Application
Version=1.0
Name=foo
GenericName=Remote Archive Fetcher
Comment=Download files from a remote archive
Exec=foo
Icon=foo
Terminal=true
Categories=Network;FileTransfer;ConsoleOnly;
Keywords=archive;download;fetch;
Icon=foo assumes the package installs its own icon as
/usr/share/icons/hicolor/48x48/apps/foo.png. If it has no icon,
delete the Icon= line - do not substitute a stock mimetype name.
In the SlackBuild:
mkdir -p $PKG/usr/share/applications
cat $CWD/$PRGNAM.desktop \
> $PKG/usr/share/applications/$PRGNAM.desktop
chmod 644 $PKG/usr/share/applications/$PRGNAM.desktop
----------------------------------------------------------------------
WHEN IN DOUBT
----------------------------------------------------------------------
See what real packages already do:
grep -h ^Categories= /usr/share/applications/*.desktop \
| sort | uniq -c | sort -rn | head -20
Full category lists:
https://specifications.freedesktop.org/menu/latest/
======================================================================
More information about the SlackBuilds-users
mailing list