View Full Version : Customizing Terminal

21st November 2008, 10:16 PM
I know, this question seems like a stupid one. I'm looking for a way of customizing my terminal, so it's as simple as editing a file and bam, I'm done.

Not exactly. I wanted to find a way of setting up a script of some sort to open up a terminal in a preset condition.

For example, I want 3 or 4 scripts each to open up a distinct terminal for different functions. For example, one terminal window I might want to use to set up an FTP, or TFTP. Another terminal I may want to use to ping a network host. Another terminal something else, etc.

I'm looking for 2 things here, hopefully someone can help me:

a)Write the script to actually RUN those commands automatically. I can run the commands one by one but have had a little trouble creating a script that would run them in sequence with the proper results.

b)Write some sort of script to launch an aesthetically different terminal for each project. The first thing that comes to mind is a different font color, but any suggestions are welcome. This is not a PERMANENT change, just a temporary change of the specific terminal window, seeing as there will be multiple windows open at a time, and it would be easier to keep them straight in my mind if I could visually tell the difference without tabbing between them all.

Let me know what you all think about how I might do this. The objective would be to get some automated scripts running in distinct terminal windows without needing to enter many (if any) commands in the process, aside from possibly the occasional parameter such as an FTP address, etc.


21st November 2008, 10:38 PM
I'm not sure about the first one, but the second one can be simple or a little more complex depending on just what you want to do (by complex I don't even really mean hard). Right-click on the terminal and go to profiles>Profile preferences. In there you can edit the look of the terminal. Make sure you rename it to make it a distinct profile. Do that for as many terminals as you want. Go to System>Sessions and add those terminal sessions in the Startup Programs tab. Name each one the command for each one would be gnome-terminal --window-with-profile=<whatever you named each console>.
To do even more you can use a window manager app. devilspie is what I used for the last thing I did on there.
Hope this helps.

21st November 2008, 11:07 PM

/bin/bash -c " xterm -name Ping -fg red -bg white -e ping -s localhost" &
/bin/bash -c "xterm -name command or script2 -fg green -bg black -e command"&

if you want to use gnome-terminal or konsole see the man pages for each

Explination: :cool:

the /bin/bash -c " ... " &
tells the shell to execute the following command using bash and background the "new shell"
this is very similar to nohup but it allows the & to work on the bash shell and not the command

first line will spawn a new xterm window with red text on a white background
the second line will spawn a new xterm windows with green text on a black background

-name is the "TITLE" of the new window

22nd November 2008, 12:07 AM
Ciao ...
Take a look to a great tool name SCREEN . With screen you can open how many console you want in the same window terminal .You can configure each wind term. to use for another program / script ..
and here you have some tips and screenshots abou screen