How can I remove the Skype panel icon?

13,169

Solution 1

Removing the Skype panel icon in 12.04 without removing sni-qt

  • If you don't care about sni-qt, removing the icon is as simple as doing apt-get remove sni-qt sni-qt:i386
  • Installing the Skype-provided deb is not a solution; all the Ubuntu version does is bundle the same Skype deb but make sni-qt a dependency to enable the icon.

A simple conf-file tweak or installing/removing a package isn't going to do it, we need to get down and dirty here.

  • sni-qt is provided by these shared libraries:

    /usr/lib/i386-linux-gnu/qt4/plugins/systemtrayicon/libsni-qt.so
    /usr/lib/x86_64-linux-gnu/qt4/plugins/systemtrayicon/libsni-qt.so
    
  • A guaranteed way to remove the Skype icon while leaving sni-qt available for other apps to use is to prevent Skype from loading these shared libraries.

  • That can be done in one of two ways: a civilized way and a brute-force bash-hacker way.


1. Highly recommended: Use apparmor to prevent Skype from loading sni-qt

  • AppArmor is a security framework built into the Linux kernel which sets permissions for what a program can and cannot access. It's enabled by default in Ubuntu.

  • An example profile for Skype is included in the app-armor profiles; I have modified that ONLY to achieve our goal of disabling the panel icon - other security features have been removed.

  • You can view the profile pasted here. Lines 24-25 are the bits that matter to us.

WARNING: This profile DOES NOT provide any other kind of security -- Skype will run normally. Please see here for a more complete Skype AppArmor profile that you can use if you want to secure Skype further.

How to install

  • To install, exit Skype if it is running and then open a terminal with Ctrl-Alt-T, and type/paste the below to install the pasted profile into your apparmor profiles directory. (You can also manually paste it to /etc/apparmor.d/usr.bin.skype if you wish)

    sudo wget -O/etc/apparmor.d/usr.bin.skype http://pastebin.com/raw.php?i=2EYME5eF

  • Then type sudo /etc/init.d/apparmor reload to reload all profiles, including the skype one we just added. Wait for a few seconds...

  • To check that the profile was enabled, type sudo apparmor_status | egrep "mode|skype"

    • The result should show something like the below: Skype should be after "enforce mode" but before any of the other modes:
      21 profiles are in enforce mode.
      /usr/bin/skype
      22 profiles are in complain mode.
      
  • Start Skype, and the panel icon should hopefully be gone!

How can I add this behavior to my own Skype AppArmor profile?

  • Just add these lines near the beginning of the profile, right after the includes (they simply prevent Skype from reading/loading the sni-qt libraries)

    deny /usr/lib/i386-linux-gnu/qt4/plugins/systemtrayicon/libsni-qt.so r,
    deny /usr/lib/x86_64-linux-gnu/qt4/plugins/systemtrayicon/libsni-qt.so r,
    

