LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 01-06-2014, 03:15 PM   #1
ctag
LQ Newbie
 
Registered: Jul 2013
Posts: 19

Rep: Reputation: Disabled
Question No titlebar hostname set with ssh connection


Hi,

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?

Thanks,
-CTAG
 
Old 01-06-2014, 07:44 PM   #2
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,724

Rep: Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705
Hi,

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?

Evo2.
 
Old 01-06-2014, 08:52 PM   #3
ctag
LQ Newbie
 
Registered: Jul 2013
Posts: 19

Original Poster
Rep: Reputation: Disabled
Hi evo2,

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.

Thanks,
-CTAG
 
Old 01-06-2014, 09:06 PM   #4
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,724

Rep: Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705
Hi,

I suggest you look for differences in your dot files (eg .bashrc, .profile, .bash_profile, .bash_login) for example is PROMPT_COMMAND being set?

Otherwise please provide more information about the different systems.

HTH,

Evo2.
 
Old 01-06-2014, 09:27 PM   #5
ctag
LQ Newbie
 
Registered: Jul 2013
Posts: 19

Original Poster
Rep: Reputation: Disabled
Awesome, I think we're homing in on an answer.

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
Thanks,
-CTAG

Last edited by ctag; 01-06-2014 at 09:35 PM.
 
Old 01-06-2014, 09:50 PM   #6
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,724

Rep: Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705
Hi,

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.

Evo2.
 
Old 01-06-2014, 10:41 PM   #7
ctag
LQ Newbie
 
Registered: Jul 2013
Posts: 19

Original Poster
Rep: Reputation: Disabled
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.

Thank you!,
-CTAG
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
cygwin- ssh: connect to host hostname port 22: Connection timed out simplicity General 3 04-25-2012 03:25 PM
What does ~ mean when set up ~/.ssh/id_rsa.pub name@hostname lclockedile Linux - Newbie 3 05-23-2011 07:31 AM
ssh connection refused - trying to set up ssh server at home openSauce Linux - Server 10 10-18-2007 04:38 PM
How to set up SSH connection ICO SUSE / openSUSE 6 08-05-2005 03:59 AM
Do after changed the hostname, can't connection by SSH again? explorer1979 Linux - Networking 2 03-30-2004 10:15 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 02:23 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration