Remmina - The GTK+ Remote Desktop Client  v1.4.2
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.
remmina_pref.h
Go to the documentation of this file.
1 /*
2  * Remmina - The GTK+ Remote Desktop Client
3  * Copyright (C) 2009-2011 Vic Lee
4  * Copyright (C) 2014-2015 Antenore Gatta, Fabio Castelli, Giovanni Panozzo
5  * Copyright (C) 2016-2020 Antenore Gatta, Giovanni Panozzo
6  *
7  * This program is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 2 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin Street, Fifth Floor,
20  * Boston, MA 02110-1301, USA.
21  *
22  * In addition, as a special exception, the copyright holders give
23  * permission to link the code of portions of this program with the
24  * OpenSSL library under certain conditions as described in each
25  * individual source file, and distribute linked combinations
26  * including the two.
27  * You must obey the GNU General Public License in all respects
28  * for all of the code used other than OpenSSL. * If you modify
29  * file(s) with this exception, you may extend this exception to your
30  * version of the file(s), but you are not obligated to do so. * If you
31  * do not wish to do so, delete this exception statement from your
32  * version. * If you delete this exception statement from all source
33  * files in the program, then also delete it here.
34  *
35  */
36 
37 #pragma once
38 
39 /*
40  * Remmina Preference Loader
41  */
42 
43 G_BEGIN_DECLS
44 
45 enum {
48 };
49 
50 enum {
53 };
54 
55 enum {
61 };
62 
63 enum {
66 };
67 
68 enum {
73 };
74 
75 enum {
80 };
81 
82 enum {
84  FLOATING_TOOLBAR_VISIBILITY_INVISIBLE = 1, //"Invisible" corresponds to the "Hidden" option in the drop-down
86 };
87 
88 typedef struct _RemminaColorPref {
89  /* Color palette for VTE terminal */
90  gchar * background;
91  gchar * cursor;
92  gchar * foreground;
93  gchar * color0;
94  gchar * color1;
95  gchar * color2;
96  gchar * color3;
97  gchar * color4;
98  gchar * color5;
99  gchar * color6;
100  gchar * color7;
101  gchar * color8;
102  gchar * color9;
103  gchar * color10;
104  gchar * color11;
105  gchar * color12;
106  gchar * color13;
107  gchar * color14;
108  gchar * color15;
110 
111 typedef struct _RemminaPref {
112  /* In RemminaPrefDialog options tab */
113  const gchar * datadir_path;
114  const gchar * remmina_file_name;
115  const gchar * screenshot_path;
117  const gchar * screenshot_name;
118  gboolean save_view_mode;
120  const gchar * unlock_password;
121  const gchar * unlock_repassword;
127  gchar * resolutions;
128  gchar * keystrokes;
129  /* In RemminaPrefDialog appearance tab */
131  gboolean always_show_tab;
133  gboolean hide_searchbar;
135  gint tab_mode;
137  /* In RemminaPrefDialog applet tab */
141  gboolean dark_tray_icon;
142  /* In RemminaPrefDialog SSH Option tab */
144  gboolean ssh_parseconfig;
150  /* In RemminaPrefDialog keyboard tab */
151  guint hostkey;
164  /* In RemminaPrefDialog terminal tab */
165  gchar * vte_font;
168  gint vte_lines;
172  /* In View menu */
173  gboolean hide_toolbar;
176  /* In tray icon */
178  /* Auto */
181  gboolean main_maximize;
184  gchar * expanded_group;
190 
191  /* Crypto */
192  gchar * secret;
193 
194  /* UID */
195  gchar * uid;
196 
198 
199  /* Usage stats */
203  gchar * last_success;
204 
205  /* Remmina news */
209 } RemminaPref;
210 
211 #define DEFAULT_SSH_PARSECONFIG TRUE
212 #define DEFAULT_SSHTUNNEL_PORT 4732
213 #define DEFAULT_SSH_PORT 22
214 #define DEFAULT_SSH_LOGLEVEL 1
215 #define SSH_SOCKET_TCP_KEEPIDLE 20
216 #define SSH_SOCKET_TCP_KEEPINTVL 10
217 #define SSH_SOCKET_TCP_KEEPCNT 3
218 #define SSH_SOCKET_TCP_USER_TIMEOUT 60000 // 60 seconds
219 
220 extern const gchar *default_resolutions;
221 extern gchar *remmina_pref_file;
222 extern gchar *remmina_colors_file;
224 
225 void remmina_pref_init(void);
226 gboolean remmina_pref_is_rw(void);
227 gboolean remmina_pref_save(void);
228 
229 void remmina_pref_add_recent(const gchar *protocol, const gchar *server);
230 gchar *remmina_pref_get_recent(const gchar *protocol);
231 void remmina_pref_clear_recent(void);
232 
233 guint remmina_pref_keymap_get_keyval(const gchar *keymap, guint keyval);
234 gchar **remmina_pref_keymap_groups(void);
235 
238 gboolean remmina_pref_get_ssh_parseconfig(void);
240 void remmina_pref_file_load_colors(GKeyFile *gkeyfile, RemminaColorPref *color_pref);
245 
246 void remmina_pref_set_value(const gchar *key, const gchar *value);
247 gchar *remmina_pref_get_value(const gchar *key);
248 gboolean remmina_pref_get_boolean(const gchar *key);
249 
250 G_END_DECLS
guint shortcutkey_fullscreen
Definition: remmina_pref.h:152
gint floating_toolbar_placement
Definition: remmina_pref.h:186
gboolean hide_searchbar
Definition: remmina_pref.h:133
gboolean remmina_pref_get_boolean(const gchar *key)
guint shortcutkey_minimize
Definition: remmina_pref.h:161
gint remmina_pref_get_ssh_tcp_keepcnt(void)
void remmina_pref_clear_recent(void)
Definition: remmina_pref.c:902
const gchar * default_resolutions
Definition: remmina_pref.c:56
gboolean vte_system_colors
Definition: remmina_pref.h:167
void remmina_pref_set_value(const gchar *key, const gchar *value)
gint default_action
Definition: remmina_pref.h:123
gchar * keystrokes
Definition: remmina_pref.h:128
guint shortcutkey_dynres
Definition: remmina_pref.h:156
void remmina_pref_init(void)
Definition: remmina_pref.c:221
guint shortcutkey_screenshot
Definition: remmina_pref.h:160
guint shortcutkey_prevtab
Definition: remmina_pref.h:154
gboolean ssh_parseconfig
Definition: remmina_pref.h:144
gchar * remmina_pref_get_value(const gchar *key)
gint ssh_tcp_keepintvl
Definition: remmina_pref.h:147
gchar * last_quickconnect_protocol
Definition: remmina_pref.h:189
gboolean dark_tray_icon
Definition: remmina_pref.h:141
gint auto_scroll_step
Definition: remmina_pref.h:125
guint vte_shortcutkey_copy
Definition: remmina_pref.h:169
gchar * last_success
Definition: remmina_pref.h:203
guint shortcutkey_autofit
Definition: remmina_pref.h:153
gboolean remmina_pref_is_rw(void)
Definition: remmina_pref.c:697
gchar * secret
Definition: remmina_pref.h:192
guint remmina_pref_keymap_get_keyval(const gchar *keymap, guint keyval)
Definition: remmina_pref.c:931
gboolean use_master_password
Definition: remmina_pref.h:119
gint scale_quality
Definition: remmina_pref.h:124
gboolean deny_screenshot_clipboard
Definition: remmina_pref.h:116
gchar * resolutions
Definition: remmina_pref.h:127
guint vte_shortcutkey_select_all
Definition: remmina_pref.h:171
void remmina_pref_file_load_colors(GKeyFile *gkeyfile, RemminaColorPref *color_pref)
Definition: remmina_pref.c:183
gchar * remmina_pref_file
Definition: rcw.c:72
gint main_sort_order
Definition: remmina_pref.h:183
gboolean vte_allow_bold_text
Definition: remmina_pref.h:166
gboolean disable_tray_icon
Definition: remmina_pref.h:140
gint recent_maximum
Definition: remmina_pref.h:126
struct _RemminaPref RemminaPref
gchar * vte_font
Definition: remmina_pref.h:165
const gchar * screenshot_path
Definition: remmina_pref.h:115
gint remmina_pref_get_scale_quality(void)
Definition: remmina_pref.c:974
gchar ** remmina_pref_keymap_groups(void)
Definition: remmina_pref.c:951
gint unlock_timeout
Definition: remmina_pref.h:122
gchar * periodic_usage_stats_uuid_prefix
Definition: remmina_pref.h:202
gint toolbar_placement
Definition: remmina_pref.h:187
gboolean prevent_snap_welcome_message
Definition: remmina_pref.h:188
gchar * expanded_group
Definition: remmina_pref.h:184
gchar * periodic_rmnews_uuid_prefix
Definition: remmina_pref.h:208
const gchar * unlock_password
Definition: remmina_pref.h:120
guint vte_shortcutkey_paste
Definition: remmina_pref.h:170
guint shortcutkey_disconnect
Definition: remmina_pref.h:162
gint ssh_tcp_usrtimeout
Definition: remmina_pref.h:149
gboolean remmina_pref_save(void)
Definition: remmina_pref.c:707
gboolean small_toolbutton
Definition: remmina_pref.h:174
guint shortcutkey_grab
Definition: remmina_pref.h:158
gboolean always_show_tab
Definition: remmina_pref.h:131
gboolean toolbar_pin_down
Definition: remmina_pref.h:185
gint main_sort_column_id
Definition: remmina_pref.h:182
guint shortcutkey_scale
Definition: remmina_pref.h:157
gboolean main_maximize
Definition: remmina_pref.h:181
const gchar * unlock_repassword
Definition: remmina_pref.h:121
gint remmina_pref_get_ssh_tcp_keepintvl(void)
glong periodic_rmnews_get_count
Definition: remmina_pref.h:207
gboolean periodic_usage_stats_permitted
Definition: remmina_pref.h:200
gint view_file_mode
Definition: remmina_pref.h:175
gboolean remmina_pref_get_ssh_parseconfig(void)
Definition: remmina_pref.c:990
guint shortcutkey_nexttab
Definition: remmina_pref.h:155
gboolean applet_hide_count
Definition: remmina_pref.h:139
gint ssh_tcp_keepidle
Definition: remmina_pref.h:146
gboolean hide_toolbar
Definition: remmina_pref.h:173
gint remmina_pref_get_sshtunnel_port(void)
Definition: remmina_pref.c:996
gboolean applet_enable_avahi
Definition: remmina_pref.h:177
const gchar * remmina_file_name
Definition: remmina_pref.h:114
RemminaPref remmina_pref
Definition: rcw.c:73
guint shortcutkey_toolbar
Definition: remmina_pref.h:163
gint remmina_pref_get_ssh_tcp_usrtimeout(void)
gint remmina_pref_get_ssh_tcp_keepidle(void)
glong periodic_usage_stats_last_sent
Definition: remmina_pref.h:201
gchar * remmina_colors_file
gint ssh_tcp_keepcnt
Definition: remmina_pref.h:148
gboolean applet_new_ontop
Definition: remmina_pref.h:138
const gchar * screenshot_name
Definition: remmina_pref.h:117
gboolean hide_connection_toolbar
Definition: remmina_pref.h:132
gint sshtunnel_port
Definition: remmina_pref.h:145
const gchar * datadir_path
Definition: remmina_pref.h:113
gchar * remmina_pref_get_recent(const gchar *protocol)
Definition: remmina_pref.c:883
void remmina_pref_add_recent(const gchar *protocol, const gchar *server)
Definition: remmina_pref.c:842
RemminaColorPref color_pref
Definition: remmina_pref.h:197
glong periodic_rmnews_last_get
Definition: remmina_pref.h:206
guint shortcutkey_viewonly
Definition: remmina_pref.h:159
struct _RemminaColorPref RemminaColorPref
gboolean fullscreen_on_auto
Definition: remmina_pref.h:130
gboolean save_view_mode
Definition: remmina_pref.h:118
gint fullscreen_toolbar_visibility
Definition: remmina_pref.h:136
gint remmina_pref_get_ssh_loglevel(void)
Definition: remmina_pref.c:984