Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Copy&Paste not working #312

Closed
Naroar opened this issue Feb 2, 2016 · 17 comments
Closed

Copy&Paste not working #312

Naroar opened this issue Feb 2, 2016 · 17 comments

Comments

@Naroar
Copy link

Naroar commented Feb 2, 2016

Not very savvie when it comes to linux but I've tried to fix not getting copy & paste working from a Windows 10 64-bit guest to an Ubuntu Server 15.10 VM (running on azure). I've tried building from the master source here to replace the old version that you get from the ubuntu repos, since I was hoping it was just a question of v0.6.x not supporting it but a newer version would.. Allow_channels is on, cliprdr is on, and clipboard redirection is on in the windows client. Still doesn't work. Not kind of copy&paste is working, wether it is text or files. Anything basic I might have missed? RDP does work, so it's just the copy&paste not working at the moment.

@fajarnugraha
Copy link

my 15.10 is usable with this workaround. I also have the same problem as you with latest xrdp master. Note that this works on 15.10, but not on 14.04.

First, make sure you start with a fresh system. Old xrdp config and initscripts can cause problems

apt-get purge xrdp
init 6

Next, build a working X11rdp. This is necessary since ubuntu's vncserver won't work for copy
&paste

git clone https://github.com/scarygliders/X11RDP-o-Matic
cd X11RDP-o-Matic 
./X11rdp-o-matic.sh --justdoit --noinstall
apt-get install gdebi-core
gdebi ./packages/x11rdp/x11rdp_0.9.0+master-1_amd64.deb

After that, create /etc/systemd/system/xrdp-sesman.service with this content

[Unit]
Description=xrdp session manager
After=syslog.target network.target
StopWhenUnneeded=true

[Service]
Type=forking
PIDFile=/var/run/xrdp/xrdp-sesman.pid
EnvironmentFile=-/etc/default/xrdp
ExecStartPre=/bin/mkdir -p /var/run/xrdp
ExecStart=/usr/sbin/xrdp-sesman $SESMAN_OPTIONS
ExecStop=/usr/sbin/xrdp-sesman $SESMAN_OPTIONS --kill

[Install]
WantedBy=multi-user.target

... and /etc/systemd/system/xrdp.service with this content

[Unit]
Description=xrdp daemon
Requires=xrdp-sesman.service
After=syslog.target network.target

[Service]
Type=forking
PIDFile=/var/run/xrdp/xrdp.pid
EnvironmentFile=-/etc/default/xrdp
ExecStart=/usr/sbin/xrdp $XRDP_OPTIONS
ExecStop=/usr/sbin/xrdp $XRDP_OPTIONS --kill

[Install]
WantedBy=multi-user.target

Then, get xrdp from this ppa: https://launchpad.net/~kxteam/+archive/ubuntu/daily . It does not have packages for 15.10, so either edit the repository config to use 14.04's packages, or just download and install the packages manually

wget -c https://launchpad.net/~kxteam/+archive/ubuntu/daily/+files/libfreerdp1_97neutrino~17~ubuntu14.04.1_amd64.deb https://launchpad.net/~kxteam/+archive/ubuntu/daily/+files/xrdp_1333~7~ubuntu14.04.1_amd64.deb
gdebi libfreerdp1_97neutrino~17~ubuntu14.04.1_amd64.deb 
gdebi xrdp_1333~7~ubuntu14.04.1_amd64.deb

... and create the missing file

xrdp-keygen xrdp /etc/xrdp/rsakeys.ini
systemctl daemon-reload
systemctl restart xrdp-sesman

Verify that /dev/fuse exist, and it is writable by normal user. "mknod" and "chmod" if necessary.

$ ls -al /dev/fuse 
crw-rw-rw- 1 root root 10, 229 Feb  8 14:14 /dev/fuse

After that, copy&paste should work. Tested with xfce on server & windows 10 client, copy-paste with ctrl-c and ctrl-v.

Again, this is a workaround, not a permanent fix.

@entercloudbr
Copy link

@fajarnugraha , all procedures were done, but still drive redirection not works. Any other way to save my project???

@fajarnugraha
Copy link

@lorenzoverbicaro : see https://github.com/ubuntu-xrdp/xrdp/blob/ubuntu/readme.md . The repo is based on latest xrdp master (9c48b7b), with added debian/ directory.

If you previously follow the above howto, purge xrdp package again, delete /etc/systemd/system/xrdp-sesman.service and /etc/systemd/system/xrdp.service, restart, and THEN follow the new recipe. Sorry about that.

If you've followed that and it still doesn't work, chances are /dev/fuse does not exist or is not writable by normal user, or you don't have fuse installed.

@Naroar : text copy&paste problems can usually be solved by simply using X11rdp instead of vnc. File copy&paste, however, requires fuse support enabled and working.

@entercloudbr
Copy link

@fajarnugraha , first of all I would like to thank you for your precious help. I have just three questions about your last tutorial:

  1. when you ask for "install necessary dependencies using apt-get", what you mean specifically?

  2. about the FUSE, it seem to be installed, and the /dev/fuse does exist, but I don't know the right way to put it writable for all my users. Could you help me with this, too?

  3. there's one thing that's puzzles me: why there's no FUSE group in Ubuntu 15.10, unlike previous versions?

@fajarnugraha
Copy link

  1. when you ask for "install necessary dependencies using apt-get", what you mean specifically?

if dpkg-buildpackage or dpkg-checkbuilddeps says you have a missing build dependency, install it. If they don't, then simply proceed to the next step.

  1. about the FUSE, it seem to be installed, and the /dev/fuse does exist, but I don't know the right way to put it writable for all my users. Could you help me with this, too?

Are you familiar with unix permissions and chmod? Look it up.

  1. there's one thing that's puzzles me: why there's no FUSE group in Ubuntu 15.10, unlike previous versions?

If /dev/fuse is writable by anyone (i.e. has 666 permission mode), then no need for a special group.

The easiest way to test would be to try whether your user can use a simple fuse fs first. httpfs or sshfs should be a good test

@entercloudbr
Copy link

@fajarnugraha , after the "dpkg-buildpackage -b" I've get this error:

_configure: exit 1
dh_auto_configure: ./configure --build=x86_64-linux-gnu --prefix=/usr --includedir=${prefix}/include --mandir=${prefix}/share/man --infodir=${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --disable-silent-rules --libdir=${prefix}/lib/x86_64-linux-gnu --libexecdir=${prefix}/lib/x86_64-linux-gnu --disable-maintainer-mode --disable-dependency-tracking --enable-fuse --enable-jpeg returned exit code 1
debian/rules:12: recipe for target 'override_dh_auto_configure' failed
make[1]: *** [override_dh_auto_configure] Error 255
make[1]: Leaving directory '/home/lorenzo/xrdp-build/xrdp'
debian/rules:9: recipe for target 'build' failed
make: *** [build] Error 2
dpkg-buildpackage: erro: debian/rules build deu erro de saída estado 2

@fajarnugraha
Copy link

what is the output before that? does it say anything "missing" or "not found"? Chances are you don't have libjpeg-dev installed (or whatever the configure script say it's missing)

@entercloudbr
Copy link

@fajarnugraha , the libjpeg-dev was really missing. Now that the xrdp is installed, I'm trying to put it to load on boot, but without any sucess. I deleted xrdp* from /lib/systemd/system, followed by a systemctl daemon-reload, but it semens doesn't work. Could you help me once more???

@fajarnugraha
Copy link

systemctl -a | grep xrdp
systemctl status xrdp

depending on the output, you'd probably only need systemctl enable xrdp

@entercloudbr
Copy link

@fajarnugraha , Everything is OK with loading on boot. My ultimate issue is the old "no drive redirection", so I beg you to help me throught the right FUSE setup, and allowed permissions for all my users (I´m not familiarized with the commands chmod, ownmod or modprobe). I see /dev/fuse - /etc/fuse.conf - /bin/fusermount on my system, but I don´t how they can work correctly.

@fajarnugraha
Copy link

My best advice is to verify that you can mount a fuse filesystem first.

One way to do it is to try sshfs or httpfs (the fuse one, not the hadoop one). Both should already be available in ubuntu repo, and plenty references for them online. If you can get THAT to work (as the same user that will be using xrdp), try xrdp again.

As for unix permissions, you could simply look it up. For example, http://archive.oreilly.com/pub/post/666_the_devils_readwrite_permi.html

One additional note, compare also what's in /etc/mtab and /proc/mounts. I had a case where /etc/mtab says /root/thinclient_drives is mounted, when it actually isn't (it's not in /proc/mounts). If you experience the same thing, you could edit /etc/mtab to remove the wrong entry manually, or simply replace /etc/mtab with a symlink to /proc/mounts

@entercloudbr
Copy link

@fajarnugraha , I'm giving up the distributions based on Ubuntu because I can not do redirect drives work at all.

I'm now running XRDP on CentOS 6.7 (64-bit) because remember that you wrote in another post that drive redirection works perfectly in this scenario. I used the X11RDP-RH-Matic as you indicated, but still no success with drive redirection, and also the copy&paste.

Do I have something else to do before you give up my project? I´m count on you to help me in that last attempt.

@therevoman
Copy link

Things that helped me get drive redirection working.
1). Make sure the linux user is a member of the following groups. fuse, tsusers
2) Make sure the windows rdp client is configured properly by unchecking printers and smart cards. Anything but clipboard and drives breaks the system for some reason.

@fajarnugraha
Copy link

@lorenzoverbicaro: I'm starting to think that your problem is a simple fuse problem.

Again, my best advice at this point is to make sure that fuse works first. For example, make sure your user can use sshfs (no matter whether it's on centos or ubuntu)

@entercloudbr
Copy link

@fajarnugraha , Finally I've got the drive redirection, just unchecking printers and smart cards in my RDP client. Anyway, your help and other advices were extremelly valuable. Thanks a lot!!!

@entercloudbr
Copy link

@therevoman , Finally it works for me. Thanks a lot!!!

@metalefty
Copy link
Member

Seems to be solved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants