LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 10-11-2011, 12:29 PM   #1
Amerika
LQ Newbie
 
Registered: Dec 2010
Posts: 18

Rep: Reputation: 0
Change terminal title with bash script.


Code:
#!/bin/bash 
cd ../cooms3/
./run_something
Every time i run this bash script an terminal opens and the program runs further. The terminal has title "Terminal". I know i can change it manually, but can i change automatically everytime by adding some kinda line in the bash script?

Thanks for answers.
 
Old 10-11-2011, 12:45 PM   #2
corp769
LQ Guru
 
Registered: Apr 2005
Location: /dev/null
Posts: 5,818

Rep: Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007
Hello,

To keep this simple.... http://www.google.com/#sclient=psy-a...w=1024&bih=584

Cheers,

Josh
 
Old 10-11-2011, 12:47 PM   #3
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Arch + Xfce
Posts: 6,852

Rep: Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037
It might help if you gave us a few more details. What is purpose of the script? What exactly are these further commands the script runs? Most commands don't open up new consoles.

In principle, any command you can run in the shell can also be done inside a script. So how exactly do you change it "manually"? Do you perhaps mean through the features of the gui virtual console you use?

Most consoles honor the xtitle section of the PS1 prompt, if it exists, in their titlebar displays. So you probably just need to set the PS1 in your script.
 
Old 10-19-2011, 02:06 PM   #4
Amerika
LQ Newbie
 
Registered: Dec 2010
Posts: 18

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by corp769 View Post
Hello,

To keep this simple.... http://www.google.com/#sclient=psy-a...w=1024&bih=584

Cheers,

Josh
Found some scripts, but i dont understand them exactly right could you post the right one, because they have posted many kinds of script lines.
This is an script
It is for an counter strike 1.6 server.
Code:
#!/bin/bash 
cd ../cooms3/
./hlds_run -game cstrike +ip 192.168.1.106 +port 2701 +maxplayers 21 +map de_aztec
What i do is click the .sh file and then press "Run in Terminal" And i need to add some kinda line in order to change the terminal title.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Terminal xterm Title is too dynamic (title doesn't change manually) ZeroDaHero Slackware 4 11-04-2012 12:16 PM
Unable to change directory on terminal using bash script gregorian Linux - Newbie 11 02-05-2007 03:17 AM
How to change terminal title obnascar Linux - General 1 01-12-2006 02:41 PM
change console title in bash script? TLV Linux - Software 18 10-08-2004 11:25 AM
change window title in terminal sandman Linux - General 4 12-15-2002 03:55 AM

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

All times are GMT -5. The time now is 01:29 PM.

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