DebianThis forum is for the discussion of Debian Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have a handful of debian servers at my house, all of them setup and configured fairly closely to each other. I also have a debian laptop that I use to SSH into the computers from campus.
With the Terminator shell, I can ssh into all of the computers, with one computer per tab. Most of the time, when I make an ssh connection, Terminator will set the tab title from "ctag@laptop" to "ctagAlt@homecomputer". But for one computer the change doesn't happen.
I've reviewed /etc/hosts and /etc/hostname to make sure that the computer follows the same plan as the others, and it does. What might cause terminator to skip setting the title for only one connection?
I don't use terminator (so it may do something different), but usually the text in the tab/titlebar is set by the shell (or whatever other program is running in the terminal). So, are you using a different shell or have a different configuration on that machine? Also, as a cross check, what happens if you use a different terminal emulator?
Thanks for the suggestion. All of the machines are running /bin/bash, so no difference there that I can tell. I tried with xterm and got the same situation. When I connect to a "working" computer, xterm will rename the window's title to ctagAlt@homecomputer or whatever, but left the title alone when I connect to the misbehaving computer.
I went back and ran "echo $SHELL" to make sure, and everything is using /bin/bash.
The systems are as close to identical as I can make them. They were all set up off of a Debian 7.2 netinstall iso a few months ago, they're updated together as well. The only difference is a few programs, one has irc, one has network monitoring, etc.
The normal computers have ~/.bashrc and ~/.profile, nothing about PROMPT_COMMAND in them. The misbehaving computer has neither .bashrc nor the substitute .bash_profile or .bash_login. There is only a .bash_history in the /home/ctag directory. All of the systems have /etc/bash.bashrc, and they all appear identical. The only instance of PROMPT_COMMAND is commented out.
Code:
# Commented out, don't overwrite xterm -T "title" -n "icontitle" by default.
# If this is an xterm set the title to user@host:dir
#case "$TERM" in
#xterm*|rxvt*)
# PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD}\007"'
# ;;
#*)
# ;;
#esac
well if you want to understand the difference have a dig into the ~/.bashrc and ~/.profile, or for what is probably a quick fix just copy those two files over to the anomalous machine.
I went for the quick fix and copied over the files, the hostname now gets set correctly when using SSH.
School is about to start again, but I hope to have some time to look around and see what's causing these files to control the title, and why one computer didn't generate them. I'll make sure to follow up if I learn anything.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.