Remmina - The GTK+ Remote Desktop Client
v1.4.33
Remmina is a remote desktop client written in GTK+, aiming to be useful for system administrators and travellers, who need to work with lots of remote computers in front of either large monitors or tiny netbooks. Remmina supports multiple network protocols in an integrated and consistent user interface. Currently RDP, VNC, NX, XDMCP and SSH are supported.
|
Go to the source code of this file.
Data Structures | |
struct | _RemminaPluginX2GoData |
struct | _X2GoCustomUserData |
Can be used to pass custom user data between functions and threads. More... | |
struct | _DialogData |
DialogData: More... | |
struct | _ConnectionData |
Stores all necessary information needed for retrieving sessions from a X2Go server. More... | |
struct | onMainThread_cb_data |
Typedefs | |
typedef struct _RemminaPluginX2GoData | RemminaPluginX2GoData |
typedef struct _X2GoCustomUserData | X2GoCustomUserData |
Can be used to pass custom user data between functions and threads. More... | |
typedef enum _str2int_errno | str2int_errno |
Enumerations | |
enum | SESSION_PROPERTIES { SESSION_DISPLAY = 0, SESSION_STATUS, SESSION_SESSION_ID, SESSION_SUSPENDED_SINCE, SESSION_CREATE_DATE, SESSION_AGENT_PID, SESSION_USERNAME, SESSION_HOSTNAME, SESSION_COOKIE, SESSION_GRAPHIC_PORT, SESSION_SND_PORT, SESSION_SSHFS_PORT, SESSION_DIALOG_IS_VISIBLE, SESSION_NUM_PROPERTIES } |
Used for the session chooser dialog (GtkListStore) See the example at: https://docs.gtk.org/gtk3/class.ListStore.html The order is the exact same as the user sees in the dialog. More... | |
enum | _str2int_errno { STR2INT_SUCCESS, STR2INT_OVERFLOW, STR2INT_UNDERFLOW, STR2INT_INCONVERTIBLE, STR2INT_INVALID_DATA } |
enum | SESSION_CHOOSER_RESPONSE_TYPE { SESSION_CHOOSER_RESPONSE_NEW = 0, SESSION_CHOOSER_RESPONSE_CHOOSE, SESSION_CHOOSER_RESPONSE_TERMINATE } |
These define the responses of session-chooser-dialog's buttons. More... | |
Functions | |
str2int_errno | str2int (gint *out, gchar *s, gint base) |
Convert string s to int out. More... | |
static gboolean | rmplugin_x2go_open_dialog (X2GoCustomUserData *custom_data) |
static GtkWidget * | rmplugin_x2go_find_child (GtkWidget *parent, const gchar *name) |
Finds a child GtkWidget of a parent GtkWidget. More... | |
static gboolean | rmplugin_x2go_session_chooser_row_activated (GtkTreeView *treeview, GtkTreePath *path, GtkTreeViewColumn *column, X2GoCustomUserData *custom_data) |
Gets executed on "row-activated" signal. More... | |
static gchar * | rmplugin_x2go_session_property_to_string (guint session_property) |
Translates a session property (described by SESSION_PROPERTIES enum) to a string containing it's display name. More... | |
static GtkWidget * | rmplugin_x2go_choose_session_dialog_factory (X2GoCustomUserData *custom_data, GList *sessions_list) |
Builds a dialog which contains all found X2Go-Sessions of the remote server. More... | |
static GtkTreeModelFilter * | rmplugin_x2go_session_chooser_get_filter_model (GtkWidget *dialog, GtkTreeView *treeview) |
Uses either 'dialog' or 'treeview' to return the GtkTreeModel of the Session-Chooser-Dialog. More... | |
static GtkTreePath * | rmplugin_x2go_session_chooser_get_selected_row (GtkWidget *dialog) |
Gets the selected row of the Session-Chooser-Dialog. More... | |
static GValue | rmplugin_x2go_session_chooser_get_property (GtkWidget *dialog, gint property_index, GtkTreePath *row) |
Finds the GtkTreeView inside of the session chooser dialog, determines the selected row and extracts a property. More... | |
static gchar * | rmplugin_x2go_spawn_pyhoca_process (guint argc, gchar *argv[], GError **error, gchar **env) |
This function dumps all properties of a session to the console. More... | |
static gboolean | rmplugin_x2go_session_chooser_set_row_visible (GtkTreePath *path, gboolean value, GtkDialog *dialog) |
Either sets a specific row visible or invisible. More... | |
static gboolean | rmplugin_x2go_verify_connection_data (struct _ConnectionData *connect_data) |
static gboolean | rmplugin_x2go_pyhoca_terminate_session (X2GoCustomUserData *custom_data) |
Terminates a specific X2Go session using pyhoca-cli. More... | |
static gboolean | rmplugin_x2go_session_chooser_callback (X2GoCustomUserData *custom_data, gint response_id, GtkDialog *self) |
Gets executed on dialog's 'response' signal. More... | |
static gboolean | onMainThread_cb (struct onMainThread_cb_data *d) |
static void | onMainThread_cleanup_handler (gpointer data) |
static void | onMainThread_schedule_callback_and_wait (struct onMainThread_cb_data *d) |
static void | onMainThread_gtk_socket_add_id (GtkSocket *sk, Window w) |
static void | rmplugin_x2go_remove_window_id (Window window_id) |
static gboolean | rmplugin_x2go_cleanup (RemminaProtocolWidget *gp) |
static gboolean | rmplugin_x2go_close_connection (RemminaProtocolWidget *gp) |
static void | rmplugin_x2go_pyhoca_cli_exited (GPid pid, gint status, RemminaProtocolWidget *gp) |
static gboolean | rmplugin_x2go_save_credentials (RemminaFile *remminafile, gchar *s_username, gchar *s_password, gchar *errmsg) |
Saves s_password and s_username if set. More... | |
static gboolean | rmplugin_x2go_get_ssh_passphrase (RemminaProtocolWidget *gp, gchar *errmsg, gchar **passphrase) |
Asks the user for a username and password. More... | |
static gboolean | rmplugin_x2go_get_auth (RemminaProtocolWidget *gp, gchar *errmsg, gchar **default_username, gchar **default_password) |
Asks the user for a username and password. More... | |
static gchar * | rmplugin_x2go_get_pyhoca_sessions (RemminaProtocolWidget *gp, GError **error, struct _ConnectionData *connect_data) |
Executes 'pyhoca-cli –list-sessions' for username. More... | |
static GList * | rmplugin_x2go_parse_pyhoca_sessions (RemminaProtocolWidget *gp, GError **error, struct _ConnectionData *connect_data) |
This function is used to parse the output of rmplugin_x2go_get_pyhoca_sessions(). More... | |
static gchar * | rmplugin_x2go_ask_session (RemminaProtocolWidget *gp, GError **error, struct _ConnectionData *connect_data) |
Asks the user, with the help of a dialog, to continue an already existing session, terminate or create a new one. More... | |
static gboolean | rmplugin_x2go_exec_x2go (gchar *host, gint sshport, gchar *username, gchar *password, gchar *command, gchar *kbdlayout, gchar *kbdtype, gchar *audio, gchar *clipboard, gint dpi, gchar *resolution, gchar *ssh_privatekey, RemminaProtocolWidget *gp, gchar *errmsg) |
static GList * | rmplugin_x2go_old_pyhoca_features () |
static GList * | rmplugin_x2go_populate_available_features_list () |
static void | rmplugin_x2go_on_plug_added (GtkSocket *socket, RemminaProtocolWidget *gp) |
static gboolean | rmplugin_x2go_on_plug_removed (GtkSocket *socket, RemminaProtocolWidget *gp) |
static void | rmplugin_x2go_init (RemminaProtocolWidget *gp) |
static gboolean | rmplugin_x2go_try_window_id (Window window_id) |
static int | rmplugin_x2go_dummy_handler (Display *dsp, XErrorEvent *err) |
static gboolean | rmplugin_x2go_start_create_notify (RemminaProtocolWidget *gp, gchar *errmsg) |
static gboolean | rmplugin_x2go_monitor_create_notify (RemminaProtocolWidget *gp, const gchar *cmd, gchar *errmsg) |
static gboolean | rmplugin_x2go_start_session (RemminaProtocolWidget *gp) |
static gboolean | rmplugin_x2go_main (RemminaProtocolWidget *gp) |
static gpointer | rmplugin_x2go_main_thread (RemminaProtocolWidget *gp) |
static gboolean | rmplugin_x2go_open_connection (RemminaProtocolWidget *gp) |
static gboolean | rmplugin_x2go_query_feature (RemminaProtocolWidget *gp, const RemminaProtocolFeature *feature) |
static gchar * | rmplugin_x2go_enumeration_prettifier (const guint max_elements, const guint current_element, gchar *element_to_add, gchar *string) |
This function builds a string like: "'value1', 'value2' and 'value3'" To be used in a loop. More... | |
static GError * | rmplugin_x2go_string_setting_validator (gchar *key, gchar *value, gchar *data) |
Validator-functions are getting executed when the user wants to save profile settings. More... | |
static GError * | rmplugin_x2go_int_setting_validator (gchar *key, gpointer value, gchar *data) |
Validator-functions are getting executed when the user wants to save profile settings. More... | |
G_MODULE_EXPORT gboolean | remmina_plugin_entry (RemminaPluginService *service) |
Variables | |
static RemminaPluginService * | rm_plugin_service = NULL |
static RemminaProtocolPlugin | rmplugin_x2go |
static pthread_mutex_t | remmina_x2go_init_mutex |
static GArray * | remmina_x2go_window_id_array |
static const RemminaProtocolFeature | rmplugin_x2go_features [] |
static const RemminaProtocolSetting | rmplugin_x2go_basic_settings [] |
typedef struct _RemminaPluginX2GoData RemminaPluginX2GoData |
typedef enum _str2int_errno str2int_errno |
typedef struct _X2GoCustomUserData X2GoCustomUserData |
Can be used to pass custom user data between functions and threads.
AND pass the useful RemminaProtocolWidget with it along.
enum _str2int_errno |
Enumerator | |
---|---|
STR2INT_SUCCESS | |
STR2INT_OVERFLOW | |
STR2INT_UNDERFLOW | |
STR2INT_INCONVERTIBLE | |
STR2INT_INVALID_DATA |
Definition at line 193 of file x2go_plugin.c.
These define the responses of session-chooser-dialog's buttons.
Enumerator | |
---|---|
SESSION_CHOOSER_RESPONSE_NEW | |
SESSION_CHOOSER_RESPONSE_CHOOSE | |
SESSION_CHOOSER_RESPONSE_TERMINATE |
Definition at line 367 of file x2go_plugin.c.
enum SESSION_PROPERTIES |
Used for the session chooser dialog (GtkListStore) See the example at: https://docs.gtk.org/gtk3/class.ListStore.html The order is the exact same as the user sees in the dialog.
SESSION_NUM_PROPERTIES is used to keep count of the properties and it must be the last object.
Definition at line 174 of file x2go_plugin.c.
|
static |
Definition at line 1486 of file x2go_plugin.c.
|
static |
Definition at line 1504 of file x2go_plugin.c.
|
static |
Definition at line 1527 of file x2go_plugin.c.
|
static |
Definition at line 1511 of file x2go_plugin.c.
G_MODULE_EXPORT gboolean remmina_plugin_entry | ( | RemminaPluginService * | service | ) |
Definition at line 3445 of file x2go_plugin.c.
|
static |
Asks the user, with the help of a dialog, to continue an already existing session, terminate or create a new one.
error | Is set if there is something to tell the user. Not necessarily an error message. |
connect_data | Stores all necessary information needed for etrieving sessions from a X2Go server. |
Definition at line 2198 of file x2go_plugin.c.
|
static |
Builds a dialog which contains all found X2Go-Sessions of the remote server.
The dialog gives the user the option to choose between resuming or terminating an existing session or to create a new one.
custom_data | X2GoCustomUserData structure with the following: gp -> gp (RemminaProtocolWidget*) dialog_data -> dialog data (struct _DialogData*) connect_data -> connection data (struct _ConnectionData*) |
sessions_list | The GList* Should contain all found X2Go-Sessions. Sessions are string arrays of properties. The type of the GList is gchar**. |
Definition at line 509 of file x2go_plugin.c.
|
static |
Definition at line 1572 of file x2go_plugin.c.
|
static |
Definition at line 1621 of file x2go_plugin.c.
|
static |
Definition at line 2828 of file x2go_plugin.c.
|
static |
This function builds a string like: "'value1', 'value2' and 'value3'"
To be used in a loop.
See rmplugin_x2go_string_setting_validator() for an example.
max_elements | Number of maximum elements. |
element_to_add | Next element to add to the string |
current_element | Which element is element_to_add? |
string | The string to which element_to_add will be added. |
Definition at line 3139 of file x2go_plugin.c.
|
static |
Definition at line 2291 of file x2go_plugin.c.
|
static |
Finds a child GtkWidget of a parent GtkWidget.
Copied from https://stackoverflow.com/a/23497087 ;)
parent | Parent GtkWidget* |
name | Name string of child. (Must be set before, er else it will be a default string) |
Definition at line 382 of file x2go_plugin.c.
|
static |
Asks the user for a username and password.
errmsg | Pointer to error message string (set if function failed). |
username | Pointer to default username. Gets set to new username on success. |
password | Pointer to default password. Gets set to new password on success. |
Definition at line 1786 of file x2go_plugin.c.
|
static |
Executes 'pyhoca-cli –list-sessions' for username.
gp | RemminaProtocolWidget* is used to get the x2go-plugin data. |
error | This is where a error message will be when NULL gets returned. |
connect_data | struct _ConnectionData* which stores all necessary information needed for retrieving sessions from a X2Go server. |
Definition at line 1878 of file x2go_plugin.c.
|
static |
Asks the user for a username and password.
errmsg | Pointer to error message string (set if function failed). |
passphrase | gchar** Passphrase which will be used to unlock SSH key. |
Definition at line 1744 of file x2go_plugin.c.
|
static |
Definition at line 2761 of file x2go_plugin.c.
|
static |
Validator-functions are getting executed when the user wants to save profile settings.
It uses the given data (See RemminaProtocolSetting array) to determine if the given value is a valid integer is in range and returns a end-user friendly error message.
key | Key is the setting's name. |
value | Value to validate. |
data | Data needed for validation process. See RemminaProtocolSetting array. |
Definition at line 3266 of file x2go_plugin.c.
|
static |
Definition at line 3059 of file x2go_plugin.c.
|
static |
Definition at line 3071 of file x2go_plugin.c.
|
static |
Definition at line 2856 of file x2go_plugin.c.
|
static |
Definition at line 2639 of file x2go_plugin.c.
|
static |
Definition at line 2730 of file x2go_plugin.c.
|
static |
Definition at line 2753 of file x2go_plugin.c.
|
static |
Definition at line 3092 of file x2go_plugin.c.
|
static |
custom_data | X2GoCustomUserData structure with the following: gp -> gp (RemminaProtocolWidget*) dialog_data -> dialog data (struct _DialogData*) |
Definition at line 290 of file x2go_plugin.c.
|
static |
This function is used to parse the output of rmplugin_x2go_get_pyhoca_sessions().
gp | RemminaProtocolWidget* is used to get the x2go-plugin data. |
error | This is where a error message will be when NULL gets returned. |
connect_data | struct _ConnectionData* which stores all necessary information needed for retrieving sessions from a X2Go server. |
TODO: If pyhoca-cli (python-x2go) implements --json
or similar option -> Replace entire function with JSON parsing.
Definition at line 2026 of file x2go_plugin.c.
|
static |
Definition at line 2667 of file x2go_plugin.c.
|
static |
Definition at line 1639 of file x2go_plugin.c.
|
static |
Terminates a specific X2Go session using pyhoca-cli.
custom_data | X2GoCustomUserData structure with the following: gp -> gp (RemminaProtocolWidget*) dialog_data -> dialog data (struct _DialogData*) connect_data -> connection data (struct _ConnectionData*) opt1 -> selected row (GtkTreePath*) opt2 -> session-selection-dialog (GtkDialog*) |
Definition at line 1145 of file x2go_plugin.c.
|
static |
Definition at line 3116 of file x2go_plugin.c.
|
static |
Definition at line 1543 of file x2go_plugin.c.
|
static |
Saves s_password and s_username if set.
errmsg
is set. Definition at line 1700 of file x2go_plugin.c.
|
static |
Gets executed on dialog's 'response' signal.
custom_data | X2GoCustomUserData*: gp -> gp (RemminaProtocolWidget*) dialog_data -> dialog data (struct _DialogData*) connect_data -> connection data (struct _ConnectionData*) |
response_id | See GTK 'response' signal. |
self | The dialog itself. |
Definition at line 1339 of file x2go_plugin.c.
|
static |
Uses either 'dialog' or 'treeview' to return the GtkTreeModel of the Session-Chooser-Dialog.
Directly giving 'treeview' as a parameter is faster. Only one parameter has to be given. The other one can be NULL. Error messages are all handled already.
dialog | The Session-Chooser-Dialog itself. (Slower) Can be NULL. |
treeview | The GtkTreeView of the Session-Chooser-Dialog. (faster) Can be NULL. |
Definition at line 702 of file x2go_plugin.c.
|
static |
Finds the GtkTreeView inside of the session chooser dialog, determines the selected row and extracts a property.
dialog | GtkWidget* the dialog itself. |
property_index | Index of property. |
row | A specific row to get the property of. (Can be NULL) |
Definition at line 817 of file x2go_plugin.c.
|
static |
Gets the selected row of the Session-Chooser-Dialog.
The path gets converted with gtk_tree_model_filter_convert_child_path_to_path() before it gets returned. So path describes a row of 'filter' and not its child GtkTreeModel.
dialog | The Session-Chooser-Dialog. |
Definition at line 753 of file x2go_plugin.c.
|
static |
Gets executed on "row-activated" signal.
It is emitted when the method when the user double clicks a treeview row. It is also emitted when a non-editable row is selected and one of the keys: Space, Shift+Space, Return or Enter is pressed.
custom_data | X2GoCustomUserData structure with the following: gp -> gp (RemminaProtocolWidget*) opt1 -> dialog widget (GtkWidget*) |
Definition at line 419 of file x2go_plugin.c.
|
static |
Either sets a specific row visible or invisible.
Also handles 'terminate' and 'resume' buttons of session-chooser-dialog. If there are no sessions available anymore, disable all buttons which are not 'new' and if a session is available again, enable them.
path | Describes which row. (GtkTreePath*) Should be from GtkTreeModelFilter's perspective! |
value | TRUE = row is visible & FALSE = row is invisible (gboolean) |
dialog | Session-Chooser-Dialog (GtkDialog*) |
Definition at line 1036 of file x2go_plugin.c.
|
static |
Translates a session property (described by SESSION_PROPERTIES enum) to a string containing it's display name.
session_property | A session property. (as described by SESSION_PROPERTIES enum) |
Definition at line 471 of file x2go_plugin.c.
|
static |
This function dumps all properties of a session to the console.
It can/should be used with:
gtk_tree_model_foreach(GTK_TREE_MODEL(model), (GtkTreeModelForeachFunc)
rmplugin_x2go_dump_session_properties,
dialog); This function synchronously spawns a pyhoca-cli process with argv as arguments.
argc | Number of arguments. |
argv | Arguments as string array. Last elements has to be NULL. Strings will get freed automatically. |
error | Will be filled with an error message on fail. |
env | String array of enviroment variables. The list is NULL terminated and each item in the list is of the form NAME=VALUE . |
Definition at line 898 of file x2go_plugin.c.
|
static |
Definition at line 2834 of file x2go_plugin.c.
|
static |
Definition at line 2966 of file x2go_plugin.c.
|
static |
Validator-functions are getting executed when the user wants to save profile settings.
It uses the given data (See RemminaProtocolSetting array) to determine which strings are allowed and returns a end-user friendly error message.
key | Key is the setting's name. |
value | Value to validate. |
data | Data needed for validation process. See RemminaProtocolSetting array. |
Definition at line 3193 of file x2go_plugin.c.
|
static |
Definition at line 2800 of file x2go_plugin.c.
|
static |
Definition at line 1102 of file x2go_plugin.c.
str2int_errno str2int | ( | gint * | out, |
gchar * | s, | ||
gint | base | ||
) |
Convert string s to int out.
out | The converted int. Cannot be NULL. |
s | Input string to be converted. The format is the same as strtol, except that the following are inconvertible:
|
base | Base to interpret string in. Same range as strtol (2 to 36). |
Definition at line 217 of file x2go_plugin.c.
|
static |
Definition at line 1469 of file x2go_plugin.c.
|
static |
Definition at line 1470 of file x2go_plugin.c.
|
static |
Definition at line 136 of file x2go_plugin.c.
|
static |
Definition at line 1464 of file x2go_plugin.c.
|
static |
Definition at line 3394 of file x2go_plugin.c.
|
static |
Definition at line 3123 of file x2go_plugin.c.