The Linux Page

Missing Gnome Panel and Menus and Console Auto-start

Gnome with menu and bottom panels.

Source of Image: GNOME Panel (Wikipedia)

No Panels at All

The Gnome X11 environment comes with a system called Panel.

Gnome panels are bars where the system include menus, icons, the date, statistics, etc.

Without the bar, it is a tad bit complicated to run programs and do all sorts of things (like switching between windows.)

If the panel software itself did not start properly or crashed, you may restart it with the following command:

gnome-panel

In case, however, the problem was that I wanted to hid the two panels I use (the default top and bottom panels.)

Panel Properties sample screenshot.

So I right clicked and selected the option properties. That gave me the Panel Properties window.

In that window you have the option Autohide. That option means that the panel and its contents are not shown at all unless you move the mouse in that area. At that time, the panel pops out and you can use it.

Neat feature, I guess, except that (1) it locked up my two panels; and (2) when you have both top and bottom panel at the bottom, it just doesn't work right. Somehow, one of the panels prevents the other from being used correctly. Of course, I ran in the problem after I made the selection and got stuck there.

The data is actually saved in your .gconf folder under apps/panel/toplevels. There are two directories as follow:

bottom_panel_screen0
top_panel_screen0

Those are folders in which you find an XML file:

%gconf.xml

I'm not too sure why they added a % character, but oh well..

In the XML file, search for the line that says:

<entry name="auto_hide" mtime="1295465770"
       schema="/schemas/apps/panel/toplevels/auto_hide"
       type="bool"
       value="false"/>

And change the value from "true" to "false".

This can be done from any editor... so?! How do you start that editor?

In my case I had a terminal, but if you don't have one and cannot just do a Ctrl+Alt-F12 to get out of X11, then you'll want to create a Launcher.

When clicking on the desktop with the right mouse button anywhere on the background, you get a menu that includes Create Launcher. Select that option and in the window that appears, enter whatever you want in Name and gnome-terminal. This creates a new icon on your desktop that you can click to start an X terminal.

Once in the console do:

cd .gconf/apps/panel/toplevels/top_panel_screen0
gvim %gconf.xml

Change gvim with your favorite editor (pico, gedit, etc.)

By the way, you probably will have to restart X windows. You may use the following to do so in the event you start X11 with the xstart command line (if you have an auto-start, I'm afraid you'll have to reboot!):

Ctrl+Alt-F12 to switch from the graphical display to the consoles

Alt-F1 (or another console such as Alt-F5)

Ctrl-C to stop the server

Wait a bit so all processes have time to die (use ps -ef | grep <your user name> to see a list of running processes. If any are in link with X11, either kill them or reboot to make it simple.)

xstart to restart X11

Menu gone away from the Panel

Today I did an upgrade (apt-get upgrade) and for the first time lost something in gnome. Such a problem had not happened for ages, so it was quite a surprise.

Quite surprisingly, the Panel itself would show up, but no contents. I searched a bit on the Internet and found out that there are times when scripts will install things under ~/.config/menus/...

That did happen to me too, although the path is different from what others were saying it should look like.

I looked a little closer and noticed that the folder was given root:root as user:group. That means the Gnome system cannot access the data. I guess that the installation scripts generated that problem. I changed the ownership to myself and everything is not working just fine again.

sudo chown -R alexis:alexis ~/.config/menus

In other forums they say to just delete the folder. I think that deleting, if not required, would eventually re-generate the same issue on another update. Using the chown it makes it mine and it still exists so it won't be re-created and cause problems.

Auto-Start in Ubuntu 11.04

Here I specify the version since things are actually changing and they are changing fast. It is not unlikely that this won't apply to 11.10.

The auto-start application in Gnome were using sessions before. That worked great in older versions (10.04) but somehow stopped now. Instead, you have to write a little script file here:

/home/alexis/.config/autostart/gnome-terminal.desktop

