2

Background :

I developed a python desktop application which is run on the top of Ubuntu 12.04 and it is running in full screen mode. I used gnome-fallback as a Ubuntu Desktop.

Question :

My problem is delete top and bottom Gnome panels permanently and I know how to do it from gui itself (ALT + Right Click). But I need to do it from the commands.

Anyone have an idea about that.

Thanks in advance.

4 Answers4

4

Install dconf-tools:

sudo apt-get install dconf-tools

Backup your panel configuration:

dconf dump /org/gnome/gnome-panel/ > /some/location/backup.xml  

Now remove the panels:

gsettings set org.gnome.gnome-panel.layout toplevel-id-list [""]

If you want to restore them later use:

cat /some/location/backup.xml | dconf load /org/gnome/gnome-panel/

NOTE: This doesn't seem to hold after a reboot. Further research shows this is because several dconf schemas are still in place. I have yet to figure out how to remove these.

Seth
  • 58,122
  • I tried your commands , it was not given any errors but no results also. – Janith Chinthana Jan 27 '14 at 04:37
  • @JanithChinthana What do you mean by "no results"? Just nothing happens? – Seth Jan 27 '14 at 04:43
  • 1
    panels not removed. then I tried with restart also. but still same results. But I check the dconf-editor, it shows that toplevel-id-list is empty. but actually its not removed from the desktop. anyway +1 for toplevel-id-list [""] – Janith Chinthana Jan 27 '14 at 05:29
  • One more thing, I change those settings manually(Alt+Right Click) earlier to see what are the changes to be appeared in dconf. Im not sure that might be the issue. As per the @Lorenzo 's comment we should do this for fresh instance. – Janith Chinthana Jan 27 '14 at 05:34
  • @Janith Are you using gnome - fallback-no-effects or just gnome-fallback? – Seth Jan 27 '14 at 15:29
  • @JanithChinthana Upon more research, it seems that 12.04 does this differently than 13.10 (which I use). I'll look into it. – Seth Jan 28 '14 at 02:32
  • @JanithChinthana Alright. I'm working on fixing it for 12.04 right now. – Seth Jan 28 '14 at 04:38
  • @JanithChinthana After more testing, my original answers works fine for me on 12.04.3... Can you show me a screenshot of your desktop after you run the command? – Seth Jan 28 '14 at 23:22
  • from the very beginning I face same issue(after restart it appears again), then I remove all the objects in the panel before removing the panel itself, then it works for me. but finally one of empty panel remain in the Desktop which I can't remove anyway. – Janith Chinthana Jan 29 '14 at 05:22
  • @Janith A screenshot would help immensely. – Seth Jan 29 '14 at 05:25
  • I can't share screen-shot due to some reasons, but it is like this now, http://kevin.herrera.io/assets/posts/2013-06-04-ubuntu-gnome-panel/panel-menu.png top panel has removed and empty bottom panel stay same. but it doesn't have any objects. – Janith Chinthana Jan 29 '14 at 05:48
  • ill offer bounty for your try even its not 100% working – Janith Chinthana Jan 30 '14 at 07:47
  • This does not work in Gnome 3 – Chani Dec 27 '14 at 10:47
  • @Wild No it doesn't. Gnome-flashback and gnome 3 are very different. I'm not sure what you hope to achieve. – Seth Dec 27 '14 at 16:26
  • Yeah, you are right. I fixed my problem. Understanding gnome 3 and gnome flash back are different, they use separate config files, etc was important. – Chani Dec 27 '14 at 16:28
1

The settings are stored in dconf: you should use dconf-editor (from dconf-tools) to find them and the GSettings API to edit them from your script/software.

Good programming and comment under here if you have more questions or problems. ;-D

  • I found the top-panel and bottom-panel under the dconf-editor, but i couldn't find a way how to remove them from the commands – Janith Chinthana Jan 22 '14 at 12:37
  • 1
    It may vary from version to version. I've done some research, as there aren't common procedures. Let's try: org>gnome>gnome-panel>layout>"toplevel-id-list" and edit the entry by removing both panels names. Restart gnome and they should disappear. To do this from GSettings you need to adapt your entire application. :-( There is a guide for Python and GSettings, read it and see if it can help: http://www.micahcarrick.com/gsettings-python-gnome-3.html Don't copy-paste in your existing script, try it directly in a new application before editing the current things. Let us know. :) – Lorenzo Ancora Jan 22 '14 at 18:03
0

Instead you can make your own session without gnome bars. I made my own session with awn, I login to my session without gnome panel. There is a tutorial in below link about how to do it. I must warn you about hidden .desktop extension files in "/usr/share/xsessions/" Nautilus blind to such extension due to a bug, There would be "~" ended backup files that confuses you. I stuck in login screen once due to picking up wrong file. I advise you to use command line ls to list folder entries. You are warned. Link

kenn
  • 5,162
0

install dconf-tools

sudo apt-get install dconf-tools

open the program by

dconf-editor

go to Desktop-->Unity-->Panel

if you want to add a prgram add that

,'program name'

and this program make you edit in gnome

user234517
  • 175
  • 1
  • 8