LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
LinkBack Search this Thread
Old 04-11-2005, 07:30 AM   #1
fossilet
Member
 
Registered: Jul 2004
Location: Beijing, China
Distribution: Ubuntu, Fedora, CentOS
Posts: 33

Rep: Reputation: 0
How to set mlterm title?


My mlterm window title in debian is always mlterm , except when I am editing something in Vim. Can it be the current path or the appname in it? Thanks in advance.
 
Old 04-12-2005, 08:47 AM   #2
hw-tph
Senior Member
 
Registered: Sep 2003
Location: Sweden
Distribution: Debian
Posts: 3,032

Rep: Reputation: 56
You probably haven't got the PROMPT_COMMAND set in your ~/.bashrc for mlterm. First, check what your terminal reports itself as: echo $TERM (type this in an mlterm)
I use urxvt, which reports as "rxvt-unicode".

Open up your ~/.bashrc in your favourite editor and check for the case-esac part where the PROMPT_COMMAND is set. It should look something like this:
Code:
case $TERM in
	xterm*|rxvt|Eterm)
		PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/$HOME/~}\007"'
		;;
	screen)
		PROMPT_COMMAND='echo -ne "\033_${USER}@${HOSTNAME%%.*}:${PWD/$HOME/~}\033\\"'
		;;
esac
Edit the first case and add what your mlterm reports itself as. My urxvt reports as rxvt-unicode, so I'm adding that:
Code:
case $TERM in
	xterm*|rxvt|Eterm|rxvt-unicode)
		PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/$HOME/~}\007"'
		;;
	screen)
		PROMPT_COMMAND='echo -ne "\033_${USER}@${HOSTNAME%%.*}:${PWD/$HOME/~}\033\\"'
		;;
esac
Save your ~/.bashrc and exit. Try parsing the .bashrc again: source ~/.bashrc.
Your window command should now be set to whatever you have PROMPT_COMMAND set to. There, finished!


Håkan
 
Old 04-13-2005, 12:10 AM   #3
fossilet
Member
 
Registered: Jul 2004
Location: Beijing, China
Distribution: Ubuntu, Fedora, CentOS
Posts: 33

Original Poster
Rep: Reputation: 0
Thank you very much. It works. Great!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
under with title and sub title the "GTK devel" found in fc3? AKAKAK Fedora 3 02-27-2005 05:51 AM
How to change default MLTERM font ? Bonch Debian 1 10-30-2004 03:44 AM
Set the Xterm title to reflect the current time ! Bonch Linux - Newbie 11 10-25-2004 04:50 PM
How to set title in xterm according to what program running ? tvn Linux - General 1 07-25-2004 07:58 PM
How to set the window title for Eterm dynamically? MiscGeek Linux - Software 4 09-29-2003 09:33 PM


All times are GMT -5. The time now is 12:31 PM.

Main Menu
 
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
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration