X2Go Bug report logs - #67
Bug when you mount more 1 folder at login

Package: x2goserver; Maintainer for x2goserver is X2Go Developers <x2go-dev@lists.x2go.org>; Source for x2goserver is src:x2goserver.

Reported by: Pascal Vibet - ADACIS <pvibet@gmail.com>

Date: Fri, 30 Nov 2012 07:03:01 UTC

Severity: normal

Tags: pending

Done: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>

Bug is archived. No further changes may be made.

Full log


Message #5 received at submit@bugs.x2go.org (full text, mbox, reply):

Received: (at submit) by bugs.x2go.org; 30 Nov 2012 06:49:31 +0000
From pvibet@gmail.com  Fri Nov 30 07:49:31 2012
Received: from mail-ie0-f179.google.com (mail-ie0-f179.google.com [209.85.223.179])
	by ymir (Postfix) with ESMTPS id BA57C5DB16
	for <submit@bugs.x2go.org>; Fri, 30 Nov 2012 07:49:30 +0100 (CET)
Received: by mail-ie0-f179.google.com with SMTP id k14so183363iea.24
        for <submit@bugs.x2go.org>; Thu, 29 Nov 2012 22:49:29 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=mime-version:date:message-id:subject:from:to:cc:content-type;
        bh=1I+X3+uH0IYmPp3FUrA+HNF/vyWAt44VrN6/Yyhta/s=;
        b=X9wtqfdWcKueFM7hOv9sUKiR/JTLrPhndDzRio43+1LnH8ohoBesulE5ks+76mMNZq
         fjPcFPjiDTSEF7oAY/rOV4ibTuPN6BPe3j6qCSvMFpt8tinyOjZ0rmw0zif4h9EFlSlR
         AsDJsx7uVUyhQAxX45q3RNIOnkjUNvHwJs8nrP3aCNYoAf1GsIjhf6qf/a2zW7IdhIW8
         X3SnmwPaWhIB5SCkJpu048oHITAP7/MTaStQJv3txvdxgM6+gM7okzc0er6q0kGEjlgj
         wIL04lXOqp9wNCd6HFcY/W+1aN3qKQ80g/nPiBNv5CzHinKUsjxoenlOAXxCBTVY9DN7
         k4Gw==
MIME-Version: 1.0
Received: by 10.42.201.201 with SMTP id fb9mr211283icb.19.1354258168963; Thu,
 29 Nov 2012 22:49:28 -0800 (PST)
Received: by 10.64.0.81 with HTTP; Thu, 29 Nov 2012 22:49:28 -0800 (PST)
Date: Fri, 30 Nov 2012 07:49:28 +0100
Message-ID: <CAPTrY-kyAReZvjPb+5274U6sMPOyaxRWCAH-1NcANtOqH1YMCw@mail.gmail.com>
Subject: Bug when you mount more 1 folder at login
From: Pascal Vibet - ADACIS <pvibet@gmail.com>
To: submit@bugs.x2go.org
Cc: Vibet Pascal <pascalvibet@gmail.com>, 
	"pascal.vibet@i-carre.net" <pascal.vibet@i-carre.net>
Content-Type: multipart/alternative; boundary=20cf3036366b18609e04cfb0cdf5
[Message part 1 (text/plain, inline)]
Package: x2goserver

Version: 3.1.1.3-0~571~precise1_amd64


I want to mount 3 folder at login. Only the first one is mount at
login.

This is log file: cat ~/mounts.log
SSHFS version 2.3
Server version: 3
Extension: posix-rename@openssh.com <1>
Extension: statvfs@openssh.com <2>
Extension: fstatvfs@openssh.com <2>
Extension: hardlink@openssh.com <1>
fuse: bad mount point
`/tmp/.x2go-xxxxxxx/media/disk/disk/_home_xxxxxxx_folder2': No such file
or directory
fuse: bad mount point
`/tmp/.x2go-xxxxxxx/media/disk/disk/disk/_home_xxxxxxx_folder3': No such
file or directory


The bug is in /usr/bin/x2gomountdirs, explication:

the $mdir variable is initialize line:
87	my $mdir="$tmp_dir/.x2go-$ENV{'USER'}/media";

but in code bloc
    162	for (my $i=0;$i<@dirs;$i++)
    163	{
    164		my $printspool=0;
    165		my $mimeboxspool=0;
    166		my $mntpath;
    167		if(@dirs[$i]=~m/__PRINT_SPOOL_/)
    168		{
    169			@dirs[$i]=~s/__PRINT_SPOOL_//;
    170			$printspool=1;
    171			$mntpath=$spooldir;
    172			syslog('debug', "mounting $spooldir, mount point type is print
spool directory");
    173		}
    174		elsif(@dirs[$i]=~m/__MIMEBOX_SPOOL_/)
    175		{
    176			@dirs[$i]=~s/__MIMEBOX_SPOOL_//;
    177			$mimeboxspool=1;
    178			$mntpath=$mimeboxdir;
    179			syslog('debug', "mounting $mimeboxdir, mount point type is
MIME box directory");
    180		}
    181		else
    182		{
    183			my $p=@dirs[$i];
    184			if ($type ne "dir")
    185			{
    186				$p=~s/\/ramdrive\/mnt\///;
    187				if ($p =~ m/CDROM/)
    188				{
    189					$mdir=$mdir."/cd";
    190				}
    191				else
    192				{
    193					$mdir=$mdir."/rm";
    194				}
    195			}
    196			else
    197			{
    198				$mdir=$mdir."/disk";
    199			}
    200			$p=~s/\//_/g;
    201			$p=~s/ /_/g;
    202			$p=~s/~_cygdrive_//;
    203			$p=~s/~_windrive_//;
    204			$p=~s/~//g;
    205			mkdir("$mdir/$p");
    206			$mntpath="$mdir/$p";
    207		}

if we have more than 1 folder to share, $mdir variable will became:
first time:
$mdir="$tmp_dir/.x2go-$ENV{'USER'}/media/disk"
second time:
$mdir="$tmp_dir/.x2go-$ENV{'USER'}/media/disk/disk";
third time:
$mdir="$tmp_dir/.x2go-$ENV{'USER'}/media/disk/disk/disk";


Solution is to fix $mdir variable in begin for loop. Add
$mdir="$tmp_dir/.x2go-$ENV{'USER'}/media" in line:
    164		my $printspool=0;
    165		my $mimeboxspool=0;
    166		my $mntpath;
=> 167          $mdir="$tmp_dir/.x2go-$ENV{'USER'}/media";

Regards

---------------------------------
Pascal Vibet
[Message part 2 (text/html, inline)]

Send a report that this bug log contains spam.


X2Go Developers <owner@bugs.x2go.org>. Last modified: Mon May 19 08:20:16 2025; Machine Name: ymir.das-netzwerkteam.de

X2Go Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.