Thinstation / thinstation

A framework for making thin and light Linux based images for x86 based machines and thinclients.
https://www.thinstation.net/
793 stars 187 forks source link

USB mount and passthrough for freerdp #662

Closed LittleITworld closed 3 years ago

LittleITworld commented 3 years ago

Hello! How do I mount a USB device with drive letter H, so that I can see it when iam connected to my terminal Server? Currently my config looks like this, but it doesnt mount my USB device.

If I put /drive:H,/mnt/usbdevice into the session_0_freerdp_options, I get a blackscreen with a cursor after booting the image.

Config: RECONNECT_PROMPT=force AUDIO_LEVEL=90 MIC_LEVEL=90 ICONMODE=AUTO ALWAYS_ENTER_SERVER=Off ALLOW_EXIT=Off

SESSION_0_TITLE="Main" SESSION_0_TYPE=freerdp SESSION_0_FREERDP_SERVER=IP-ADDRESS SESSION_0_FREERDP_OPTIONS="/cert-ignore -sec-nla /d:DOMAIN /bpp:32 /rfx /gfx:AVC444 /sound:sys:pulse +auto-reconnect /auto-reconnect-max-retries:0 +heartbeat +fonts /u: /p:" FREERDP_GETUSER=off SESSION_0_FREERDP_PASS_ENABLE=true SESSION_0_CUSTOM_CONFIG=On SESSION_0_AUTOSTART=On FREERDP_USB=On FREERDP_GET_BEST_SERVER="http://IP-ADDRESS/get-rds-host/"

NET_USE=BOTH NET_USE_DHCP=on NETHOSTNAME=ts* NET_TELNETD_ENABLED=ON TIME_ZONE=Europe/Berlin NET_TIME_SERVER=de.pool.ntp.org NET_REMOTE_ACCESS_FROM="0.0.0.0" TFTP_BLOCKSIZE=1024 BIND_MOUNT0="storage:/mnt/storage" STORAGE_CONFIG1=/mnt/storage USB_STORAGE_SYNC=0 USB_MOUNT_DIR="usbdevice" USB_MOUNT_OPTIONS="utf8,shortname=win95"
USB_MOUNT_USELABEL=USBSTICK
LOCALE=de_DE MOUNT_0="LABEL=boot /boot auto x-mount.mkdir,defaults 0 0" MOUNT_1="LABEL=home /home auto x-mount.mkdir,defaults 0 0" MOUNT_2="LABEL=swap swap swap defaults 0 0" SET_RESOLUTION_MULTIMONITOR_EXPAND='mirror' SET_RESOLUTION_MULTIMONITOR_AUTOSCALE='scale'

packages included in build.conf: usb-storage automount udisks udisks glue ts-classic

Thinstation commented 3 years ago

Drop automount, and set UDISKS_AUTOMOUNT=true in thinstation.conf.buildtime then add /drive:hotplug,* in your freerdp options.

On Mon, Aug 23, 2021 at 12:02 AM LittleITworld @.***> wrote:

Hello! How do I mount a USB device with drive letter H, so that I can see it when iam connected to my terminal Server? Currently my config looks like this, but it doesnt mount my USB device.

If I put /drive:H,/mnt/usbdevice into the session_0_freerdp_options, I get a blackscreen with a cursor after booting the image.

Config: RECONNECT_PROMPT=force AUDIO_LEVEL=90 MIC_LEVEL=90 ICONMODE=AUTO ALWAYS_ENTER_SERVER=Off ALLOW_EXIT=Off

SESSION_0_TITLE="Main" SESSION_0_TYPE=freerdp SESSION_0_FREERDP_SERVER=IP-ADDRESS SESSION_0_FREERDP_OPTIONS="/cert-ignore -sec-nla /d:DOMAIN /bpp:32 /rfx /gfx:AVC444 /sound:sys:pulse +auto-reconnect /auto-reconnect-max-retries:0 +heartbeat +fonts /u: /p:" FREERDP_GETUSER=off SESSION_0_FREERDP_PASS_ENABLE=true SESSION_0_CUSTOM_CONFIG=On SESSION_0_AUTOSTART=On FREERDP_USB=On FREERDP_GET_BEST_SERVER="http://IP-ADDRESS/get-rds-host/"

NET_USE=BOTH NET_USE_DHCP=on NETHOSTNAME=ts* NET_TELNETD_ENABLED=ON TIME_ZONE=Europe/Berlin NET_TIME_SERVER=de.pool.ntp.org NET_REMOTE_ACCESS_FROM="0.0.0.0" TFTP_BLOCKSIZE=1024 BIND_MOUNT0="storage:/mnt/storage" STORAGE_CONFIG1=/mnt/storage USB_STORAGE_SYNC=0 USB_MOUNT_DIR="usbdevice" USB_MOUNT_OPTIONS="utf8,shortname=win95" USB_MOUNT_USELABEL=USBSTICK LOCALE=de_DE MOUNT_0="LABEL=boot /boot auto x-mount.mkdir,defaults 0 0" MOUNT_1="LABEL=home /home auto x-mount.mkdir,defaults 0 0" MOUNT_2="LABEL=swap swap swap defaults 0 0" SET_RESOLUTION_MULTIMONITOR_EXPAND='mirror' SET_RESOLUTION_MULTIMONITOR_AUTOSCALE='scale'

packages included in build.conf: usb-storage automount udisks udisks glue ts-classic

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Thinstation/thinstation/issues/662, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAVW47T4SGVJ5X57C6IGLLLT6HXBPANCNFSM5CT5S3VA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email .

LittleITworld commented 3 years ago

I can see and connect to my terminal server now without black screen but I cant see my USB device when I plug it in. I need it mapped as H:

Thinstation commented 3 years ago

Are you using xfwm?

On Tue, Aug 24, 2021 at 12:25 AM LittleITworld @.***> wrote:

I can see and connect to my terminal server now without black screen but I cant see my USB device when I plug it in. I need it mapped as H:

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/Thinstation/thinstation/issues/662#issuecomment-904391892, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAVW47S77XVVRKQNRCYEF4LT6NCOZANCNFSM5CT5S3VA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email .

LittleITworld commented 3 years ago

No Iam connecting directly to my terminal Server and want to use my USB devices in there. Do I need to add the xfwm package?

Thinstation commented 3 years ago

Yes, you need xfwm in session0 to glue a few things together.

On Tue, Aug 24, 2021 at 3:58 AM LittleITworld @.***> wrote:

No Iam connecting directly to my terminal Server and want to use my USB devices in there. Do I need to add the xfwm package?

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/Thinstation/thinstation/issues/662#issuecomment-904537831, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAVW47VITKCHQEI6QEOGRRTT6N3MZANCNFSM5CT5S3VA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email .

Thinstation commented 3 years ago

Possibly you could do it without a wm, but I think you have to run as root and put automount back in, and drop udisks.

On Tue, Aug 24, 2021 at 4:11 AM Donald Cupp @.***> wrote:

Yes, you need xfwm in session0 to glue a few things together.

On Tue, Aug 24, 2021 at 3:58 AM LittleITworld @.***> wrote:

No Iam connecting directly to my terminal Server and want to use my USB devices in there. Do I need to add the xfwm package?

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/Thinstation/thinstation/issues/662#issuecomment-904537831, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAVW47VITKCHQEI6QEOGRRTT6N3MZANCNFSM5CT5S3VA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email .

LittleITworld commented 3 years ago

Ive tried it with xfwm as my main session (excluding my terminal session) and I can see the name of my USB device but its not automatically mounting the device and I cant mount it manually. I get the following message "Error mounting /dev/sda1 at /media/F208-33B4: unknown filesystem type 'exfat'." Ive included module vfat, ext4 and usb-storage in my build.conf and it doesnt matter which package I include (automount, udisks).

Thinstation commented 3 years ago

You likely need exfat module

On Wed, Aug 25, 2021 at 2:58 AM LittleITworld @.***> wrote:

Ive tried it with xfwm as my main session (excluding my terminal session) and I can see the name of my USB device but its not automatically mounting the device and I cant mount it manually. I get the following message "Error mounting /dev/sda1 at /media/F208-33B4: unknown filesystem type 'exfat'." Ive included module vfat, ext4 and usb-storage in my build.conf and it doesnt matter which package I include (automount, udisks).

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/Thinstation/thinstation/issues/662#issuecomment-905357374, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAVW47TDGZMVVN7Y4BUR7L3T6S5GDANCNFSM5CT5S3VA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email .

