1

Just want shell script to remove unity launcher(if present in Ubuntu 14.04 ) and/or the xfce panel (in the case of xubuntu).

If anybody has idea about the same then please let me know.

Thanks

  • That's simple enough. What are the package names you want to remove? – terdon Jul 1 '15 at 8:54
  • manojpatidar, Are you referring to a launcher or the launcher? If the first is the case, it' s a dupe of: askubuntu.com/questions/611162/… – Jacob Vlijm Jul 1 '15 at 10:47
  • Thanks all for your comment. Firstly I want that when my program runs then Unity launcher should hide else it should show. If we can't do so then only the last option, remove unity launcher from my Ubuntu 14.04 machine. Actually when my program runs then it should run on full screen mode. If anyone have any doubt/query then please let me know. – User2546 Jul 1 '15 at 10:59
  • I have tried the below way. Command to hide the launcher : gsettings set org.compiz.unityshell:/org/compiz/profiles/unity/plugins/unityshell/ launcher-hide-mode 1 Command to show the launcher : gsettings set org.compiz.unityshell:/org/compiz/profiles/unity/plugins/unityshell/ launcher-hide-mode 0 then go to System Setting -> Appearance -> Behavior -> Set Auto-hide Launcher to ON and set Reveal sensitivity to low and it works but I want to set Reveal sensitivity to low by shell script. – – User2546 Jul 1 '15 at 11:08
2

Update:

To completely remove the launcher for the time your script execution, I'd disable the unity compiz plugin.

We have such a script in Checkbox, that I'm pasting here for convenience:

#!/usr/bin/env python3
# This file is part of Checkbox.
#
# Copyright 2014-2015 Canonical Ltd.
# Written by:
#   Daniel Manrique <roadmr@ubuntu.com>
#   Sylvain Pineau <sylvain.pineau@canonical.com>
#
# Checkbox is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 3,
# as published by the Free Software Foundation.
#
# Checkbox is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Checkbox.  If not, see <http://www.gnu.org/licenses/>.
"""
manage_compiz_plugin
====================

This script allows enabling or disabling compiz plugins using
gsettings. Changes take effect on the fly.
"""

from gettext import gettext as _
import argparse
import gettext
import os
import sys
import subprocess
import time

PATH="org.compiz.core:/org/compiz/profiles/unity/plugins/core/"
KEY="active-plugins"

gettext.textdomain("2013.com.canonical.certification.checkbox")
gettext.bindtextdomain("2013.com.canonical.certification.checkbox",
                       os.getenv("CHECKBOX_PROVIDER_LOCALE_DIR", None))

plugins = eval(subprocess.check_output(["gsettings", "get", PATH, KEY]))

parser = argparse.ArgumentParser(description=_("enable/disable compiz plugins"),
                                 epilog=_("Available plugins: {}").format(plugins))
parser.add_argument("plugin", type=str, help=_('Name of plugin to control'))
parser.add_argument("action", type=str, choices=['enable', 'disable'],
                    help=_("What to do with the plugin"))

args = parser.parse_args()

if args.action == 'enable':
    if args.plugin in plugins:
        raise SystemExit(_("Plugin {} already enabled").format(args.plugin))
    plugins.append(args.plugin)
else:
    if args.plugin not in plugins:
        raise SystemExit(_("Plugin {} doesn't exist").format(args.plugin))
    plugins.remove(args.plugin)
subprocess.call(["gsettings", "set", PATH, KEY, str(plugins)])

time.sleep(3)

To disable the unity plugin:

./manage_compiz_plugin unityshell disable

To restore it:

./manage_compiz_plugin unityshell enable

First version (using auto-hide):

To hide the unity launcher, use the following commands:

dconf write /org/compiz/profiles/unity/plugins/unityshell/launcher-hide-mode 1
dconf write /org/compiz/profiles/unity/plugins/unityshell/edge-responsiveness 0

To restore it, simply use:

dconf write /org/compiz/profiles/unity/plugins/unityshell/launcher-hide-mode 0
dconf write /org/compiz/profiles/unity/plugins/unityshell/edge-responsiveness 2
  • I have tried as per your suggestion but when I move cursor to left of the screen then it again shows launcher. So to hide it permanently I go to System Setting -> Appearance -> Behavior -> Set Auto-hide Launcher to ON and set Reveal sensitivity to low and it works but I want to set Reveal sensitivity to low by shell script. – User2546 Jul 1 '15 at 11:12
  • @manojpatidar: See my edit ;) – Sylvain Pineau Jul 1 '15 at 11:13
  • I have tried dconf write /org/compiz/profiles/unity/plugins/unityshell/launcher-hide-mode 1 dconf write /org/compiz/profiles/unity/plugins/unityshell/edge-responsiveness 0 then it hides launcher but when I move cursor to left of the screen then it again shows launcher. I just want to hide it permanently. – User2546 Jul 1 '15 at 11:17
  • @manojpatidar: I don't think you can disable it completely without disabling the unity plugin. Let me check – Sylvain Pineau Jul 1 '15 at 11:23
  • Sure take your time. Btw I have did the same by go to System Setting -> Appearance -> Behavior -> Set Auto-hide Launcher to ON and set Reveal sensitivity to low and it works but I want to set Reveal sensitivity to low by shell script (As I already mentioned in my above comments) – User2546 Jul 1 '15 at 11:27
0

If you're looking for a script to recompile unity without the launcher, this should be exactly what you want: Compile Unity without launcher

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.