Results 1 to 7 of 7

Thread: How to change slab icon?

  1. #1
    Join Date
    Oct 2009
    Location
    Milano, Italy
    Posts
    35

    Default How to change slab icon?

    I'm very happy about my openSUSE GNOME installation (I used to use Ubuntu before) but one thing I don't like is the icon of the slab menu.

    How can I change that little computer to something different?

    I've found a previous post about this, but even though a solutions seemed to be found, it was not clearly explained.
    The thread was this.

    Thanks

  2. #2

    Default Re: How to change slab icon?

    If you edit /usr/share/gnome-main-menu/slab-window-glade, there is a GtkToggleButton widget name slab-main-menu-panel-button-bottom.

    There will be a child widget of class GtkImage that represents the icon name.
    There is also a widget for a corresponding label. If you remove the Computer label so it really looks like Vista.
    This is exactly what you should do, I've done it myself. Find the line
    Code:
    <widget class="GtkToggleButton" id="slab-main-menu-panel-button-bottom">
    Note the "bottom" which means you are changing the panel at the bottom of the screen. If your panel is on top, look for the slab-main-menu-panel-button-top tag.

    Beneath this code, look for a line:
    Code:
    <property name="icon_name">name_of_file</property>
    Here you can insert the filename of your custom icon. In my experience, you can't enter a path name because the icon does not change if you do. Also the extension (.png .jpeg ...) may not be written. Just the name of the file. Of course this means suse needs to find the file and therefor you need to place the icon in the correct folder. I believe this was the /usr/share/pixmaps folder.

    You can also change the text next to the icon by changing the line:
    Code:
    <property name="label" translatable="yes">openSUSE</property>
    Here openSUSE will be shown instead of Computer.

  3. #3
    Join Date
    Oct 2009
    Location
    Milano, Italy
    Posts
    35

    Default Re: How to change slab icon?

    It worked perfectly!
    Thanks a lot for the step-by-step instructions!

    +1!

  4. #4
    dlachausse NNTP User

    Default Re: How to change slab icon?

    I wrote this script to automate the process of setting the icon to something a little less, well ugly

    Code:
    #!/bin/sh
    #
    # Copyright (c) 2009 Darren L. LaChausse 
    #
    # Permission is hereby granted, free of charge, to any person obtaining a copy
    # of this software and associated documentation files (the "Software"), to deal
    # in the Software without restriction, including without limitation the rights
    # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
    # copies of the Software, and to permit persons to whom the Software is
    # furnished to do so, subject to the following conditions:
    #
    # The above copyright notice and this permission notice shall be included in
    # all copies or substantial portions of the Software.
    #
    # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
    # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
    # THE SOFTWARE.
    #
    #----------------------------------------------------
    # Changes the computer icon in the openSUSE Gnome
    # slab menu to the familiar lizard icon
    #----------------------------------------------------
    
    SRCFILE=/usr/share/gnome-main-menu/slab-window.glade
    OLDICON=gnome-fs-client
    NEWICON=gdm-suse
    
    # Copy the original file to a backup
    cp ${SRCFILE} ${SRCFILE}.bak
    
    # Perform a global search and replace of the old icon
    # with the new icon
    sed -e "s/${OLDICON}/${NEWICON}/g" ${SRCFILE}.bak > ${SRCFILE}
    
    # Give the user further instructions
    echo 'In order for the slab menu icon change to take effect'
    echo 'you must log out and then log back in'

  5. #5
    Join Date
    Oct 2009
    Location
    Milano, Italy
    Posts
    35

    Default Re: How to change slab icon?

    Nice script!
    It would be perfect if one could choose what icon to install.

  6. #6
    Join Date
    Jun 2008
    Location
    Connecticut, USA
    Posts
    2,294
    Blog Entries
    1

    Default Re: How to change slab icon?

    How well does this work with themes, like a darker theme?
    "Linux provides freedom, problem is most users don't know what it is or how to use it." ~me
    Friends don't let Friends wear red shirts on away parties!
    Linux User #477531 | Danbury Area Computer Society (www.dacs.org)

  7. #7

    Default Re: How to change slab icon?

    I have the same question of drabonbite, hope somebody can help me.

    Regards.
    Como Superar La Depresion Facilmente

Tags for this Thread

Posting Permissions

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