13

I recently was messing around with my Pi when I accidentally deleted the taskbar. I cannot figure out how to bring it back.

I was on the desktop when I highlighted two icons on the left side of the taskbar, one called "Panel 1" and the other called "Panel 2". I figured I didn't want two panels, so I right clicked Panel 2 and deleted it. That ended up deleting my taskbar!

How can I bring it back? I'm using the latest version of Raspbian.

3
  • 1
    Linux, including Debian (and raspbian, which is derived from it) has a heterogeneous range of desktop GUIs, meaning there is not just one "Desktop Environment" (aka. DE) to rule them all. Different DE's deal with things like taskbars differently, so you need to be specific -- but presumably you are using LXDE, since that is the raspbian default. The raspberry pi community represents a very tiny minority of linux/debian/LXDE users, hence you are better off asking general questions about such elsewhere -- which is why I recommended this be closed.
    – goldilocks
    Sep 2, 2013 at 23:57
  • That said, I'm not an LXDE user personally (there are many other options, debian/raspbian wise), but I would bet if you click on the root window, or bump the cursor along an edge, you'll find a menu that leads you somewhere...if not, look for LXDE documentation online.
    – goldilocks
    Sep 2, 2013 at 23:59
  • This question appears to be off-topic because it is about Desktop Managers, and not about the Pi.
    – kolin
    May 13, 2014 at 7:57

6 Answers 6

18

I did exactly the same thing. You can fix it by copying a default panel back:

(adapted from https://askubuntu.com/questions/64631/how-to-restore-the-default-lubuntu-panel)

cd ~/.config/lxpanel/LXDE/panels
cp /usr/share/lxpanel/profile/default/panels/panel .
sudo reboot

Cheers!

With Raspbian Jessie (2016-11-25), it would be

cd ~/.config/lxpanel/LXDE-pi/panels
curl -O https://gist.githubusercontent.com/ColinNg/9ed317308a9a0f75824f828e75c8469c/raw/a72176416201a0e6ebbce30608e6f7eceb379e0e/panel
sudo reboot

And with Raspbian Buster (2019-07-10):

cp /etc/xdg/lxpanel/LXDE-pi/panels/panel /home/pi/.config/lxpanel/LXDE-pi/panels/panel
sudo reboot
1

Restart your Pi. The deletion is only temporary and will be returned.

0

It is unclear from your question exactly what you have deleted. I suspect it is the Panel.

I have never done this with LXDE and methods vary between environments.

You could try right-clinking on the desktop and running ObConf. Alternatively try running lxpanel from a terminal.

The nice thing about the Pi, is that it is easy to restore the OS simply by reflashing the SDCard. Of course, if you do this you will lose all customisation, programs you have loaded etc. If this is important you should backup.

The following gives instructions on how to do this. How do I backup my Raspberry Pi?

You could always backup, and reload a new OS, then later restore your current state for future repair.

The folowing is my customised script to backup pn my Mac:-

#!/bin/bash
# script to backup Pi SD card
# next line assumes Time Machine mounted
diskutil unmount /dev/disk2s1
echo pleae wait!
sudo dd of=/Users/ian/temp/Pi/Piback.img if=/dev/rdisk2 bs=2m
echo backup completed - now compressing
gzip -9 /Users/ian/temp/Pi/Piback.img
#rename to current date
mv /Users/ian/temp/Pi/Piback.img.gz "/Users/ian/temp/Pi/Piback`date +%Y%m%d`.img.gz"
0
0

Try creating a new user and logging in as that user, then start lxde and see if that user has a panel. If that works, maybe you can copy the lxde config file from that user to your pi user.

0

I also Deleted accidentally but recovered this way There was one more task-bar on top of Screen right click on top taskbar>>Panel Setting>>Gemetry tab>>Make postion Bottom

right click on top taskbar>>Add/Remove panel Item select Panel Applets Tab >> Add >> Select Task Bar(Window list) >> Click Add Now you can all apps open.

0

I haven't found the corrrect fix yet, but if I type "lxpanel &" in a terminal emulator I get a working taskbar again. (logout doesn't work) You can also put a line "lxpanel &" in /etc/X11/xinit/xinitrc to make it more permanent.

From this you should have figured out that lxpanel is just a program that runs, what you have to do to start it is more an annoyance than anything.

I had been logged in via VNC (and installed tightvncserver remotely via ssh) and when I came back to the physical machine the taskbar was gone, so I started Googling. VNC maintains a set of preferences files which mostly parallel X(org) in ~/$HOME/.vnc/xstartup and it's possible something went in there by accident. The more normal config files are in ~/$HOME/.config/lxpanel and lxsession, then some system-wide ones in /etc/xdg/lxpanel and lxsession. But it's quite a maze, the lazy fix would be to experiment with replacing those files with ones from another machine. Just remember you can run lxpanel from multiple places if you get stuck. I can get to obconf just fine but I don't see anything in there that looks like a fix. You want a default set of config files. And you'll need to get out of X and back in, or reboot, to be sure you've cured it.

And BTW this is in 64 bit Debian Stretch on a Rock64, looks about the same as the Raspberry Pi I'm typing this on. And the same as LXDE in Wheezy on an amd64 machine, it's not at all peculiar to a Raspberry Pi.

When you're poking around in there (I used mc) look for files with recent dates. But maybe they got deleted too. I see changes in ~/$HOME/.config/lxpanel/LXDE/panels/panel and ~/$HOME/.config/lxpanel/default/panels/panel. I've replaced those 2 files with an original panel file from another arm64 machine. Now when it's booting I see the taskbar flash twice but then it goes away. Still a work in progress. Keep notes, one of the principle Lnux trade secrets.

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