You are not logged in.
Pages: 1
I've just started using tmux and am quite impressed. One oddity though, whenever I start tmux - or open a new window or pane, I get the following printed before the prompt:
-bash: c: command not found
dir: cannot access colours: No such file or directory
-bash: /home/jason/.dir_colors: Permission denied
I don't see this when I open a normal termial (Urxvt or Xterm), only in tmux. I assume it has something to do with my $PATH, but am at a loss to explain it. Anyone else encountered anything like it?
Last edited by jasonwryan (2010-01-06 07:34:30)
Offline
Using tmux with zsh here without issues. From the output, I gather you're using bash. Could you post your .bashrc?
Offline
Thanks chpln
Pasted here: http://pastebin.com/m37a9a8e1
Offline
Well, I haven't been able to track down anything which would cause those errors. (I did notice a couple of unrelated things I might as well point out: a typo in `export HISTFILEIZE=' and the aliases `orphans' and `pacback' cause pacman to run when evaluating .bashrc; if this is not what you want, use single-quotes.)
Do you receive any errors when running another instance of `bash' within a shell, both directly within urxvt/xterm and within tmux? If not, are you using a wrapper script around tmux? If using a .tmux.conf, does it make a difference to start without it:
/usr/bin/tmux -f /dev/null
Check the read permissions of ~/.dir_colors (if you haven't already), I have a suspicion that is a separate error.
Offline
Thanks for the suggestions.
1. Do you receive any errors when running another instance of `bash' within a shell, both directly within urxvt/xterm and within tmux?
2. If not, are you using a wrapper script around tmux?
3. If using a .tmux.conf, does it make a difference to start without it:/usr/bin/tmux -f /dev/null
Check the read permissions of ~/.dir_colors (if you haven't already), I have a suspicion that is a separate error.
1. No - no errors running bash inside Urxvt or tmux
2. I'm not using a wrapper script around tmux
3. Starting without .tmux.conf results in the same errors.
The .dir_colours thing does seem to be a separate issue - it is currently 644 which I thought would work, but the error persists...
Offline
Judging from the spelling of `colours' alone, I too get the feeling it may have to do with something in your PATH. Does grep'ing through your scripts reveal anything?
Offline
Not really. I had a script called colours.sh - so I deleted it - to no effect. I also have a directory in ~ called .colours so I removed that but that had no impact either.
Thanks for your help with this chpln: it's a trivial annoyance but, like all these things, understanding why it is happening is probably as important as fixing it. I'll keep messing about with it and post any progress...
Offline
It is definitely not related to .bashrc - if I remove it tmux still opens with errors - including (the expected?)
-bash: /home/jason/.bashrc: No such file or directory
I still think it is related to my $PATH, but am not sure where else to look...
Offline
still opens with errors - including (the expected?)
I wouldn't have expected to see that and I can't reproduce that error with bash.
When an interactive shell that is not a login shell is started, Bash reads and executes commands from `~/.bashrc', if that file exists.
So, presumably .bashrc is indeed optional, and that error should usually not be triggered. I still have no idea where the problem could be. Might be worth testing whether the same thing happens with 'bash --norc', and hunting around some other files which may be sourced by bash on startup (/etc/bash.bashrc, /etc/profile, ~/.bash_profile).
Last edited by chpln (2010-01-05 21:47:56)
Offline
Might be worth... hunting around some other files which may be sourced by bash on startup (/etc/bash.bashrc, /etc/profile, ~/.bash_profile).
Bingo! I had this line in /etc/profile
eval `dir colours /home/jason/.dir_colors`
Complete with the anglophone spelling... Commenting it out leaves a single error as tmux starts, the
-bash: c: command not found
I'll keep looking in these files - I am confident that you have cracked it. Thanks!
##edit
Downloaded and installed a fresh /etc/profile and the last error is gone...
Last edited by jasonwryan (2010-01-06 07:35:51)
Offline
Pages: 1