So I am currently using these commands to hide the top panel in Centos 7:

/usr/bin/gdbus call --session --dest org.gnome.Shell --object-path /org/gnome/Shell --method org.gnome.Shell.Eval 'box=Main.panel.actor.get_parent();'

/usr/bin/gdbus call --session --dest org.gnome.Shell --object-path /org/gnome/Shell --method org.gnome.Shell.Eval 'box.visible=false;'

Which works great, but I'm not able to make these commands run at the start of the user session. I tried to create an sh script and make a .desktop file in the ~/.config/autostart , but no luck, any suggestions?

Also, I tried putting the commands in the .bashrc and the .bash_profile files, also with no luck. I'm missing something...

  • Why not using a shell extension ? – don_crissti May 16 '17 at 23:03
  • Doesn't work for me. The gnome shell version that I have is the 3.14 – axor May 16 '17 at 23:16

At the end, I found the answer myself.

I call a Terminal and Run the command. And then, the autostart worked.

gnome-terminal -e "/usr/bin/gdbus call --session --dest org.gnome.Shell --object-path /org/gnome/Shell --method org.gnome.Shell.Eval 'box=Main.panel.actor.get_parent();'"
sleep 3
gnome-terminal -e "/usr/bin/gdbus call --session --dest org.gnome.Shell --object-path /org/gnome/Shell --method org.gnome.Shell.Eval 'box.visible=false;'"

It was odd, but it's working fine now.

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.