2. Not recommended: an ugly bash hack

  • I will only give pseudocode to prevent the new from falling into traps, but a simple bash script which does the following is enough to disable the panel icon too:
    1. Remove read permissions from the appropriate libsni-qt.so for the uid (user) skype is running as.
    2. Start Skype, wait a little bit so it's loaded.
    3. (The icon is gone because Skype couldn't load sni-qt.)
    4. Restore permissions to libsni-qt.so.

Solution 2

For Ubuntu 11.04 Natty only:

  1. Via command-line-interface (fast) -- the OMGubuntu community came up with this answer:

    in a terminal, type

     gsettings get com.canonical.Unity.Panel systray-whitelist
    

    This will output something similar to:

     ['JavaEmbeddedFrame', 'Mumble', 'Wine', 'Skype', 'hp-systray', 'scp-dbus-service']
    

    We want to remove Skype from this whitelist, so copy/paste this output in a new command and remove the 'Skype' entry, like so:

     gsettings set com.canonical.Unity.Panel systray-whitelist "['JavaEmbeddedFrame', 'Mumble', 'Wine', 'hp-systray', 'scp-dbus-service']"
    
  2. Via graphical user interface (more accessible), as proposed by con-f-use in answering this question. Simply do the opposite of what s/he proposes.

Now upon next login the Skype icon will be gone.


Note that installing the pidgin-skype Install pidgin-skype package will enable you to add your Skype account to empathy -- enabling you to control your Skype status with the elegant me menu.

Solution 3

There is no icon in /usr/share/icon/skype.png on my system. The tray icon is not for starting, but for reporting the status. It shows your online status (online, away, dnd, …) and also reports if new messages are incoming. As such, it’s dynamic.

It seems to be embedded in the Skype binary with no way to change it. I would very much like to be corrected on this, as I despise that green blob as well.

Solution 4

Remove the sni-qt package from your system, and it should go away, I think.

Share:
13,169

Related videos on Youtube

harppu
Author by

harppu

Updated on September 17, 2022

Comments

  • harppu
    harppu over 1 year

    As I use the Docky Skype indicator, and the green Skype icon doesn't look good next to all the grey ones -- it would be nice to remove the icon from the system tray.

    Is this possible? How can I do it in Ubuntu 12.04 -- or other earlier versions?

  • harppu
    harppu over 13 years
    well, not the answer I hoped to get, but thank you nevertheless, better then nothing ;)
  • Uri Herrera
    Uri Herrera almost 13 years
    note that while this works it's for 11.04 NOT 10.10 or 10.04
  • con-f-use
    con-f-use almost 13 years
    If you want a graphical tool you could install gconf sudo apt-get install gconf-tools and then run gconf-editor doing the inverse of whats described here: askubuntu.com/questions/43280/…
  • Olivier
    Olivier almost 13 years
    Thank you con-f-use. Did you mean dconf instead of gconf? gconf-editor is installed by default but does not display unity configuration entries for me.
  • jmardones
    jmardones almost 13 years
    d-conf shows the unity panel whitelist
  • Mood
    Mood over 12 years
    Doesn’t work for Unity 2D. Skype is not on my white list: ['JavaEmbeddedFrame', 'Mumble', 'Wine', 'hp-systray'] but its will still show up on the panel.
  • superjudge3
    superjudge3 about 12 years
    Also I thought that this package was vital for other programs that wanted to use the upper panel (like Dropbox and WeatherIndicator). I don't want to go around uprooting the soil for the entire garden when I should be able to just pull out a weed.
  • dobey
    dobey almost 12 years
    No, Dropbox has proper integration with the indicator APIs, as does the weather indicator. The sni-qt package is only used by Qt applications which use the standard Qt tray icon API, rather than using the Unity Indicator APIs.
  • antitoxic
    antitoxic almost 12 years
    You need both apt-get remove sni-qt:i386 and apt-get remove sni-qt
  • MarkovCh1
    MarkovCh1 almost 12 years
    This introduces some crashes for me. Bad idea.
  • dobey
    dobey almost 12 years
    @Syzygy how? It being there or not has no bearing on whether applications will crash. If you removed it and got crashes, then most likely it's simply an issue in the program itself.
  • MarkovCh1
    MarkovCh1 almost 12 years
    This doesn't work for me either (on 12.04). I suspect that it is because have sni-qt installed.
  • ish
    ish almost 12 years
    @Syzygy : see added answer on how to "precisely" remove the icon without having to remove sni-qt too.
  • MarkovCh1
    MarkovCh1 almost 12 years
    +50 Because this works for other software as well.
  • Gabriel
    Gabriel over 11 years
    Excellent! This is the perfect addition to Skype-Wrapper without having to remove the sni-qt package. +1000 to you my friend. Cheers!
  • kcpr
    kcpr almost 11 years
    The problem is that "Use apparmor to prevent Skype from loading sni-qt" does not work with Skype installed from default Ubuntu repositories. When trying to run 'skype' I just get information that for /usr/bin/skype permission is denied. Another thing is that there is no icon for this application. Using Ubuntu 13.04. Can I get any help?
  • kcpr
    kcpr almost 11 years
    After updating the application the Skype do not start because of permission again: /usr/bin/skype: 8: exec: /usr/lib/skype/skype: Permission denied. And this icon problem seemed to be just temporary bug, it's ok now, sorry. Help still needed. Thanks.
  • kcpr
    kcpr almost 11 years
    What helped me was to remove sni-qt:i386 from my 64-bit system. It's needed by Skype, but not by - for example - Spotify. Anyway it's another option of dealing with this problem, but different then this suggested by izx, which seems to be the best.
  • Craig van Tonder
    Craig van Tonder over 8 years
    "Please see here for a more complete Skype AppArmor profile" The link provided is no loner associated with said information. I am not sure if it would be possible to get a more permanent link for this info?