[Desktop Entry]
Type=Application
Exec=/usr/bin/gnome-terminal --load-config=/home/alexis/.gnome2/terminal.ini
Hidden=false
NoDisplay=false
X-GNOME-Autostart-enabled=true
Name[en_US]=Gnome Terminal
Name=Gnome Terminal
Comment[en_US]=Load terminal using ~/.gnome2/terminal.ini
Comment=Load your Gnome terminal from ~/.gnome2/terminal.ini file

This entry tells the Gnome server to start the application as shown in the Exec variable. Most everything shown here should be selfexplanatory otherwise.

As you can see, in my example here I want to start a gnome terminal. This requires a configuration file if you want to be able to open specific tabs. This file includes different entries to describe the terminal window. There is an example with a couple of tabs:

#Written by GNOME Terminal 2.32.1

[GNOME Terminal Configuration]
Version=1
CompatVersion=1
Windows=Window0;

[Window0]
MenubarVisible=true
Role=gnome-terminal-window-14422-392956912-1317659964
ActiveTerminal=Terminal0x10f07e0
Geometry=164x25+569+504
Terminals=Terminal0xf3b180;Terminal0x10a56e0;

[Terminal0xf3b180]
ProfileID=Default
WorkingDirectory=/home/your-name
Zoom=1
Width=164
Height=25

[Terminal0x10a56e0]
ProfileID=Default
WorkingDirectory=/home/your-name/dev/env
Zoom=1
Width=164
Height=25

As you can see the file says "Written by GNOME Terminal" and a version. I use the gnome-session-save function to save this data, which then is saved in the session that doesn't get loaded on startup. You can also just reuse my copy here and tweak it as you go.

Auto-start since Ubuntu 14.04

Since 14.04, I had to change the way my terminals are opened in my X11 session. Each time I start X11, I like to have 6 terminals opened in Gnome xterm. These need to open in a specific folder and each year I like to change it because one of the folder is year specific.

The desktop file is now called terminals.desktop and includes the following code:

[Desktop Entry]
Type=Application
Exec=/home/alexis/bin/terminals
Hidden=false
NoDisplay=false
X-GNOME-Autostart-enabled=true
Name[en_US]=Terminals
Name=Terminals
Comment[en_US]=Gnome Terminals
Comment=Gnome Terminals

As you can see, I have a new script called terminals. This script includes the command used to start the terminal with 6 tabs, each with a different working directory.

#!/bin/sh
#
# Get geometry with:
#    xwininfo -id $(xprop -root \
#        | awk '/_NET_ACTIVE_WINDOW\(WINDOW\)/{print $NF}')
#
gnome-terminal \
        --geometry=147x24--10-14 \
        --tab --working-directory "/home/<user-name>/path1" \
        --tab --working-directory "/home/<user-name>/path2" \
        --tab --working-directory "/home/<user-name>/path3" \
        --tab --working-directory "/home/<user-name>/path4" \
        --tab --working-directory "/home/<user-name>/path5" \
        --tab --working-directory "/home/<user-name>/path6"

Lost Bottom Panel in 16.04

I inadvertendly removed various packages and one of them apparently was the bottom panel which I therefore lost. Oops.

I found another way which is to move the Unity left bar to the bottom as follow:

gsettings set com.canonical.Unity.Launcher launcher-position Bottom

To restore the left position, change Bottom with Left:

gsettings set com.canonical.Unity.Launcher launcher-position Left

Desktop Screen Stops Working

Once in a while, my desktop screen appears with only a top-left corner image. I think that's because the resolution is not properly taken in account.

The solution I've found so far is to restart Gnome. The interesting thing is that I then get the correct resolution in the Login screen. (Because when I boot, the login screen uses something like 800x600 resolution. The area shown below is 903x617 pixels, so pretty close.)

From an ssh shell (because I pretty much always have an ssh server on my VMs), I run the following:

sudo killall -QUIT gnome-shell

This kills the gnome-shell and then restarts the login screen.

Note that it would have been possible for me to do it in a terminal, only when the screen is broken in this way, it is impossible to click on anything. That makes it difficult to see what you type (I can't resize my windows) and when you run a killall you'd rather make sure it's correct.