[X2Go-Dev] Getting suspended session profile info through X2GoClient API
Tomáš Cerha
cerha at brailcom.org
Fri May 18 11:12:33 CEST 2018
Dear list,
I am using the X2Go Python API to develop a custom UI for running our applications from (mainly) Windows client machines.
When starting an application based on a session profile obtained from the X2Go broker, I am checking for the suspended sessions on the server by calling X2GoClient.list_sessions().
X2GoClient.list_sessions() returns the list of all sessions on the server, including also sessions of other profiles. I need to filter them out to include only the sessions of the same profile, which is currently starting.
The X2GoSessionInfo instances, however, don’t include the information I need. I need the profile name, profile id or at least the command. The command is included in the session name, but I don’t feel that parsing the session name is the right way to go.
Thus I tried to obtain more information about the session using X2GoClient.get_session_of_session_name(), but it returns None for all session names returned by X2GoClient.list_sessions().
I also tried to pass profile_name or profile_id to X2GoClient.list_sessions() but it is probably not meant to filter the sessions as I am still receiving the complete list of sessions including also sessions of other profiles.
So is there a way to find out the profile name, profile id or command of a suspended session returned by X2GoClient.list_sessions()?
Thank you for any advice.
Best regards
Tomas Cerha
More information about the x2go-dev
mailing list