On my Debian Wheezy system I have several users. For one user, lets call him martin (UID 1000) bash completion is not working. It works fine for all other users, even though they all use the same $HOME/.bashrc and $HOME/.profile.

This is very strange problem, because when I copy martin's whole home directory to testuser, bash completion works fine for testuser:

rm -rf /home/testuser
cp -a /home/martin /home/testuser
chown -R testuser:testuser /home/testuser

This leads me to believe, that whatever is causing this problem, it is not any setting in user home.

Does anybody know what might be causing this strange problem ?

UPDATE: the problems described above are experienced when I am logged in a virtual terminal (Gnome terminal). But I have just discovered that when logging in from a console (ALT+F1), bash completion works. Also, when in virtual console as martin (and bash completion does not work), when I do su - martin and log in, suddenly bash completion works. Looks like there is a difference between logging in from virtual console and normal console (or su - martin)

  • 3
    check /etc/passwd to see if he really has the same shell as the others? – Olivier Dulac Jan 3 '14 at 17:44
  • It could still be a problem with file ownerships (which you are resetting after copying martin's home directory to testuser's). I'm not sure if bash needs to access any files in the home directory for the completion to work, but you could check if there are any files in your home directory which you have no permission to read. – n.st Jan 3 '14 at 17:45
  • all files in /home/martin/ are owned by the user martin. (I checked that with: find /home/martin \! -user martin) – Martin Vegter Jan 3 '14 at 17:49
  • 1
    @glenn jackman: why should any bash dot-files in the home directory be world-readable ? – Martin Vegter Jan 3 '14 at 18:01
  • 4
    when running bash --verbose as his user, you might be able to see where the option disable-completion is getting set – replay Jan 3 '14 at 18:02

A difference as you're describing tells me there is some inconsistency witin Martin's /home/martin/.bashrc or /home/martin/.bash_profile.

The rationale for this conclusion is due to the way that Bash sources setup files. When a person opens another tab in say, gnome-terminal, the user's $HOME/.bashrc will get sourced, but not their $HOME/.bash_profile. However if you're logging in for the first time or, ssh'ing into the system your initial Bash shell will get invoked so that it sources $HOME/.bash_profile.

The sequence of how these things get sourced and when is discussed in the Bash man page, take a look at the INVOCATION section.



It's been a while so I assume, Martin, that you've solved your issue. For anybody else having the same issue as Martin describes (me being one of them), this fix solved it for me:

Edit ~/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml, find the line

<property name="&lt;Super&gt;Tab" type="string" value="switch_window_key"/>

and change it to

<property name="&lt;Super&gt;Tab" type="empty"/>

Found the tip here: http://codebangers.com/autocomplete-not-working-using-xrdp-xfceubuntulinux/

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.