Hi $LIST,
over on X2Go-User one of our new users is wondering why in ThinClient mode, X2Go doesn't remove the empty directory on the server when portable media is removed from the ThinClient.
In other words, we see a ~/media/disk/KINGSTON folder on the server for a Kingston usb flash disk, and we can see all of its contents.
Unplugging the device leads to an empty ~/media/disk/KINGSTON folder, but the folder "KINGSTON" itself is not removed.
Is this intentional, or an oversight? Or technically impossible? Or is something wrong with the user's server/client setup?
Or is the user merely "holding it wrong", i.e. would they have to use a server-side umount command like "fusermount -u mountpoint" instead of simply removing the media from the ThinClient without warning?
Kind Regards, Stefan Baur
-- BAUR-ITCS UG (haftungsbeschränkt) Geschäftsführer: Stefan Baur Eichenäckerweg 10, 89081 Ulm | Registergericht Ulm, HRB 724364 Fon/Fax 0731 40 34 66-36/-35 | USt-IdNr.: DE268653243
HI Stefan,
On Di 22 Jan 2019 16:11:55 CET, Stefan Baur wrote:
Hi $LIST,
over on X2Go-User one of our new users is wondering why in ThinClient mode, X2Go doesn't remove the empty directory on the server when portable media is removed from the ThinClient.
In other words, we see a ~/media/disk/KINGSTON folder on the server for a Kingston usb flash disk, and we can see all of its contents.
Unplugging the device leads to an empty ~/media/disk/KINGSTON folder, but the folder "KINGSTON" itself is not removed.
Is this intentional, or an oversight? Or technically impossible? Or is something wrong with the user's server/client setup?
Or is the user merely "holding it wrong", i.e. would they have to use a server-side umount command like "fusermount -u mountpoint" instead of simply removing the media from the ThinClient without warning?
Kind Regards, Stefan Baur
Simply removing the USB flash drive is what is supposed to be done. If
the folder remains, then something goes wrong on the server-side (in
x2goumount-session), maybe in X2Go Client (dunno otoh).
DAS-NETZWERKTEAM mike gabriel, herweg 7, 24357 fleckeby mobile: +49 (1520) 1976 148 landline: +49 (4354) 8390 139
GnuPG Fingerprint: 9BFB AEE8 6C0A A5FF BF22 0782 9AF4 6B30 2577 1B31 mail: mike.gabriel@das-netzwerkteam.de, http://das-netzwerkteam.de
Am 22.01.19 um 20:23 schrieb Mike Gabriel:
Simply removing the USB flash drive is what is supposed to be done. If the folder remains, then something goes wrong on the server-side (in x2goumount-session), maybe in X2Go Client (dunno otoh).
Well, that's not what's happening. I was able to confirm the behavior on my test system.
On the ThinClient,
/media/Manufacturername/rawdevice # like sdb
and
/media/Manufacturername/partition # like sdb1
remain after unplugging the flash drive.
I just checked, x2gousbmount contains a step to force-umount the media after removal, and to somehow let X2GoClient know about it by doing things in ~/export/, but it never contained a step to remove the directory *on the thinclient*.
Also, it looks like the X2GoServer is simply monitoring directory existence on the thinclient - because as soon as you manually rmdir the empty directory on the thinclient, it also disappears from the server.
I could simply add an rmdir step to the umount routine in x2gousbmount, but given what you wrote above, I'm wondering if it's supposed to happen somewhere else, and failing.
Any insights? Should I proceed or go rmdir-grephunting across the X2Go source first?
Kind Regards, Stefan Baur
-- BAUR-ITCS UG (haftungsbeschränkt) Geschäftsführer: Stefan Baur Eichenäckerweg 10, 89081 Ulm | Registergericht Ulm, HRB 724364 Fon/Fax 0731 40 34 66-36/-35 | USt-IdNr.: DE268653243
Am 23.01.19 um 14:38 schrieb Stefan Baur:
Am 22.01.19 um 20:23 schrieb Mike Gabriel:
Simply removing the USB flash drive is what is supposed to be done. If the folder remains, then something goes wrong on the server-side (in x2goumount-session), maybe in X2Go Client (dunno otoh).
Well, that's not what's happening. I was able to confirm the behavior on my test system.
On the ThinClient,
/media/Manufacturername/rawdevice # like sdb
and
/media/Manufacturername/partition # like sdb1
remain after unplugging the flash drive.
I just checked, x2gousbmount contains a step to force-umount the media after removal, and to somehow let X2GoClient know about it by doing things in ~/export/, but it never contained a step to remove the directory *on the thinclient*.
Also, it looks like the X2GoServer is simply monitoring directory existence on the thinclient - because as soon as you manually rmdir the empty directory on the thinclient, it also disappears from the server.
I could simply add an rmdir step to the umount routine in x2gousbmount, but given what you wrote above, I'm wondering if it's supposed to happen somewhere else, and failing.
Any insights? Should I proceed or go rmdir-grephunting across the X2Go source first?
Digging further into this, it looks like that on the server, x2goumount-session is responsible for deleting the stale desktop shortcuts.
HOWEVER ...
a) It exists twice, once as x2goumounts-session, once as x2goumounts_session. Not symlinked, but two separate files. WTF?
b) it contains a *hardcoded* path that makes it check /media/disk only, with a big fat FIXME note on top that this needs to be changed to handle CD-ROM and removable media mounts as well. So it's kinda obvious why it's not working for removable media ...
c) It looks like neither x2goumounts-session nor x2goumounts_session are being called upon stick removal (there's no "x2goumount-session has been called [...]" message in the syslog at all).
Harumph.
-Stefan
-- BAUR-ITCS UG (haftungsbeschränkt) Geschäftsführer: Stefan Baur Eichenäckerweg 10, 89081 Ulm | Registergericht Ulm, HRB 724364 Fon/Fax 0731 40 34 66-36/-35 | USt-IdNr.: DE268653243