forked from cirosantilli/linux-cheat
-
Notifications
You must be signed in to change notification settings - Fork 0
/
chat.sh
66 lines (42 loc) · 955 Bytes
/
chat.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# TODO convert to md.
# Chat utilities, specially command line ones.
# Write messages to other users on the system.
## mseg
# Enable/disable messages:
mseg n
mseg
#n
mseg y
mseg
#y
## write
# Write to a user in a TTY:
u=
write $u tty3
# Now:
# - type you message
# - type enter, and it is sent
# - hit Ctrl + D and its over
u=
h=
sudo write $h@$u tty2
## wall
# Write to all:
wall
# Type you message. It is only sent after you ctrl+d
# Sends to all even if disabled:
sudo wall
# Play with it:
#go to tty3. on ubuntu: ctrl+alt+f3
#login as user u
mesg y
#go to tty7 (xserver). on ubuntu: ctrl+alt+f7
sudo write u tty3
#write
#go to tty3
#your message is there!
# SSH sessions also see those messages.
## talk
# Commandline chat program.
# POSIX, but not intall on Ubuntu by default:
#sudo aptitude install -y talk