—————– தமிழ் வாழ்க ————————

There are many situations where we need to change the prompt name and set a window title in our Ubuntu terminal.

Follow the steps mentioned below.

$ sudo gedit ~/.bashrc
Please do the following changes in the file.

Comment out the existing PS1 line and add a new line with your text.

if [ “$color_prompt” = yes ]; then
#    PS1=’${debian_chroot:+($debian_chroot)}\[33[01;32m\]\u@\h\[33[00m\]:\[33[01;34m\]\w\[33[00m\]\$ ‘

       PS1='<your_text_here>:\w\$ ‘

else
#    PS1=’${debian_chroot:+($debian_chroot)}\u@\h:\w\$ ‘
       PS1='<your_text_here>:\w\$ ‘
  fi

Then save the file and source it to see the changes.

$ source ~/.bashrc

Now you will see your prompt name change in your Ubuntu terminal. Doing this will only change the prompt, but not the title. The title will remain the same as the previous. There are many ways to set the title for Ubuntu terminal. I will suggest one of them.
Install wmctrl package.

$ sudo apt-get install wmctrl

Then

$ wmctrl -r :ACTIVE: -N “<your title>”

Thats It!!!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Tag Cloud

%d bloggers like this: