0

As per my project requirement, I need to hide the Unity launcher (if present) automatically on startup of an Ubuntu 14.04 machine.

If I run the command:

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

into the terminal it works.

But as I mentioned already I need to hide the Unity launcher automatically on startup of an Ubuntu 14.04 machine, so to do this I have written this command in "~/.profile", but unfortunately the command is not working as expected on startup.

All my other commands work as expected on startup when put into "~/.profile".

The reasons behind writing this command in "~/.profile" are listed below.

  1. The command to hide the Unity launcher only works when we run the command with logged in user privileges and doesn't work when we run it with sudo privileges.

If I write this command in "/etc/init.d/myscript", "/etc/rc.local", "/etc/init/myjob.conf" then it starts the command with sudo privileges and it will not work.

  1. GUI applications don't start automatically on startup in Ubuntu 14.04 when we write the command into "/etc/init.d/myscript", "/etc/rc.local", "etc/init/myjob.conf" but if we write the command into "~/.profile" then it starts both GUI and non-GUI applications automatically on startup (I have tested the same myself).

Some useful links are as below.

https://stackoverflow.com/questions/32067817/qt-gui-application-not-starting-automatically-on-startup-in-ubuntu-14-04

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

How do I run a script at start up?

Can anyone please let me know how can I hide the Unity launcher (if present) automatically on startup of an Ubuntu 14.04 machine so that it doesn't reveal or show when mouse cursor moves towards the left edge of the screen (I want to set the reveal sensitivity to low also)?

1

Install Unity Tweak Tool to customize the behavior of Unity Launcher.

Open a terminal and execute:

sudo apt-get install unity-tweak-tool

Open the tool, click on Launcher Tab under category Unity and tweak.

  • cl-netbox, thanks for your reply. But in my question description I have mentioned that I need hide unity launcher automatically on startup Ubuntu 14.04 machine and set reveal sensitivity to low of launcher form shell script. I think I need to go with some shell script way. What do you think ? – User2546 Aug 25 '15 at 7:46
  • When you adjust to hide the launcher in the tool, the launcher will be hidden on startup. You can set the reveal sensitivity in tweak tool as well. – cl-netbox Aug 25 '15 at 7:51
  • Just FYI, I have made .deb of my Ubuntu desktop application and install the same with dpkg command on destination machine . But before installation of .deb I run a shell script file on destination machine which configures destination machine and makes changes into destination machine files as per my project need. I just want the shell script way not the gui way. I do not want user interaction on gui at all to hide unity launcher. – User2546 Aug 25 '15 at 8:03
  • Also there is no need to install unity-tweak-tool, we can do the same graphically by going to System Setting ->Appearance -> Behavior screen and set the same as per our need. – User2546 Aug 25 '15 at 8:18
  • If your task is to have launcher-less desktop, why not try openbox ? As far as I've seen, there's no dconf schema key for reveal sensitivity, hence no scripting way around it. – Sergiy Kolodyazhnyy Aug 29 '15 at 16:43
1

~/.profile is meant to set the user's environment, and is not meant to run commands / scripts at startup (unless they serve the purpose of setting the user's environment); you can't expect every command / script to work.

Instead, adding the command to Startup Appications, which is meant to run scripts at startup, works:

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

The entry to change the edge responsiveness is /org/compiz/profiles/unity/plugins/unityshell/edge-responsiveness (it ranges from 0,20000000000000001110 to 8,00000000000000000000 in Vivid), so to set both (you must put a dot after the integer part regardless of a non-present fractional part):

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

Nonetheless, if you need to run a whole script on startup, you can put the commands into the script and run the script:

bash /path/to/script.sh
#!/bin/bash
# ...
dconf write /org/compiz/profiles/unity/plugins/unityshell/launcher-hide-mode 1
dconf write /org/compiz/profiles/unity/plugins/unityshell/edge-responsiveness 4.
# ...

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.