no display name and no $DISPLAY environment variable
    while executing
"load /enadisk/commun/linux/local/ActiveTcl-8.6.11/lib/libtk8.6.so Tk"
    ("package ifneeded Tk 8.6.11" script)
    invoked from within
"package require Tk"
    (in namespace eval "::request" script line 3)
    invoked from within
"namespace eval ::request $script"
    ("::try" body line 12)

OUTPUT BUFFER:

#!/usr/local/bin/wish package require Tk proc RasmolExe {} { global tcl_platform global OrdBinDir global env if {$tcl_platform(platform) == "windows"} { set rexe [file join $env(ProgramFiles) RasMol "raswin.exe"] regsub "Program Files" $rexe "PROGRA~1" rexe } else { set rexe [file join $OrdbinDir "rasmol"] } return $rexe } proc InitialiseRasMol {} { global tcl_platform global LiaisonCoupee set LiaisonCoupee 0 set Patientons 30 set IlEstLa 0 if {$tcl_platform(platform) != "windows"} { while {[incr Patientons -1]} { set LesInterps [winfo interps] puts "intrps : $LesInterps" if {[regexp "rasmol" [join $LesInterps "\n"]]} { set IlEstLa 1 break } after 2000 } if { ! $IlEstLa} { puts "Can't connect to RasMol\nCanceled" return } else { puts "Rasmol connecte !" } } after 1000 update return } proc AnswerOfRasMol Canal { global ReponseRasmol global RecuperationEffecturee set ReponseRasmol "" if {! [eof $Canal]} { puts "passe eof" while {[gets $Canal rep] >= 0} { puts "passe le while" after 200 # flush stdout # flush $Canal # set rep [read $Canal] puts ">>$rep<<" lappend ReponseRasmol $rep } } else { puts " !! EOF !!" close $Canal } set RecuperationEffecturee 1 return } proc DonneAtPi {args} { global AtPicked puts ">>>>$AtPicked" return } proc VersRasMol Commande { global CanalR global tcl_platform global RecuperationEffecturee if {! [info exists CanalR]} { if {$tcl_platform(platform) eq "windows"} {package require dde} puts "Launching RasMol !" eval set CanalR [open "|[RasmolExe]" r] # eval exec [RasmolExe] & after 500 # set CanalR [socket localhost 21069] # fconfigure $CanalR -blocking 0 -buffering line -buffersize 4094 fconfigure $CanalR -blocking 0 -buffering line # InitialiseRasMol fileevent $CanalR readable [list AnswerOfRasMol $CanalR] global AtPicked set AtPicked [dde request RasWin System Pick] trace add variable AtPicked write DonneAtPi } puts "Cmd_> $Commande" # puts $CanalR "$Commande" # flush $CanalR # after 500 # dde execute RasWin RemoteControl "\[$Commande\] \[echo \"turlu\"\]" dde execute RasWin RemoteControl "$Commande" after 500 # puts $CanalR "echo TURLU" # flush $CanalR # send rasmol "$Commande" # flush $CanalR # send rasmol "echo TURLU" # flush $CanalR tkwait variable RecuperationEffecturee unset RecuperationEffecturee return } proc tst {} { set c [open "| ./bin/rasmol" r] puts "[winfo interps]" send rasmol "\[background white\]" } #tst #tkwait variable toto package require http package require tile set InitRasMol 1 set OrdBinDir "/home/moumou/ordali/bin" label .l -text "test rasmol" pack .l button .b1 -text "load" -command [list VersRasMol "load 1wey.pdb"] button .b2 -text "back" -command [list VersRasMol "background white"] button .b3 -text "quit" -command [list VersRasMol "quit"] pack .b1 .b2 .b3 update idletasks #VersRasMol "zap" #VersRasMol "rotate all" #VersRasMol "background white" #VersRasMol "set cartoons 6" #VersRasMol "set menus off" #VersRasMol "load 1wey.pdb" #VersRasMol "wireframe off" #VersRasMol "structure" #VersRasMol "cartoon"