[英]remote desktop connection from windows to linux using c#.net
while develop in c# for rdp we use basically using MSTSCLib; 在rdp的c#开发中,我们基本上使用MSTSCLib; but connecting linux this dll not supporting.
但是连接Linux这个DLL不支持。 So, what dll have to use for rdp from windows to linux in c# application.
因此,从Windows到C#应用程序中的linux,哪些dll必须用于rdp。
namespace SampleRDC { public partial class Form1 : Form { public Form1() { InitializeComponent(); 命名空间SampleRDC {公共局部类Form1:Form {公共Form1(){InitializeComponent(); }
}
private void button1_Click(object sender, EventArgs e)
{
try
{
rdp.Server = txtServer.Text;
rdp.UserName = txtUserName.Text;
IMsTscNonScriptable secured = (IMsTscNonScriptable)rdp.GetOcx();
secured.ClearTextPassword = txtPassword.Text;
rdp.Connect();
}
catch (Exception Ex)
{
MessageBox.Show("Error Connecting", "Error connecting to remote desktop " + txtServer.Text + " Error: " + Ex.Message,MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
private void button2_Click(object sender, EventArgs e)
{
try
{
// Check if connected before disconnecting
if (rdp.Connected.ToString() == "1")
rdp.Disconnect();
}
catch (Exception Ex)
{
MessageBox.Show("Error Disconnecting", "Error disconnecting from remote desktop " + txtServer.Text + " Error: " + Ex.Message, MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
}
} }
based on this program how to write for windows to linux through remote desktop 基于此程序,如何通过远程桌面将Windows写入linux
看一下Putty ,您不能从Windows将RDP放入Linux机器,而可以使用称为SSH的协议,它没有GUI,并且所有内容都是基于文本的。
RDP is native to Windows. RDP是Windows固有的。 If you want Linux to act as RDP server, check out XRDP at http://sourceforge.net/projects/xrdp/
如果您希望Linux充当RDP服务器,请访问http://sourceforge.net/projects/xrdp/查看XRDP。
For Linux, you can SSH (which Putty supports). 对于Linux,您可以使用SSH(Putty支持)。 Another option is to enable VNC server, which most Linux distros support.
另一个选择是启用大多数Linux发行版支持的VNC服务器。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.