I use VNC to connect from my Windows 10 laptop to my Raspberry Pi 3 running Rasbian Buster. It all works fine as expected except for the LXTerminal window not displaying the full command prompt. enter image description here

When I SSH to the same Raspberry Pi: enter image description here

The command prompt in the VNC window also does not let me use any of the special keys (cursors to select previous commands, tab to auto fill folder/file names, etc.)

How can I get the LXTerminal window to operate correctly?

  • I found out the cause of this problem. To get VNC Server to run at boot, I added the following line to "crontab -e": @reboot vncserver -geometry 1440x900 -IdleTimeout 0 This appears to be causing this to happen as if I don't add this line and just run the command vncserver -geometry 1440x900 -IdleTimeout 0 after booting the prompt is correct.
    – trlaing
    Apr 18 '21 at 8:43

Okay, I sorted it by changing the LXTerminal shortcut from:

enter image description here


enter image description here

Now .bashrc loads each time I open the LXTerminal window, the prompt is displayed correctly and the tab and cursor keys work properly.


The prompt is normally set in your .bashrc file in the Pi home directory. My guess is you have an error in that.

Can you run any command from the terminal? I ask as it is possible that your prompt thinks it is part way through a command (as it looks like the second prompt)...

If not, try ctrl-c or ctrl-z. If neither work then ssh into the Pi and

Use ps aux and find the pid of lxterminal Use kill -9 pid to end the session Repeat above till all lxterminal sessions are ended

If you can run commands, the following lines could be missing from the .bashrc file:

if [ "$color_prompt" = yes ]; then
    PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w \$\[\033[00m\] '
    PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '

This page here details some of the many many options!

  • Yes, I can run commands from the command line, but none of the alias commands. eg. "ls" works fine "ll" does not. CTRL-C and CTRL-Z both just display ^C / ^Z I'm sure that I mentioned that when I SSH into the same Pi, the command prompt displays correctly. .bashrc is present and loads correctly when connecting via SSH. The color_prompt lines are present in my .bashrc file in the home/pi folder.
    – trlaing
    Feb 27 '21 at 5:22
  • Have you changed your .bashrc? Its possible that the file is erroring somewhere and not setting things correctly (esp if you expect ll to work). I put my alias commands in ~/.bash_aliases to avoid errors. I've put my bashrc script up on pastebin pastebin.com/raw/485FKUFq if you want to backup yours and try that.
    – user130616
    Feb 27 '21 at 13:54
  • I've only added some aliases. The .bashrc works fine in a Putty SSH window and when using the Raspberry Pi with HDMI to a monitor with the desktop loaded. It is only when remotely connecting via VNC that I have this issue. I have Raspberry Pi 4 next to it that I can connect to using VNC which displays the prompt correctly.
    – trlaing
    Feb 28 '21 at 14:50
  • It has the same issue with your .bashrc. It looks like it just isn't loading it at all. If I remove .bashrc completely it behaves the same in the VNC window.
    – trlaing
    Feb 28 '21 at 14:58
  • If I try running the command ./.bash_profile I get different results depending on if I connected using SSH or VNC. WIth SSH: pi@WorkPi3:~ $ ./.bash_profile pi@WorkPi3:~ $ With VNC: $ ./.bash_profile ./.bash_profile: 1: ./.bash_profile: source: not found $ VNC has a "source: not found" error and SSH doesn't.
    – trlaing
    Feb 28 '21 at 15:12

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.