menu customiization
Stephen Dowdy
sdowdy at ucar.edu
Thu Jun 5 22:34:37 BST 2014
Felix,
On Thu, Jun 5, 2014 at 2:23 PM, Felix Miata <mrmazda at earthlink.net> wrote:
> I've used KMenuEdit to create a bunch of custom Internet items. This is one
> such, Firefox.desktop:
...
> [Desktop Entry]
> Comment=Web Browser
> Exec[$e]=/usr/local/ffe10/firefox -no-remote -P ffe10
> GenericName=Web Browser
...
> What I want to do is make them all available to all users on multiple
> systems in KDE's Internet menu. The problem is I can't find understandable
> instructions how to do this anywhere.
...
> mud to me. Has anyone ever figured this out, or found an understandable
> howto covering it? Do custom .desktop files belong in /etc/xdg/ somewhere?
> Is placement in /usr/share/applications/ appropriate? TIA
/etc/xdg would be nice, but it's not in the default XDG_DATA_DIRS path.
$ kde4-config --types | grep xdg
xdgconf-autostart - XDG autostart directory
xdgconf-menu - XDG Menu layout (.menu files)
xdgdata-apps - XDG Application menu (.desktop files)
xdgdata-dirs - XDG Menu descriptions (.directory files)
xdgdata-icon - XDG Icons
xdgdata-mime - XDG Mime Types
xdgdata-pixmap - Legacy pixmaps
$ kde4-config --path xdgdata-apps
Is that path that will be used. I choose to use
/usr/local/share/applications, as it's NFS mounted to all
(most) user systems in my environment. I'm not sure of the
best/recommended way to modify this path via scripts/config at KDE
startup time, but 'startkde' does this:
# Make sure that D-Bus is running
if test -z "$XDG_DATA_DIRS"; then
XDG_DATA_DIRS="`kde4-config --prefix`/share:/usr/share:/usr/local/share"
export XDG_DATA_DIRS
fi
i.e. it looks hardcoded w/o a good site-specific way to add to it).
If you edit startkde to prepend "/etc/xdg/share/" (which to me is
totally obvious, and i was surprised it wasn't there), then prepare
for it to get borked on KDE application package updates...
You can get XDG values via this script snippet, as well:
echo "[XDG Environment]"
while read var default; do
printf "%24s = %s\n" "${var}" "$(eval echo \${$var-${default}\(\*\)})"
done<<"EOF"
XDG_DATA_HOME ${HOME}/.local/share
XDG_CONFIG_HOME ${HOME}/.config
XDG_DATA_DIRS /usr/local/share/:/usr/share/
XDG_CONFIG_DIRS /etc/xdg
XDG_CACHE_HOME ${HOME}/.cache
XDG_RUNTIME_DIR
EOF
echo "(*) indicates variable unset and a default value substituted"
FWIW, here's what i use for 'firefox':
This .desktop file is for my "Personal" use profile @ work (lunchbreak
news, etc)
(i have 3 others for other functions)
[Desktop Entry]
Comment=Firefox for Personal Use
Exec=/usr/local/bin/firefox -P Personal --class=firefox_Personal
-new-instance -no-remote %u
GenericName[en_US]=Web Browser
GenericName=Web Browser
Icon=/usr/local/firefox/browser/icons/mozicon128.png
Name=Firefox (Personal)
NoDisplay=false
Path[$e]=
StartupNotify=false
- I use --class=firefox_XXXXX so that 'Icon-Only Task Manager' will
sort my multiple firefox profiles (with many, many windows) into
distinct icons in the taskbar separately) I wish firefox still
supported the WM_NAME --name option :-(
- StartupNotify is False, because firefox GTK doesn't support the
KDE launch feedback stuff and the bouncey-bouncey icon sits there
until it times-out 30 seconds later)
--stephen
--
Stephen Dowdy - Systems Administrator - NCAR/RAL
303.497.2869 - sdowdy at ucar.edu - http://www.ral.ucar.edu/~sdowdy/
___________________________________________________
This message is from the kde mailing list.
Account management: https://mail.kde.org/mailman/listinfo/kde.
Archives: http://lists.kde.org/.
More info: http://www.kde.org/faq.html.
More information about the kde
mailing list