Script run everytime a new terminal window is opened


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Script run everytime a new terminal window is opened
# 1  
Old 02-15-2011
Script run everytime a new terminal window is opened

I created a script called title

#!/bin/sh

echo "^[]0;$*^G"

It will change the terminal window titlebar to what ever I type after the script (title BIG would change titlebar to BIG instead of terminal) Is there a way to make it run so it will work on every terminal window that gets opened. Currently I would have to run it each time a new terminal window is open. Thanks for any help.

---------- Post updated at 08:43 AM ---------- Previous update was at 08:19 AM ----------

Also if anyone knows how to change the color of the title bar in solaris 8. Thanks again. I am searching the forums and google.
# 2  
Old 02-22-2011
You might want to "re-phrase" it as a function then invoke the function by name in either .bashrc or .bash_profile , as one or the other usually load with the shell when a new Terminal window is created.

Just a half-educated (if even that much) guess.

BZT
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Toggle between xterm window and standard terminal window

Is it possible to toggle back and forth between an xterm invoked from one tty, and a shell invoked from a different tty? I am running Centos 7 with KDE and booting in non-graphic mode. After logging in on the default window (/dev/tty1) , I can then use ALT-F2 to access a new window (/dev/tty2),... (1 Reply)
Discussion started by: rhgscty
1 Replies

2. Shell Programming and Scripting

Run script in new terminal

Hi Guys, I have a script that runs certain simulations in batch mode. I need to schedule some simulations to run over night. For each simulation to complete it should be run in separate terminal. My script is as follows sh run_test.sh <arg1> <arg2> <arg3> ... I need to launch this... (5 Replies)
Discussion started by: aelhosiny
5 Replies

3. Shell Programming and Scripting

Close the Run window after script is done

Hello to all, I am a Newcomer in Solaris and have the following problem. I have a small shell script in my home folder, which I have moved to my desktop and from there I can start the script with a double mouse click. If I do a double click on the symbol for the script in workspace, a... (5 Replies)
Discussion started by: Mike Newbie
5 Replies

4. Shell Programming and Scripting

My script doesn't work in the terminal window!

I am inexperienced with scripting and it continues to baffles me speechless I wrote a script so that it counts the number of subset of files (with different prefix) in all subdirectories under the current directory so that find ./ -type d -maxdepth 1 -mindepth 1 > list_of_dir.txtfind all... (23 Replies)
Discussion started by: piynik
23 Replies

5. Ubuntu

run multiple command at the same time in one window terminal using multiplexer

Hi, I would like to ask if someone knows or accomplished this task in the terminal multiplexer in a single window with multiple splitted pane: In the script run multiple command at the same time in diff splitted pane or simulatneously. As an example: I would like to run iptraf, iotop, htop,... (2 Replies)
Discussion started by: jao_madn
2 Replies

6. Shell Programming and Scripting

executing a shell script everytime the terminal is opened

the problem statement is Write a shell script, which gets executed the moment the user opens a terminal. It should display the message "Hello your_name, welcome to 172.16.4.120 server” How to get around this? (2 Replies)
Discussion started by: arindamlive
2 Replies

7. Shell Programming and Scripting

How to make a script to run everytime a new file is copied into a directory??

Hi folks I have a unix script script1 in a directory folder1 and also I have few input log files in this directory. My input log files will be copied into this directory folder1 from the portable thumb drive. Now what I want is I need to run this script1 whenever any new file is copied... (2 Replies)
Discussion started by: ks_reddy
2 Replies

8. UNIX for Dummies Questions & Answers

backing up file everytime script run and saving other backups

how would i go about creatng a backup of a file everytime a script is run so that the next time it is run the old backup gets pushed back and the most recent backup is 1st. (new)backup.1 (old)backup.2 that kind of idea?? (4 Replies)
Discussion started by: knc9233
4 Replies

9. Shell Programming and Scripting

Need to run source .bashrc everytime

hi all, I've included some variables in my .bashrc file. But everytime i'm logging in i need to source my .bashrc file to make effect of my variables. i'm having an account on a highly secured production environment. I've the following in my ~/.bashrc file alias cls=clear How to make... (2 Replies)
Discussion started by: kalyanraj
2 Replies

10. Solaris

Script to launch terminal window?

Hi, I am a newbie here. Trying to find a way of writing a script to launch multiple terminal or console windows on solaris 9. I used to be able to do this using cmdtool on older versions of solaris and it was even possible to configure the size and screen position of the window and the title. ... (5 Replies)
Discussion started by: omerta
5 Replies
Login or Register to Ask a Question