def check_term(ip, user, via)
if CONFIG['terminal'] == "xfce4-terminal" || CONFIG['terminal'] == "gnome-terminal"
if CONFIG['tabbed'] == 'true'
command = "--title=#{user}@#{ip} --tab --command="
else
command = "--title=#{user}@#{ip} --command="
end
if via.nil? or via.empty?
%x(#{CONFIG['terminal']} #{command}"ssh #{user}@#{ip}")
else
%x(#{CONFIG['terminal']} #{command}"ssh -A -t #{via} ssh -A -t #{user}@#{ip}")
end
elsif CONFIG['terminal'] == "xterm" || CONFIG['terminal'] == "urxvt"
%x(#{CONFIG['terminal']} -e "ssh #{user}@#{ip}")
else
puts "We dont support #{CONFIG['terminal']} right now"
puts 'Check Github for further development or contributing'
end
end