Method: Pssh::Pty#send_display_message

Defined in:
lib/pssh/pty.rb

#send_display_message(user) ⇒ Object

Public: Sends a message to the tmux or screen display notifying of a new user that has connected.

Returns nothing.



129
130
131
132
133
134
135
136
137
138
# File 'lib/pssh/pty.rb', line 129

def send_display_message(user)
  if @existing_socket
    case Pssh.command.to_sym
    when :tmux
      `tmux -S #{@path} display-message "#{user} has connected"`
    when :screen
      `screen -S #{@path} -X wall "#{user} has connected"`
    end
  end
end