Terminal profiles in Ubuntu...

AtlantaBob

Golden Member
Jun 16, 2004
1,034
0
0
Hi guys. I originally posted this in Ubuntu Forums, but didn't get a reply. I've found that Anandteh seems to know more about this kind of stuff, so I'm asking the same question here.... Thanks!

I had a question that I hope someone can help me with. I use a lot of terminal and terminal-based apps at work (mySQL, R, LaTeX). Ubuntu/Xubuntu (I switch between Gnome and XFCE) 9.04.

Ideally, I would like to have a separate terminal appearance for each terminal window (e.g. the normal terminal would have green text on a black background, the terminal for mySQL would have orange text on a black background, the terminal for LaTeX would have a smaller than usual font, and the R terminal would have blue text on a black background).

I suppose that I could create bash scripts that change the terminal colors before I run the commands for mySQL and R, but I don't know of a way to get the fonts to automatically shrink. I was thinking I could do something through terminal profiles but I haven't had much luck....

Any suggestions?

Thanks.
 

Alex

Diamond Member
Oct 26, 1999
6,995
0
0
The only thing I haven't figured out yet is launching a terminal window with a specific profile (shouldn't be too hard either).

In the terminal just go to Edit -> Profiles to create as many as you want (change font-size, colors, etc) and then Terminal -> Change Profile to switch... :)
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
Depends on which terminal you're using. I only have xterm and gnome-terminal installed but xterm has tons of color options and gnome-terminal supports both --window-with-profile=PROFILENAME and --tab-with-profile=PROFILENAME options.
 

AtlantaBob

Golden Member
Jun 16, 2004
1,034
0
0
Thanks guys! I'm really not sure why or how I missed that. It's much appreciated though.

Nothinman, I tried playing around with xterm, but I gotta say, I'm not sure I'm dedicated enough to figure out the right combination of options for that cryptic font -*-*-*-*-* command
(though for others who might want to try this link looked promising: http://linuxhelp.blogspot.com/...g-xterm-in-linux.html)

So, for right now, I'll either use xTerm with my Mac at home (which has a -fs font size option) or use gnome-terminal.

Again, thanks!
 

Net

Golden Member
Aug 30, 2003
1,592
3
81
just do this.

put this in you .bashrc located in your home dir

alias sqlterm="xterm -bg black -fg orange -cr green +cm +dc -geometry 80x24+100+50"


save, open up a new terminal

now anytime you type sqlterm you got your mySQL terminal

I would just run it as: sqlterm &
or make a shortcut for it.

For the script you could just do:

#!/bin/sh
#filename: runxterms
sqlterm &
myterm1 &
myterm2 &
myterm3 &

then save it and chmod 755 runxterms
./runxterms

----------------------------------------------------------------------------
some more useful changes

in your .bashrc

alias ls="ls --color"

in your .vimrc

set cindent
set smartindent
set autoindent
set expandtab
set softtabstop=2
set shiftwidth=2
"set cinkeys=0{,0},:,0#,!,!^F
syntax on