Remote NX login to Ubuntu, Gnome can't mount CD/DVD drive

3

Even though I'm sitting next to it, I log into my Ubuntu 10.04 LTS system via NX Free Edition from another system at the moment (this is temporary, not worth buying a KVM for). Curiously, though, when I do that Gnome's auto-mounting fails for CD/DVD media (I haven't tried other kinds) with a "Not Authorized" error. (When I put the media in the machine's own DVD drive, not the one on my client box.) For instance, when I put the Ubuntu 10.04 LTS installation CD in, I get this error:

Unable to mount Ubuntu 10.04 LTS amd64 - Not Authorized

This does not happen if I log into it locally (not via NX) with the same user account.

When using NX, I can mount the media if I go to mount directly:

tjc@midnight:~$ sudo mkdir /media/dvd
tjc@midnight:~$ sudo mount -r -t iso9660 /dev/sr0 /media/dvd
tjc@midnight:~$ ls /media/dvd
autorun.inf  casper  dists  install  isolinux  md5sum.txt  pics  pool  preseed   README.diskdefines  ubuntu  wubi.exe

...which, along with the "not authorized" error, suggests some kind of permissions problem to me (doh). What I find odd is that the same user is involved in both cases (local and via NX).

I'm new to Ubuntu on the desktop (used it and other distros on servers for years), so I'm afraid I don't know how this auto-mounting is happening. I think it's handled by the gvfs package and its daemon, but that's about as far as I got (and perhaps I've taken a left turn even getting that far).

Although I can work around it with mount, does anyone know how I might get auto-mounting to work?

Update The nx user used by NX doesn't seem to be the issue. I wouldn't have expected it to be, since I'm logging in as myself, but I'm on unfamiliar ground. The only processes running as nx are:

nx        4484  4416  0 09:24 ?        00:00:00 sshd: nx@notty   
nx        4568     1  0 09:24 ?        00:00:00 /usr/NX/bin/nxssh -nxservermode -l tjc localhost -p 22 -x -2 -i /usr/NX/etc/keys/node.localhost.id_dsa -o PubkeyAuthentication yes -o RSAAuthentication yes -o RhostsAuthentication no -o PasswordAuthentication no -o RhostsRSAAuthentication no -o StrictHostKeyChecking no /usr/NX/bin/nxnode
nx        4664     1  0 09:24 ?        00:00:00 nxserver -c /usr/NX/bin/nxserver --login

...where all the Gnome stuff is either running as me (tjc) or gdm. But just in case, I added nx to the cdrom group via usermod. When that didn't work, not being sure which services might want restarting, I just did the Windows thing and rebooted the machine entirely. No change. In fact, I temporarily added the nx user to all groups that tjc was a member of (except the tjc group), but that didn't do it either, so I think the nx user isn't the issue.

T.J. Crowder

Posted 2010-06-07T07:21:46.600

Reputation: 1 128

Answers

1

It seems a problem with consolekit and policikit. Read this:

https://bugs.launchpad.net/ubuntu/+bug/221363

There is a workaround for FreeNX-Server. The problem is I am using Neatx-Server...

liken

Posted 2010-06-07T07:21:46.600

Reputation: 11

0

If I recall correctly from my forays into NX, it runs under a separate user account - double check that the nx account (or whichever it is, might have to list all user accounts to find it) has proper permissions to mount the drive (add to group cdrom ?)

Darth Android

Posted 2010-06-07T07:21:46.600

Reputation: 35 133

Thanks, but no luck (usermod -a -G cdrom nx, then check in /etc/groups that it's been added, and not seeing a difference immediately and not being certain which services may need restarting, I did the Windows thing and rebooted the machine). There is an nx user, but all of the Gnome stuff (including gvfsd) says it's running under either gdm or tjc (my login). The only processes running under nx are the SSH login and nxserver. I'll update the question. – T.J. Crowder – 2010-06-07T09:12:35.367

(I tried all other groups tjc was a member of, too, just to be sure.) – T.J. Crowder – 2010-06-07T09:38:51.923

@T.J. Crowder Is tjc a member of cdrom? I just realized that you were using sudo to mount it from the command line. Locally I think Ubuntu uses the pmount system, which might bypass said security, but also might not be set up for however nx id starting up gdm. – Darth Android – 2010-06-07T18:17:29.810

tjc is a member of cdrom, yes; but without the sudo, tjc can't manually mount the drive: mount -r -t iso9660 /dev/sr0 /home/tj/dvd results in "mount: only root can do that". I don't think Ubuntu 10.04 uses pmount (at least, I can't find anything with pmount anywhere in the name on my filesystem). – T.J. Crowder – 2010-06-08T00:02:57.653

0

Solved for me installing FreeNX new version, with this guide:

https://help.ubuntu.com/community/FreeNX

liken

Posted 2010-06-07T07:21:46.600

Reputation: 11