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

Post your update and upgrade related errors here
Forum rules
Before you post please read this

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

Postby kaefert on Tue Apr 17, 2012 5:07 pm

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 kaefert on Sun May 06, 2012 12:07 pm, edited 1 time in total.
kaefert
Level 2
Level 2
 
Posts: 52
Joined: Sun Jan 08, 2012 12:08 pm

Linux Mint is funded by ads and donations.
 

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

Postby äxl on Wed Apr 18, 2012 12:44 pm

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
My Linux history: Ubuntu 10.04 - 10.10 - LMDE 201109 - UP4 My sources.list/preferences

Computers is not science. And it's not magic - it's something in between.
User avatar
äxl
Level 5
Level 5
 
Posts: 524
Joined: Fri Apr 06, 2012 6:14 am
Location: Germany

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

Postby kaefert on Thu Apr 19, 2012 2:11 am

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.
kaefert
Level 2
Level 2
 
Posts: 52
Joined: Sun Jan 08, 2012 12:08 pm

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

Postby äxl on Thu Apr 19, 2012 1:24 pm

Looks good.
You're not stating since when it's like that but with UP4 bash and bash-completion were updated: viewtopic.php?f=198&t=99147&p=564284
My Linux history: Ubuntu 10.04 - 10.10 - LMDE 201109 - UP4 My sources.list/preferences

Computers is not science. And it's not magic - it's something in between.
User avatar
äxl
Level 5
Level 5
 
Posts: 524
Joined: Fri Apr 06, 2012 6:14 am
Location: Germany

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

Postby kaefert on Fri Apr 20, 2012 12:49 am

thanks! thats it! thats the solution! :)
kaefert
Level 2
Level 2
 
Posts: 52
Joined: Sun Jan 08, 2012 12:08 pm

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

Postby schmidty on Fri Aug 10, 2012 7:35 pm

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 ).
schmidty
Level 1
Level 1
 
Posts: 2
Joined: Fri Aug 10, 2012 12:09 pm


Return to Update/Upgrade Issues

Who is online

Users browsing this forum: No registered users and 8 guests