OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [insight/] [expect/] [example/] [xrlogin] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 578 markom
#!/depot/path/expect --
2
# xrlogin - rlogin but with current DISPLAY
3
#
4
# You can extend this idea to save any arbitrary information across rlogin
5
# Don Libes -  Oct 17, 1991.
6
 
7
if {[llength $argv] != 1} {
8
        puts "usage: xrlogin remotehost"
9
        exit
10
}
11
 
12
set prompt "(%|#|\\$) $"                ;# default prompt
13
catch {set prompt $env(EXPECT_PROMPT)}
14
 
15
set timeout -1
16
eval spawn rlogin $argv
17
expect eof exit -re $prompt
18
if [string match "unix:0.0" $env(DISPLAY)] {
19
        set env(DISPLAY) "[exec hostname].[exec domainname]:0.0\r"
20
}
21
send "setenv DISPLAY $env(DISPLAY)\r"
22
interact

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.