Results 1 to 7 of 7

Thread: How to set gnome style package manager as default instead of KDE style

  1. #1
    Join Date
    Jul 2010
    Location
    Lucknow, India
    Posts
    46

    Default How to set gnome style package manager as default instead of KDE style

    I have a opensuse 12.2 box having both the Gnome 3 and KDE installed. Well Gnome 3 sucks, so I switched to KDE but was too slow. Now I installed MATE desktop and is awesome. The Package Manager and other system utilities are using KDE style UI as default but I prefer Gnome style.
    How do I change the default UI style for package manager to Gnome instead of KDE?

    Thanks

  2. #2
    Join Date
    Jul 2008
    Location
    Palmas, Tocantins - Brasil
    Posts
    22

    Default Re: How to set gnome style package manager as default instead of KDE style

    yast->system->sysconfig editor->System->Yast2->GUI->WANTED_GUI

    there, choose gtk as default and click ok. Restart to see the result.

  3. #3
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    25,169

    Default Re: How to set gnome style package manager as default instead of KDE style

    The above solution is for YaST. And while most openSUSE users use YaST > Software > Software managment to manage software, that is not what the OP says.

    @gauravsinghfzd, Do you mean PackageManager (or what it is called exactly) or YaST?
    Henk van Velden

  4. #4

    Default Re: How to set gnome style package manager as default instead of KDE style

    Just a warning - the gtk interface for YaST is *terrible* - you DO NOT want this. (The software manager opens in an absurdly small window and you have to maximize it and resize the side and bottom pane every single time you open it.) I strongly recommend sticking with the Qt interface even though you've got MATE - it may look out of place, but at least it works great.

  5. #5

    Default Re: How to set gnome style package manager as default instead of KDE style

    Quote Originally Posted by hcvv View Post
    The above solution is for YaST. And while most openSUSE users use YaST > Software > Software managment to manage software, that is not what the OP says.
    But I guess that's what the OP meant - without knowing that /usr/bin/package-manager (the program which is run when you choose "Install/Remove Software") is in fact a wrapper script to YaST package management. So - if the developpers were coherent - this solution should work.

    /usr/bin/package-manager checks for the presence of kpackagekit or gnome-packagekit - which is OK - but also compares the value of WINDOWMANAGER with '/usr/bin/gnome'. IMO this variable is not reliable, as it can be set by the user to a value that package-manager doesn't expect. That's actually the problem here with 'mate'. When I use gnome-fallback, my WINDOWMAGER says 'metacity'. When I use gnome-shell, it says 'mutter' ... When I use cinnamon, it says 'cinnamon' - it should actually say 'muffin', but it doesn't matter, since I use 'muffin' only with 'cinnamon'. Anyway, it should check the value of DESKTOP_SESSION instead and include 'mate' in its test.

    Further, even if it sets the method to gnome-packagekit, it doesn't set the interface to 'gtk'. That's because - I guess - the openSUSE team wants to set the default interface somewhere else, indeed in /etc/sysconfig/yast2 - as already mentioned.

    Another approach would be to set the interface to qt for kde, gtk for gnome - including fallback, cinnamon and mate. But notice that YaST uses GTK3, and mate is based on GTK2. You still need to have GTK3 and a GTK3 theme installed to use the gtk interface under 'pure' mate desktop.

    Here's the changes I made to /usr/bin/package-manager - after reading this thread. I was wondering why it uses the qt interface under cinnamon and found it annoying too.

    Code:
    --- package-manager.orig        2012-11-24 22:45:49.805751761 -0800
    +++ package-manager     2012-11-25 00:01:34.263052041 -0800
    @@ -102,7 +102,7 @@
     # determine what we can use
     if $HAVE_KPACKAGEKIT && [ "$KDE_FULL_SESSION" ]; then
       METHOD=kpackagekit
    -elif $HAVE_GPACKAGEKIT && [ "$WINDOWMANAGER" == "/usr/bin/gnome" ]; then
    +elif $HAVE_GPACKAGEKIT && [ "$DESKTOP_SESSION" == "gnome-shell" -o "$DESKTOP_SESSION" == "gnome-fallback" -o "$DESKTOP_SESSION" == "cinnamon" -o "$DESKTOP_SESSION" == "mate" ]; then
       METHOD=gnome-packagekit
     else
       if [ "$STACK" == "zlm" ]; then
    @@ -164,14 +164,14 @@
         ;;
         kpackagekit)
           if [ $# == 0 ]; then
    -          xsu /sbin/yast2 --install
    +          xsu /sbin/yast2 --qt --install
           else
               kpackagekit "$@"
           fi
         ;;
         gnome-packagekit)
           if [ $# == 0 ]; then
    -          xsu /sbin/yast2 --install
    +          xsu /sbin/yast2 --gtk --install
           else
               /usr/bin/gpk-install-local-file "$@"
           fi
    * I don't have 'mate' under openSUSE, but I checked the value of DESKTOP_SESSION under Linux Mint, and it should be 'mate'. I presume it will be the same in openSUSE.
    I posted this patch here for educational purpose. Most users won't need it. It only makes sense if you switch between KDE and Gnome and want to use the qt interface under KDE and the gtk interface under Gnome - and use the wrapper script to start the YaST package management module. Otherwise the following commands will do fine as well:

    Code:
    $ gnomesu -c '/sbin/yast2 --gtk --install'
    $ gnomesu -c '/sbin/yast2 --qt --install'
    or

    Code:
    $ gnomesu -c '/sbin/yast2 --gtk sw_single'
    $ gnomesu -c '/sbin/yast2 --qt sw_single'
    Whether gnomesu, kdesu or xdg-su is installed is determined by another script: /usr/bin/package-manager-su - when you use the package-manager wrapper.


    Code:
    detectDE()
    {
        if [ x"$KDE_FULL_SESSION" = x"true" ]; then DE=kde;
        elif [ x"$GNOME_DESKTOP_SESSION_ID" != x"" ]; then DE=gnome;
        elif xprop -root _DT_SAVE_MODE | grep ' = \"xfce4\"$' >/dev/null 2>&1; then DE=xfce;
        elif [ x"$DESKTOP_SESSION" == x"LXDE" ]; then DE=lxde;
        fi
    }
    You might have to add a DESKTOP_SESSION value here for mate too. I'm not sure mate uses GNOME_DESKTOP_SESSION_ID (maybe MATE_DESKTOP_SESSION_ID). I didn't use GNOME_DESKTOP_SESSION_ID in my patch, because it is supposed to be deprecated.


    * I'm aware that my post might actually look more complicated than the OP expected.

  6. #6
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: How to set gnome style package manager as default instead ofKDE style

    On 2012-11-24 17:46, hcvv wrote:
    >
    > The above solution is for YaST. And while most openSUSE users use YaST >
    > Software > Software managment to manage software, that is not what the
    > OP says.


    There is another method if what you want to change is just the Yast
    package manager style.

    Code:
    yast2 --qt online_update &
    yast --qt sw_single &
    
    or --gtk for gnome style.
    If this change you want to make permanent, it is possible to hack the
    yast script in an easy manner, so that yast remains with the default
    style, but the package manager changes. I have not used this in a long
    time, but should still be possible.

    --
    Cheers / Saludos,

    Carlos E. R.
    (from 11.4 x86_64 "Celadon" (Minas Tirith))

  7. #7
    Join Date
    Jul 2008
    Location
    Palmas, Tocantins - Brasil
    Posts
    22

    Default Re: How to set gnome style package manager as default instead of KDE style

    Quote Originally Posted by Golbats_Everywhere View Post
    Just a warning - the gtk interface for YaST is *terrible* - you DO NOT want this. (The software manager opens in an absurdly small window and you have to maximize it and resize the side and bottom pane every single time you open it.) I strongly recommend sticking with the Qt interface even though you've got MATE - it may look out of place, but at least it works great.
    The yast's gtk functionality[1] is killer for me. I don't mind resizing it, it is a minor problem than the yast's qt interface[2].
    I would vote to keep the gtk's functionality permanently(even if it was in the qt interface).

    Regards,

    Gilberto
    [1] http://dl.dropbox.com/u/9093640/yast-gtk.png


    [2] http://dl.dropbox.com/u/9093640/yast-qt.png

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •