Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Desktop Environments
  • Search

gnome-terminal title [solved]

Problems with GUI applications? Questions about X, KDE, Gnome, Fluxbox, etc.? Come on in. NOTE: For multimedia, go up one forum
Post Reply
Advanced search
11 posts • Page 1 of 1
Author
Message
qleak
n00b
n00b
User avatar
Posts: 67
Joined: Fri Jun 17, 2005 7:35 pm

gnome-terminal title [solved]

  • Quote

Post by qleak » Thu Apr 26, 2007 10:40 am

Does anyone know a command line way to set the title of a terminal window. I've noticed emerge does this but its a matter of convenience so I don't want to spend forever looking for it.

Thanks

-Q
Last edited by qleak on Wed May 02, 2007 8:17 am, edited 1 time in total.
(\ /)
(O.o)
(> <)
This is Frank. He made me flood the school.
Top
Roman_Gruber
Advocate
Advocate
Posts: 3854
Joined: Tue Oct 03, 2006 8:43 am
Location: Austro Bavaria

  • Quote

Post by Roman_Gruber » Thu Apr 26, 2007 11:03 am

Its easy.

right mouse click in the gnome terminal: Show menu bar.

then go in the menu and change it in the preference menu.

You could also set then the font, color, opaque, etc.. of gnome-terminal.
Top
ZZamboni
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 96
Joined: Fri Jan 16, 2004 12:57 pm
Location: Zurich, Switzerland

Re: gnome-terminal title

  • Quote

Post by ZZamboni » Thu Apr 26, 2007 11:15 am

qleak wrote:Does anyone know a command line way to set the title of a terminal window. I've noticed emerge does this but its a matter of convenience so I don't want to spend forever looking for it.
A Google search for "howto set terminal title" yields quite a number of pointers to how to do this, including this: http://www.faqs.org/docs/Linux-mini/Xterm-Title.html

In a nutshell, it's this:

Code: Select all

echo "\033]0;the terminal title you want\007"
See also this thread: http://forums.gentoo.org/viewtopic.php?t=18106
Top
qleak
n00b
n00b
User avatar
Posts: 67
Joined: Fri Jun 17, 2005 7:35 pm

Re: gnome-terminal title

  • Quote

Post by qleak » Thu Apr 26, 2007 2:51 pm

ZZamboni wrote:
qleak wrote: In a nutshell, it's this:

Code: Select all

echo "\033]0;the terminal title you want\007"
See also this thread: http://forums.gentoo.org/viewtopic.php?t=18106
This doesn't seem to work in xterm, not to mention gnome-terminal. Infact if i use the xterm -T"title" at the command line it gets replaced by the default title user@host /pwd Same thing with gnome-terminal. Looks like a bunch of people with unanswered questions on the link you gave too.

I do actually want this to be a command line way of doing this so I can add it to my custom scripts I run for work.

thanks for the suggestions,

-Q
(\ /)
(O.o)
(> <)
This is Frank. He made me flood the school.
Top
ZZamboni
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 96
Joined: Fri Jan 16, 2004 12:57 pm
Location: Zurich, Switzerland

Re: gnome-terminal title

  • Quote

Post by ZZamboni » Thu Apr 26, 2007 10:06 pm

qleak wrote:This doesn't seem to work in xterm, not to mention gnome-terminal. Infact if i use the xterm -T"title" at the command line it gets replaced by the default title user@host /pwd Same thing with gnome-terminal.
Thats most likely because the default prompt on Gentoo automatically sets the terminal title to "user@host pwd", so in fact it is working, but it is immediately being set again to the default after the command executes, when the prompt reappears. You can test that this is the case by resetting the prompt commands:

Code: Select all

export PROMPT_COMMAND=
export PS1="$"
and then trying again to manually set the terminal title.
Top
qleak
n00b
n00b
User avatar
Posts: 67
Joined: Fri Jun 17, 2005 7:35 pm

  • Quote

Post by qleak » Sun Apr 29, 2007 5:08 pm

even with changing the command line the echo command does not work on either xterm or gnome-terminal. Any other ideas?

Cheers

-Q
(\ /)
(O.o)
(> <)
This is Frank. He made me flood the school.
Top
ZZamboni
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 96
Joined: Fri Jan 16, 2004 12:57 pm
Location: Zurich, Switzerland

  • Quote

Post by ZZamboni » Sun Apr 29, 2007 6:25 pm

qleak wrote:even with changing the command line the echo command does not work on either xterm or gnome-terminal. Any other ideas?
I accidentally omitted the -ne options to the echo command, which are needed for the escapes to be interpreted correctly and to omit spurious output. This is the command you need:

Code: Select all

echo -ne "\033]0;the terminal title you want\007"
<rant>With all due respect, you could have looked at the document to which I pointed you, and found the solution there, including the options above, and not wait for me to give you all the answers already digested.</rant>
Top
qleak
n00b
n00b
User avatar
Posts: 67
Joined: Fri Jun 17, 2005 7:35 pm

  • Quote

Post by qleak » Wed May 02, 2007 8:17 am

ZZamboni wrote:
qleak wrote:even with changing the command line the echo command does not work on either xterm or gnome-terminal. Any other ideas?
I accidentally omitted the -ne options to the echo command, which are needed for the escapes to be interpreted correctly and to omit spurious output. This is the command you need:

Code: Select all

echo -ne "\033]0;the terminal title you want\007"
<rant>With all due respect, you could have looked at the document to which I pointed you, and found the solution there, including the options above, and not wait for me to give you all the answers already digested.</rant>
ahh thanks. I did actually try the -ne option but failed to do so after exporting the variables.

All the best,

-Q
(\ /)
(O.o)
(> <)
This is Frank. He made me flood the school.
Top
qleak
n00b
n00b
User avatar
Posts: 67
Joined: Fri Jun 17, 2005 7:35 pm

  • Quote

Post by qleak » Wed May 02, 2007 8:22 am

If anyone is interested here is my script I added this too

Code: Select all

#!/bin/bash

export PROMPT_COMMAND=
export PS1="$"
echo -ne "\033]0;GAP\007"

FILE="/usr/local/src/gap4r4/save_X.gap"
[ -z "$DISPLAY" ] && FILE="/usr/local/src/gap4r4/save.gap"

/usr/local/src/gap4r4/bin/gap.sh -L $FILE $*
Thanks again :)

-Q
(\ /)
(O.o)
(> <)
This is Frank. He made me flood the school.
Top
Mythos
l33t
l33t
User avatar
Posts: 953
Joined: Sun May 02, 2004 11:54 pm
Location: Portugal
Contact:
Contact Mythos
Website

  • Quote

Post by Mythos » Wed May 02, 2007 12:42 pm

ummm gnome-terminal -> Terminal -> Set Title ?
Best Regards,
Sérgio Henrique
Linux dune 3.0.6-gentoo #1 SMP Thu Oct 27 16:47:29 WEST 2011 x86_64 Intel(R) Core(TM)2 Duo CPU T7500 @ 2.20GHz GenuineIntel GNU/Linux
Top
qleak
n00b
n00b
User avatar
Posts: 67
Joined: Fri Jun 17, 2005 7:35 pm

  • Quote

Post by qleak » Thu May 03, 2007 4:22 pm

Mythos wrote:ummm gnome-terminal -> Terminal -> Set Title ?
tw04l124 also suggested this. I also was aware of this option, but it takes time to change the window title every time I run a program. I wanted it to be automatic with specific programs that are important to me. :)

Thanks anyway,

-Q
(\ /)
(O.o)
(> <)
This is Frank. He made me flood the school.
Top
Post Reply

11 posts • Page 1 of 1

Return to “Desktop Environments”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic