Re: Mounting SMB with hooks



On 2020-02-07 at 08:38 +0100, mv bsg de wrote:
Hello, everybody,

I hope I'm in the right place.

Here's my problem. We are using Ubuntu Gnome in operation on several 
clients. For various reasons some of them don't want to and can't do 
without Microsoft office. As a compromise we now use PlayOnLinux and 
Office 2010. This works very well except for the access to SMB shares. 
GVFS creates a directory under

/run/user/uid/gvfs/smb-share:server=192.168.0.1,share=test'

  And here is also our problem with the ":" the directory cannot be 
opened in Office/Wine. I have found out by searching and trying that if 
I put an "ln -s ... ~/network" the access is possible without problems.

But I do not expect the users to create them themselves. I would like to 
know if I can change the name of the share directory by configuration.
As an alternative I could also create a hook in form of a bash script 
that creates the link. Unfortunately I did not find it described in the 
documentation.

Thanks for any help.

Hello


A quick look at the code shows that there is no such configuration
setting.
A change like the (untested) below patch would _probably_ allow to
change that character to something else.

How are those shares mounted? If the clients have a permanent
connection, maybe you can automatically mount the shares and create the
links on user login. 


Kind regards



--- a/common/gmountspec.c
+++ b/common/gmountspec.c
@@ -443,7 +443,7 @@ g_mount_spec_to_string (GMountSpec *spec)
     return g_strdup ("(null)");
 
   str = g_string_new (g_mount_spec_get_type (spec));
-  g_string_append_c (str, ':');
+  g_string_append_c (str, '#');
 
   first = TRUE;
   for (i = 0; i < spec->items->len; i++)
@@ -492,7 +492,7 @@ g_mount_spec_new_from_string (const gchar     *str,
   mount_prefix = NULL;
   items = g_array_new (FALSE, TRUE, sizeof (GMountSpecItem));
 
-  colon = strchr (str, ':');
+  colon = strchr (str, '#');
   if (colon)
     {
       item.key = g_strdup ("type");





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]