From: Anthony Rey (
Date: Thu Dec 08 2011 - 07:38:04 CST

I suppose you're using linux.

1/ If you want to use Tcl/Tk in a terminal

This command allows you to use Tcl/Tk packages (they are normally
already installed those on your system).

"wish" runs Tcl and TK whereas "tclsh" runs only tcl.
If you want to use tk using tclsh, do the following:
>package require Tk (load the extension Tk)

Then type your script, for example:

>button .b -text "Salut mec" -command exit
>grid .b

2/If you want to run a script through the terminal

Put the following header in your script (ex your file
or on most system that would work as well
#!/bin/env wish

If whish os in a different path, type
>which whish
and modify the path accordingly.

then from the terminal, source the code:
>source I_should_read_the_doc.tcl

3/ Though VMD without launching the GUI:
>vmd -dispdev text -e I_should_read_the_doc.tcl


On 08.12.2011 20:14, Sangita Kachhap wrote:
> Hi
> I want to know that can I use tcl script (without opening vmd) in
> terminal by
> command line using system command to call vmd.
> Like other software can be use by using system command.
> Sangita Kachhap
> ______________________________________________________________________
> सूक्ष्मजीव प्रौद्योगिकी संस्थान (वैज्ञानिक औद्योगिक अनुसंधान परिषद)
> Institute of Microbial Technology (A CONSTITUENT ESTABLISHMENT OF
> सैक्टर 39 ए, चण्डीगढ़ / Sector 39-A, Chandigarh
> पिन कोड/PIN CODE :160036
> दूरभाष/EPABX :0172 6665 201-202