0

在 C# 中为 rdp 开发时,我们基本上使用 MSTSCLib;但是连接linux这个dll不支持。那么,在 c# 应用程序中,从 windows 到 linux 的 rdp 必须使用什么 dll。

命名空间 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);
        }
    }
}

}

基于这个程序如何通过远程桌面为windows编写linux到linux

4

2 回答 2

0

RDP 是 Windows 原生的。如果您希望 Linux 充当 RDP 服务器,请查看http://sourceforge.net/projects/xrdp/上的 XRDP

对于 Linux,您可以使用 SSH(Putty 支持)。另一种选择是启用大多数 Linux 发行版都支持的 VNC 服务器。

于 2013-09-25T09:30:22.823 回答
0

看看Putty,你不能从 Windows 将 RDP 导入到 linux 机器上,你可以使用称为 SSH 的协议,它没有 GUI,一切都是基于文本的。

于 2013-09-25T05:43:01.400 回答