[SOLVED] gnome-terminal autocompletion broken (half-working)

Archived topics about LMDE 1 and LMDE 2
Locked
kaefert
Level 3
Level 3
Posts: 110
Joined: Sun Jan 08, 2012 12:08 pm

[SOLVED] gnome-terminal autocompletion broken (half-working)

Post by kaefert »

The autocompletion inside the gnome-terminal does not work as expected. It does know the userlevel commands, but it does not know any command names as soon as you write sudo in front of it, and it does not know the names of packages when you type sudo apt-get install a<tab><tab>

When you switch to tty1-6 the autocompletion works as expected, so the issue is somehow connected to the graphical console.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
äxl

Re: gnome-terminal autocompletion broken (half-working)

Post by äxl »

Could be connected to the file /etc/profile
It should contain:

Code: Select all

if [ "`id -u`" -eq 0 ]; then
  PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
else
  PATH="/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games"
fi
export PATH
kaefert
Level 3
Level 3
Posts: 110
Joined: Sun Jan 08, 2012 12:08 pm

Re: gnome-terminal autocompletion broken (half-working)

Post by kaefert »

This block seems to be already present in that file, here are the complete contents of that file:

Code: Select all

# /etc/profile: system-wide .profile file for the Bourne shell (sh(1))
# and Bourne compatible shells (bash(1), ksh(1), ash(1), ...).

if [ "`id -u`" -eq 0 ]; then
  PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
else
  PATH="/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games"
fi
export PATH

if [ "$PS1" ]; then
  if [ "$BASH" ]; then
    # The file bash.bashrc already sets the default PS1.
    # PS1='\h:\w\$ '
    if [ -f /etc/bash.bashrc ]; then
      . /etc/bash.bashrc
    fi
  else
    if [ "`id -u`" -eq 0 ]; then
      PS1='# '
    else
      PS1='$ '
    fi
  fi
fi

# The default umask is now handled by pam_umask.
# See pam_umask(8) and /etc/login.defs.

if [ -d /etc/profile.d ]; then
  for i in /etc/profile.d/*.sh; do
    if [ -r $i ]; then
      . $i
    fi
  done
  unset i
fi
This issue is really annoying for me :( Does this not happen on other installations? I just installed and freshly set up my LMDE installation 5 days ago, but I accedentially downloaded the "old" image since the new one is only a release candidate and not linked on the download page yet, at least not 5 days ago. Therefore it downloaded 700MB updates on the first update-run.
äxl

Re: gnome-terminal autocompletion broken (half-working)

Post by äxl »

Looks good.
You're not stating since when it's like that but with UP4 bash and bash-completion were updated: http://forums.linuxmint.com/viewtopic.p ... 7&p=564284
kaefert
Level 3
Level 3
Posts: 110
Joined: Sun Jan 08, 2012 12:08 pm

Re: gnome-terminal autocompletion broken (half-working)

Post by kaefert »

thanks! thats it! thats the solution! :)
schmidty

Re: [SOLVED] gnome-terminal autocompletion broken (half-work

Post by schmidty »

Just to clarify this;
( NOTE: It is very important you keep another terminal open in case of any issues and always backup the original files you are going to change!! )

Copy the following block of code into a new file called ".bashrc";
if [ -d "$HOME/bin" ] ; then
PATH="$HOME/bin:$PATH"
fi


Add this line at the end of the ".bashrc" file;
export PATH

Then in the ".profile" file make sure you comment out that block that you copied above into the new ".bashrc" file ( this will prevent the "endless loop" and not being able to recover your terminal ).
Locked

Return to “LMDE Archive”