Friday, March 13, 2009

Xterm - tips and tricks

xterm terminal is a powerful, programmable and full with options. It is available with almost all variants of Unix OS.

The following reference is good for at least Solaris operating system.

Explanation of switches available for xterm:
======================================================================
-T "Title name" : Used for displaying title
-bg : For background color
-fg : For foreground color
-fn : For font name (it can be name as well as size also)
-e : This x-application will open in xterm window
-geometry 180x60 : To define xterm's window size and location (optional)
-display : To send the xterm's display on "Hostname" (i.e. for remote display)

How to open Xterm on local system:
======================================================================
xterm -T "This xterm is from: `whoami`@`hostname`" -bg black -fg white -fn fixed -geometry 180x60
xterm -T "This xterm is from: `whoami`@`hostname`" -bg black -fg white -fn "*-fixed-*-*-*-20-*" -geometry 180x60


How to open Xterm on remote system:
======================================================================
xterm -T "This xterm is from: `whoami`@`hostname`" -bg black -fg white -fn fixed -display 10.10.10.230:6.0
xterm -T "This xterm is from: `whoami`@`hostname`" -bg black -fg white -fn "*-fixed-*-*-*-20-*" -display 10.10.10.230:6.0
xterm -T "This xterm is from: `whoami`@`hostname`" -bg black -fg white -fn fixed -display 10.10.10.230:6.0 -e xclock

No comments: