Commit 0384f9d4 authored by Devid Antonio Floni's avatar Devid Antonio Floni

snap: Use SNAP_USER_COMMON/.ssh as ssh files path

parent 304a8944
......@@ -160,6 +160,10 @@ if(SNAP_BUILD_ONLY)
return()
endif()
if(SNAP_BUILD)
add_definitions(-DSNAP_BUILD)
endif()
# Uninstall support
configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in"
......
......@@ -345,7 +345,11 @@ static void remmina_file_editor_create_ssh_privatekey(RemminaFileEditor* gfe, Gt
NULL);
widget = gtk_file_chooser_button_new_with_dialog (dialog);
#ifdef SNAP_BUILD
s = g_strdup_printf("%s/.ssh", g_getenv ("SNAP_USER_COMMON"));
#else
s = g_strdup_printf("%s/.ssh", g_get_home_dir ());
#endif
if (g_file_test (s, G_FILE_TEST_IS_DIR))
{
gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (widget), s);
......
......@@ -430,6 +430,9 @@ remmina_ssh_init_session (RemminaSSH *ssh)
ssh_options_set (ssh->session, SSH_OPTIONS_HOST, ssh->server);
ssh_options_set (ssh->session, SSH_OPTIONS_PORT, &ssh->port);
ssh_options_set (ssh->session, SSH_OPTIONS_USER, ssh->user);
#ifdef SNAP_BUILD
ssh_options_set (ssh->session, SSH_OPTIONS_SSH_DIR, g_strdup_printf ("%s/.ssh", g_getenv ("SNAP_USER_COMMON")));
#endif
ssh_callbacks_init(ssh->callback);
if (remmina_log_running ())
......
......@@ -108,6 +108,7 @@ parts:
configflags:
- -DCMAKE_BUILD_TYPE=@CMAKE_BUILD_TYPE@
- -DCMAKE_PREFIX_PATH=$SNAPCRAFT_STAGE/usr
- -DSNAP_BUILD=on
# XXX: This is an hack to have a kind of bind-mount with absolute prefix.
- -DCMAKE_INSTALL_PREFIX=/snap/$SNAPCRAFT_PROJECT_NAME/current/usr
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment