iiordanov / remote-desktop-clients

VNC, RDP, SPICE, and oVirt/RHEV/Proxmox Clients for Android and Blackberry 10
GNU General Public License v3.0
2.1k stars 566 forks source link

question: what's the intended url to connect by nickname? #363

Closed t184256 closed 2 years ago

t184256 commented 2 years ago

I'm trying to automate an RDP connection that requires ENABLEGFX => no support for it in url schema. It looks like I'm supposed to be able to load a connection by nickname, and it's OK for me to pre-create one manually with a stable nickname, but I can't figure out the right uri to trigger it. rdp://?SaveConnection=False\&ConnectionName=nickname fails to connect:

D RemoteCanvasActivity: Initializing classic connection from Intent.
D ConnectionBean: Creating connection from URI
I ConnectionBean: Loding connection info from nickname: nickname
I ConnectionBean: Parsing VNC URI.
I ConnectionBean: URI missing remote address.
I RemoteCanvasActivity: Exiting - Insufficent information to connect and connection was not saved.
iiordanov commented 2 years ago

Hey, looks like you have to know and provide the remote address and port too, not just the ConnectionName.

Does something like:

rdp://1.2.3.4:3389?SaveConnection=False\&ConnectionName=nickname

work?

iiordanov commented 2 years ago

Please let me know if this issue needs to be reopened and looked at more.

t184256 commented 2 years ago

No, it asks for credentials, despite the saved connection in question authing fine when launched manually:

D ConnectionBean: Creating connection from URI
I ConnectionBean: Loding connection info from nickname: nickname
I ConnectionBean: Parsing VNC URI.
I RemoteCanvas: initializeRdpConnection: Initializing RDP connection.
I RdpCommunicator: Initializing sessionMap in GlobalApp
D RemoteKeyboard: debugLog: false
I RemoteCanvas: startRdpConnection: Starting RDP connection.
D RemoteCanvasActivity: continueConnecting
D RemoteCanvasActivity: OnCreate complete
I RemoteCanvasActivity: onResume called.
...
D RdpCommunicator: OnAuthenticate called.
...
E com.freerdp.core.capabilities: [pid=22423:tid=bd55acc0] - expected PDU_TYPE_DEMAND_ACTIVE 0001, got 0006
E com.freerdp.core.transport: [pid=22423:tid=bd55acc0] - transport_check_fds: transport->ReceiveCallback() - -1
E com.freerdp.core: [pid=22423:tid=bd55acc0] - rdp_client_connect:freerdp_set_last_error_ex ERRCONNECT_CONNECT_TRANSPORT_FAILED [0x0002000D]
E com.freerdp.core: [pid=22423:tid=bd55acc0] - freerdp_post_connect failed
V RdpCommunicator: OnDisconnecting, reattemptWithoutCredentials: false, authenticationAttempted: true, disconnectRequested: false, isInNormalProtocol: false
V RdpCommunicator: Sending message: RDP_AUTH_FAILED

I also can't replicate starting by shortcut, despite sending an intent that looks 100% the same to what's in the logs.

            connection = ConnectionBean.createLoadFromUri(data, this);

            String host = data.getHost();
            if (!host.startsWith(Utils.getConnectionString(this))) {
                connection.parseFromUri(data);
            }

Why even go into parseFromUri and override what's already loaded correctly?