---
name: "x2gomountdirs"
section: "8"
platform: "linux"
package: "x2goserver"
version: "4.1.0.6-1.1+b1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/x2gomountdirs"
---

# x2gomountdirs(8)

Share Client-Side Folder with X2Go Session

## NAME

x2gomountdirs - Share Client-Side Folder with X2Go Session

## SYNOPSIS

x2gomountdirs \<mount\_type\> \<session\_id\> \<username\> \<key\_file\> \<dir1\> \[\<dir2\> \[\<dir3\> \[...\]\]\]

## DESCRIPTION

**x2gomountdirs** mounts client-side folders or devices onto mountpoints that are accessible from within your remote X2Go session.

**x2gomountdirs** is run with X2Go user privileges and normally issued by an X2Go client application.

## ARGUMENTS

- FC**\<mount\_type\>**F\[0\]

  If the mount type is set to ,,dir'' then the client-side mount target is interpreted as a folder. If other, it is interpreted as a device.

- FC**\<session\_id\>**F\[0\]

  The \<session\_id\> is the unique identifier of the X2Go session that this command is run for.

- FC**\<username\>**F\[0\]

  The owner of session \<session\_id\> is given as the \<username\> argument.

- FC**\<key\_file\>**F\[0\]

  Location of a temporary private SSH key file (only valid for this command execution).

- FC**\<dir1\> \[\<dir2\> \[\<dir3\> \[...\]\]\]**F\[0\]

  A list of client-side folders or device mount points that shall be mounted for X2Go session \<session\_id\>.

## PERMISSIONS

X2Go uses the fuse-based SSH filesystem (SSHFS) for sharing client-side file resources with X2Go sessions. Users that shall use X2Go folder sharing must be members of the X2Go server's ,,fuse'' POSIX group.

## RETURN VALUES

**x2gomountdirs** returns some mount point information to stdout if the mounting process has been successful. The mount results are printed line-by-line. The individual lines must be interpreted as shown below:

    line 01: dirs:\<local\_path\>\_\_REVERSESSH\_PORT\_\_\<sshfs\_port\>\
     line 02: ssh port:\<sshfs\_port\>\
     line 03: Host:\<client\_ip\>\
     line 04: User:\<user\>\
     line 05: inserted, sshfs  -o \<options\> \\\
                 "\<user"\>@\<client\_ip\>:"\<local\_path\>" \\\
                 "\<server\_path\>" -p \<sshfs\_port\>\
     line 06: mount \<local\_path\> ok\
     line 07: fname: \<desktop\_icon\_name\>

If mounting of a client folder fails, either of the errors is returned (on stdout):

    error 01: mounting of \<local\_path\> failed\
     error 02: insertion of \<local\_path\> failed (already mounted?), not mounting

As exitcode **x2gomoundirs** always returns 0.

## SEE ALSO

[x2goumount-session(8)](/x2goumount-session/8.md)

## AUTHOR

This manual has been written by Mike Gabriel \<mike.gabriel@das-netzwerkteam.de\> for the X2Go project (https://www.x2go.org).