Thinstation commented 3 years ago

My bad, my kernel config was missing exfat support. I could swear I made this change a long time ago, must have gotten lost in a shuffle. I have put it back in, recompiled and updated the kernel. Please try the latest push, and include exfat.

LittleITworld commented 3 years ago

Thank you, I can see and use my USB device now in my xfwm session! But I cant see it in my terminal session. Ive disabled automount, set udisks true and added the option for freerdp :/

Thinstation commented 3 years ago

do you see gvfs share in your RDP session?

LittleITworld commented 3 years ago

No I dont see anything in my RDP session (only in my xfwm session).

Thinstation commented 3 years ago

You need to add +drives to your freerdp options then.

On Thu, Sep 2, 2021 at 12:08 AM LittleITworld @.***> wrote:

No I dont see anything in my RDP session (only in my xfwm session).

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/Thinstation/thinstation/issues/662#issuecomment-911293047, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAVW47WQIHFCIFT67SSHBSLT74PGNANCNFSM5CT5S3VA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

LittleITworld commented 3 years ago

I can see it now, but it keeps disappearing. It looks like its connected-disconnected every 5 seconds. I saw our old network.conf and the options stated "/vc:ftrdpbr drive:H,/mnt/usbdevice" but it isnt working with it.

Thinstation commented 3 years ago

The mountpoint with udisks is at /media

LittleITworld commented 3 years ago

But how do I fix the disappearing?

Doncuppjr commented 3 years ago

Something with your freerdp options or your hardware……. Are you try to share the drive in to many ways?

Sent from Yahoo Mail for iPhone

On Monday, September 6, 2021, 11:31 PM, LittleITworld @.***> wrote:

But how do I fix the disappearing?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

LittleITworld commented 3 years ago

My options are the same as advised: SESSION_1_FREERDP_OPTIONS="/cert-ignore -sec-nla /d:DOMAIN /bpp:32 /rfx /gfx:AVC444 /sound:sys:pulse +auto-reconnect /auto-reconnect-max-retries:0 +heartbeat +fonts /drive:hotplug,* +drives

BIND_MOUNT0="storage:/mnt/storage" STORAGE_CONFIG1=/mnt/storage USB_STORAGE_SYNC=on UDISKS_AUTOMOUNT=true

packages: module usb-storage module vfat&exfat&ntfs package udisks package udisks-glue package autonet package xfwm4&thunar&terminal

LittleITworld commented 3 years ago

The thing is, my device doesnt disappear in my xfwm4 session but if I connect to my terminal server it keeps disappearing after like 5-10secs (and then reappearing).

Doncuppjr commented 3 years ago

You have /drive and +drives . Pick a path.

Sent from Yahoo Mail for iPhone

On Tuesday, September 7, 2021, 5:01 AM, LittleITworld @.***> wrote:

My options are the same as advised: SESSION_1_FREERDP_OPTIONS="/cert-ignore -sec-nla /d:DOMAIN /bpp:32 /rfx /gfx:AVC444 /sound:sys:pulse +auto-reconnect /auto-reconnect-max-retries:0 +heartbeat +fonts /drive:hotplug,* +drives

BIND_MOUNT0="storage:/mnt/storage" STORAGE_CONFIG1=/mnt/storage USB_STORAGE_SYNC=on UDISKS_AUTOMOUNT=true

packages: module usb-storage module vfat&exfat&ntfs package udisks package udisks-glue package autonet package xfwm4&thunar&terminal

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

LittleITworld commented 3 years ago

You need to add +drives to your freerdp options then. On Thu, Sep 2, 2021 at 12:08 AM LittleITworld @.***> wrote: No I dont see anything in my RDP session (only in my xfwm session). — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#662 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAVW47WQIHFCIFT67SSHBSLT74PGNANCNFSM5CT5S3VA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

I thought I needed both since it wasnt working before. Apparently its fixed now thank you for your help!