DISLOCATE(1)
โจ DISLOCATE โจ
okay bestie, welcome to dislocate ๐
a whole General Commands Manual moment, and honestly? it's giving underrated icon. let's get into it.
๐ธ NAME ๐ธ
Dislocate โ disconnect and reconnect processes ๐ฆ
like, you just... walk away from a process and come back to it later? yes. that's the whole vibe.
๐ SYNOPSIS ๐
dislocate [ program args... ]
๐ INTRODUCTION ๐
so Dislocate lets processes be disconnected and reconnected to the terminal โจ literally the main character of not-losing-your-work. possible uses, no cap:
- you can disconnect a process from a terminal at work and reconnect from home, to continue working ๐
- after having your line be dropped due to noise, you can get back to your process without having to restart it from scratch ๐ญ (the relief. the relief.)
- if you have a problem that you would like to show someone, you can set up the scenario at your own terminal, disconnect, walk down the hall, and reconnect on another terminal ๐ถโโ๏ธ
- if you are in the middle of a great game (or whatever) that does not allow you to save, and someone else kicks you off the terminal, you can disconnect, and reconnect later ๐ฎ
periodt. that's the pitch.
๐ซถ USAGE ๐ซถ
when you run it with no arguments, Dislocate tells you about your disconnected processes and lets you reconnect to one ๐
otherwise, Dislocate runs the named program along with any arguments.
by default, ^] is an escape that lets you talk to Dislocate itself ๐ฌ at that point, you can disconnect (by pressing ^D) or suspend Dislocate (by pressing ^Z).
any Tcl or Expect command is also acceptable at this point ๐ for example, to insert the contents of the file /etc/motd as if you had typed it, say:
send -i $out [exec cat /etc/motd]
to send the numbers 1 to 100 in response to the prompt "next #", say:
for {set i 0} {$i<100} {incr i} {
expect -i $in "next #"
send -i $out "$i\r"
}
scripts can also be prepared and sourced in so that you don't have to type them on the spot ๐ iconic behaviour honestly.
Dislocate is actually just a simple Expect script ๐ง feel free to make it do what you want it to do, or just use Expect directly, without going through Dislocate. Dislocate understands a few special arguments ๐ these should appear before any program name. each should be separated by whitespace. if the arguments themselves take arguments, these should also be separated by whitespace.
the -escape flag sets the escape to whatever follows ๐ the default escape is ^].
ok so pro tip from me to you: that -escape thing goes before the program name, got it? slay.
๐ CAVEATS ๐
this program was written by the author as an exercise to show that communicating with disconnected processes is easy โจ there are many features that could be added, but that is not the intent of this program. so like, don't come for it for being minimal โ it's minimal on purpose, bestie ๐
๐ SEE ALSO ๐
Tcl(3),libexpect(3)- "Exploring Expect: A Tcl-Based Toolkit for Automating Interactive Programs" by Don Libes, O'Reilly and Associates, January 1995. ๐
๐ AUTHOR ๐
Don Libes, National Institute of Standards and Technology ๐ซถ
and that's the whole page, fr fr ๐ this was the General Commands Manual, dated 7 October 1993, and it's lowkey a legend. go disconnect something and reconnect to it later like the icon you are. bye bestie! ๐โจ
๐ฆ where this page comes from
- debian bookworm: expect 5.45.4-2+b1
- debian trixie: expect 5.45.4-4
- ubuntu jammy: expect 5.45.4-2build1
- ubuntu noble: expect 5.45.4-3
- ubuntu questing: expect 5.45.4-4
- ubuntu resolute: expect 5.45.4-4build1
- ubuntu stonking: expect 5.45.4-8
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms