KDE4 advice

p.daniels teeahr1 at gmail.com
Fri Jun 20 19:20:04 UTC 2008


On Friday June 20 2008 13:29:50 John L Fjellstad wrote:
> "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

Hey, this is great, thank you! Does anyone know if there's a similar flag to 
differentiate between KDE3 and KDE4?

-p.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/kubuntu-users/attachments/20080620/1c8d8578/attachment.html>


More information about the kubuntu-users mailing list