KDE4 advice
John L Fjellstad
john-ubuntu at fjellstad.org
Fri Jun 20 18:29:50 UTC 2008
"Steve Lamb" <grey at dmiyu.org> writes:
> The only grouse I have, as the OP pointed out, is that the menus of each
> are cluttered with portions of the other. I don't much mind having
> Amarok in my Gnome/XFCE menus but having 3 different ways to configure
> the system in each is a tad confusing. ;)
Add OnlyShowIn=KDE in all kde .desktop files (they're in
/usr/share/applications/kde). Then kde applications will only show in
KDE.
You can do the same for Gnome (OnlyShowIn=GNOME). The .desktop files are
in /usr/share/applications (with all non-gnome apps).
xfce probably has something similar.
The following scripts will make KDE applications show in only KDE and
Gnome applications only show in Gnome:
############## KDE
#!/bin/bash
pushd /usr/share/applications/kde
for file in *.desktop; do
grep -q OnlyShowIn=KDE $file
if [ $? -eq 1 ]; then
sudo su -c "echo 'OnlyShowIn=KDE' >> $file"
fi
done
popd
##############
############## Gnome
#!/bin/bash
pushd /usr/share/applications
for file in *.desktop; do
echo $file | grep -q wireshark
if [ $? -eq 0 ]; then
continue
fi
echo $file | grep -q ^gnome
if [ $? -eq 0 ]; then
grep -q OnlyShowIn=GNOME $file
if [ $? -eq 1 ]; then
sudo su -c "echo 'OnlyShowIn=GNOME' >> $file"
fi
fi
grep Categories $file | grep -q GNOME
if [ $? -eq 0 ]; then
grep -q OnlyShowIn=GNOME $file
if [ $? -eq 1 ]; then
sudo su -c "echo 'OnlyShowIn=GNOME' >> $file"
fi
fi
grep -q X-GNOME-Bugzilla $file
if [ $? -eq 0 ]; then
grep -q OnlyShowIn=GNOME $file
if [ $? -eq 1 ]; then
sudo su -c "echo 'OnlyShowIn=GNOME' >> $file"
fi
fi
done
popd
#################
--
John L. Fjellstad
web: http://www.fjellstad.org/ Quis custodiet ipsos custodes
More information about the kubuntu-users
mailing list