Educate Me on Remote Desktops - Page 7 - AVS Forum
Forum Jump: 
Reply
 
Thread Tools
post #181 of 200 Old 06-02-2010, 08:33 PM
AVS Special Member
 
tux99's Avatar
 
Join Date: Jan 2005
Location: Europe
Posts: 1,523
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 11
post the output of ls -la /dev/cd* /dev/sr*

My Linux news / reviews / tips+tricks / downloads web site: http://www.linuxtech.net/
tux99 is offline  
Sponsored Links
Advertisement
 
post #182 of 200 Old 06-03-2010, 04:27 AM - Thread Starter
Advanced Member
 
shane2943's Avatar
 
Join Date: Mar 2009
Posts: 775
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 1 Post(s)
Liked: 10
Here you go, tux:

Code:
[root@localhost remote]# ls -la /dev/cd* /dev/sr*
lrwxrwxrwx  1 root root      3 2010-06-02 18:19 /dev/cdrom -> sr0
lrwxrwxrwx  1 root root      3 2010-06-02 18:19 /dev/cdrw -> sr0
brw-rw----+ 1 root cdrom 11, 0 2010-06-02 18:19 /dev/sr0
[root@localhost remote]#
Just for grins, here is my /etc/group file as it is now:

Code:
[root@localhost remote]# cat /etc/group                          
root:x:0:                                                        
bin:x:1:                                                         
daemon:x:2:                                                      
sys:x:3:                                                         
adm:x:4:                                                         
tty:x:5:                                                         
disk:x:6:                                                        
lp:x:7:                                                          
mem:x:8:                                                         
kmem:x:9:                                                        
wheel:x:10:                                                      
mail:x:12:                                                       
news:x:13:                                                       
uucp:x:14:                                                       
man:x:15:                                                        
floppy:x:19:                                                     
games:x:20:                                                      
tape:x:21:                                                       
cdrom:x:22:remote                                                
utmp:x:24:                                                       
shadow:x:25:                                                     
chkpwd:x:26:                                                     
auth:x:27:
usb:x:43:remote
cdwriter:x:80:remote
audio:x:81:
video:x:82:
dialout:x:83:
users:x:100:
nogroup:x:65534:
rpm:x:101:
messagebus:x:102:
avahi:x:103:
avahi-autoipd:x:16:
polkituser:x:17:
haldaemon:x:18:
rtkit:x:104:
sshd:x:105:
xguest:x:10000:
vcsa:x:69:
rpc:x:70:
rpcuser:x:71:
slocate:x:106:
ntp:x:72:
xgrp:x:107:
ntools:x:108:
ctools:x:109:
shane:x:10001:
lpadmin:x:110:
mt-daapd:x:73:
machines:x:421:
nx:x:74:
remote:x:10002:
[root@localhost remote]#
And thank you once again for your patience with this, Tux.
shane2943 is offline  
post #183 of 200 Old 06-03-2010, 07:32 AM
AVS Special Member
 
tux99's Avatar
 
Join Date: Jan 2005
Location: Europe
Posts: 1,523
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 11
Ok, right now I don't understand why that group configuration isn't working for you, but I found out why my dirty chmod solution is not working (as you can see from your output, the permissions are back to 'user+group' only, 'others' are not allowed to read/write the /dev/sr0 device).
As I said it was a very dirty attempt at a solution...
If you added the chmod line into /etc/rc.d/rc.local, then remove it again as it's useless.

The /dev/sr0 device gets regenerated each time you insert/remove a cd and the default permissions for it are defined in: /lib/udev/rules.d/50-udev-mandriva.rules.
By default they are:

Code:
# permissions for SCSI CD devices
BUS=="scsi", KERNEL=="sg*", MODE="0660", GROUP="cdwriter"
BUS=="scsi", KERNEL=="s[grt][0-9]*", SYSFS{type}=="5", MODE="0660", GROUP="cdrom"
That file should not be edited as it's part of the udev package and any changes will be overwritten when the package gets updated.

Instead the correct way to change the default udev permissions is to create a new custom rule file in /etc/udev/rules.d/, we will call it 99-user-cd.rules.

So create the 99-user-cd.rules file in /etc/udev/rules.d/ for example by using vi as root as follows:

vi /etc/udev/rules.d/99-user-cd.rules

And put the following lines into this file:

Code:
# permissions for SCSI CD devices
BUS=="scsi", KERNEL=="sg*", MODE="0666", GROUP="cdwriter"
BUS=="scsi", KERNEL=="s[grt][0-9]*", SYSFS{type}=="5", MODE="0666", GROUP="cdrom"
Save the file and exit vi, then do a reboot (you could just restart udev, but I guess on a HTPC it doesn't really matter).

Now any user should be able to access the CD/DVD drive.

P.S: this is still not the cleanest solution, the cleanest solution would be to investigate and solve the 'group' issue, I don't understand why despite the group settings appear correct to me, you still weren't able to access the /dev/sr0 device.

My Linux news / reviews / tips+tricks / downloads web site: http://www.linuxtech.net/
tux99 is offline  
post #184 of 200 Old 06-03-2010, 01:18 PM
 
mythmaster's Avatar
 
Join Date: Mar 2008
Location: 255.255.255.255
Posts: 2,142
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Did I mention anything about groups? GROUPS, GROUPS, GROUPS!!

Get a good handle on GROUPS and permission control then move on to ACL.
mythmaster is offline  
post #185 of 200 Old 06-03-2010, 01:45 PM
AVS Special Member
 
tux99's Avatar
 
Join Date: Jan 2005
Location: Europe
Posts: 1,523
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 11
Quote:
Originally Posted by mythmaster View Post

Did I mention anything about groups? GROUPS, GROUPS, GROUPS!!

Get a good handle on GROUPS and permission control then move on to ACL.

Agreed, but in this case the groups config looks perfectly fine, and still he can't access the drive, hence the solution I suggested in my last post, which I have tested on my HTPC (which runs Mandriva 2010 exactly like Shane's) so I'm confident it will work for Shane.

My Linux news / reviews / tips+tricks / downloads web site: http://www.linuxtech.net/
tux99 is offline  
post #186 of 200 Old 06-03-2010, 06:47 PM
Senior Member
 
Tijs_Verwest's Avatar
 
Join Date: Jun 2008
Posts: 369
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Quote:
Originally Posted by shane2943 View Post

No, I mean on the HTPC. Did you install the FreeNX server or NeatX which is in the Lucid repos?

According to the procedures you posted, NeatX is what is supposed to be installed (according to Canonical) in Lucid since they chose to put it instead of freeNX in the repo for Lucid.

i checked on synaptic, and freenx indeed looks like its installed, check it out :

Tijs_Verwest is offline  
post #187 of 200 Old 06-17-2010, 06:48 PM - Thread Starter
Advanced Member
 
shane2943's Avatar
 
Join Date: Mar 2009
Posts: 775
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 1 Post(s)
Liked: 10
Quote:
Originally Posted by tux99 View Post

Ok, right now I don't understand why that group configuration isn't working for you, but I found out why my dirty chmod solution is not working (as you can see from your output, the permissions are back to 'user+group' only, 'others' are not allowed to read/write the /dev/sr0 device).
As I said it was a very dirty attempt at a solution...
If you added the chmod line into /etc/rc.d/rc.local, then remove it again as it's useless.

The /dev/sr0 device gets regenerated each time you insert/remove a cd and the default permissions for it are defined in: /lib/udev/rules.d/50-udev-mandriva.rules.
By default they are:

Code:
# permissions for SCSI CD devices
BUS=="scsi", KERNEL=="sg*", MODE="0660", GROUP="cdwriter"
BUS=="scsi", KERNEL=="s[grt][0-9]*", SYSFS{type}=="5", MODE="0660", GROUP="cdrom"
That file should not be edited as it's part of the udev package and any changes will be overwritten when the package gets updated.

Instead the correct way to change the default udev permissions is to create a new custom rule file in /etc/udev/rules.d/, we will call it 99-user-cd.rules.

So create the 99-user-cd.rules file in /etc/udev/rules.d/ for example by using vi as root as follows:

vi /etc/udev/rules.d/99-user-cd.rules

And put the following lines into this file:

Code:
# permissions for SCSI CD devices
BUS=="scsi", KERNEL=="sg*", MODE="0666", GROUP="cdwriter"
BUS=="scsi", KERNEL=="s[grt][0-9]*", SYSFS{type}=="5", MODE="0666", GROUP="cdrom"
Save the file and exit vi, then do a reboot (you could just restart udev, but I guess on a HTPC it doesn't really matter).

Now any user should be able to access the CD/DVD drive.

P.S: this is still not the cleanest solution, the cleanest solution would be to investigate and solve the 'group' issue, I don't understand why despite the group settings appear correct to me, you still weren't able to access the /dev/sr0 device.

Ok, done. But I still can't access the drive. I'm gonna cry.

Here's the new /etc/udev/rules.d/99-user-cd.rules file:

Code:
# permissions for SCSI CD devices
BUS=="scsi", KERNEL=="sg*", MODE="0666", GROUP="cdwriter"
BUS=="scsi", KERNEL=="s[grt][0-9]*", SYSFS{type}=="5", MODE="0666", GROUP="cdrom"
~
And I did undo the previous changes that you instructed.

Oy, I know this is frustrating for y'all, but thanks for stickin with me.
shane2943 is offline  
post #188 of 200 Old 06-17-2010, 07:54 PM
AVS Special Member
 
tux99's Avatar
 
Join Date: Jan 2005
Location: Europe
Posts: 1,523
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 11
And you did a reboot?

If yes, then please post again the current output of:

ls -la /dev/cd* /dev/sr*

My Linux news / reviews / tips+tricks / downloads web site: http://www.linuxtech.net/
tux99 is offline  
post #189 of 200 Old 06-17-2010, 08:08 PM - Thread Starter
Advanced Member
 
shane2943's Avatar
 
Join Date: Mar 2009
Posts: 775
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 1 Post(s)
Liked: 10
Yup. I rebooted.

here's the ouput:
Code:
[remote@localhost ~]$ ls -la /dev/cd* /dev/sr*
lrwxrwxrwx  1 root root      3 2010-06-17 20:46 /dev/cdrom -> sr0
lrwxrwxrwx  1 root root      3 2010-06-17 20:46 /dev/cdrw -> sr0
brw-rw-rw-+ 1 root cdrom 11, 0 2010-06-17 20:46 /dev/sr0
[remote@localhost ~]$
shane2943 is offline  
post #190 of 200 Old 06-17-2010, 11:49 PM
 
mythmaster's Avatar
 
Join Date: Mar 2008
Location: 255.255.255.255
Posts: 2,142
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Sorry, bro'. "Groups" is the bomb, but it is also a bitch. Get on up in there and learn how it works. You will be glad that you did.

I can't help you with Mandriva-specifics because I don't use it.

Best of luck to you, my friend.
mythmaster is offline  
post #191 of 200 Old 06-18-2010, 04:01 AM
AVS Special Member
 
tux99's Avatar
 
Join Date: Jan 2005
Location: Europe
Posts: 1,523
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 11
Quote:
Originally Posted by shane2943 View Post

Yup. I rebooted.

here's the ouput:
Code:
[remote@localhost ~]$ ls -la /dev/cd* /dev/sr*
lrwxrwxrwx  1 root root      3 2010-06-17 20:46 /dev/cdrom -> sr0
lrwxrwxrwx  1 root root      3 2010-06-17 20:46 /dev/cdrw -> sr0
brw-rw-rw-+ 1 root cdrom 11, 0 2010-06-17 20:46 /dev/sr0
[remote@localhost ~]$

OK, as you can see the changes we did worked since the devices are now read/writable by everyone, so there is no reason why your 'remote' user should get an access error.

I'm certainly not calling you a liar, but I cannot believe that now the 'remote' user still cannot access the CD. If that's really the case then there must be something else you are doing wrong that we haven't thought of.

Like I said, I tested all this on my Mandriva 2010 box using freenx with a newly created user and the 'remote' user can access the CD fine, both with k9copy and dvdfab.

All I can suggest now is try to create another user (use MCC for that) and see if the new user can access the CD, maybe there is something wrong with this specific user (although I really can't imagine what).

My Linux news / reviews / tips+tricks / downloads web site: http://www.linuxtech.net/
tux99 is offline  
post #192 of 200 Old 06-18-2010, 07:06 AM - Thread Starter
Advanced Member
 
shane2943's Avatar
 
Join Date: Mar 2009
Posts: 775
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 1 Post(s)
Liked: 10
I agree that something isn't right. I might try accessing the drive through the command line as remote and see what the output is. I'll post it here. What commands can I run (besides the 'ls' command to view files/directories) in the command line as remote over the VNC? Guess I could try playing a DVD or something.

I was contemplating upgrading to 2010.1 anyway since there are major KdE bug fixes and whatnot. Maybe doing that I'll be able to connect using user 'shane' instead of having to create a new user.

Far as troubleshooting this problem, I can promise you I've followed your instructions to the letter. Now that doesn't mean that I haven't screwed something up before even starting on VNC. That is entirely possible.
shane2943 is offline  
post #193 of 200 Old 06-18-2010, 12:05 PM
AVS Special Member
 
tux99's Avatar
 
Join Date: Jan 2005
Location: Europe
Posts: 1,523
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 11
Quote:
Originally Posted by shane2943 View Post

I agree that something isn't right. I might try accessing the drive through the command line as remote and see what the output is. I'll post it here. What commands can I run (besides the 'ls' command to view files/directories) in the command line as remote over the VNC? Guess I could try playing a DVD or something.

Try backing up a dvd with k9copy and playing it with xine.
With regards to command-line try:
dd if=/dev/sr0 of=/dev/null bs=1024 count=1000
(this will read some data off the DVD and dump it to /dev/null, it should complete without errors)

Quote:
Originally Posted by shane2943 View Post

I was contemplating upgrading to 2010.1 anyway since there are major KdE bug fixes and whatnot. Maybe doing that I'll be able to connect using user 'shane' instead of having to create a new user.

While the upgrade could be a good idea in general, I doubt it would fix this problem, this doesn't some like a bug to me since it works fine on my box, it seems more like a config error somewhere.

My Linux news / reviews / tips+tricks / downloads web site: http://www.linuxtech.net/
tux99 is offline  
post #194 of 200 Old 06-18-2010, 12:40 PM - Thread Starter
Advanced Member
 
shane2943's Avatar
 
Join Date: Mar 2009
Posts: 775
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 1 Post(s)
Liked: 10
I will try your suggestions when I get home. Thanks, man.

And as far as the upgrade goes, I meant wipe/install, not rolling upgrade. A wipe/install would definitely undo any stupidity I have wielded upon this poor innocent system.
shane2943 is offline  
post #195 of 200 Old 06-18-2010, 05:07 PM - Thread Starter
Advanced Member
 
shane2943's Avatar
 
Join Date: Mar 2009
Posts: 775
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 1 Post(s)
Liked: 10
OK, this is dadgum strange. I can play a disc from NX just fine under the 'remote' user using Dragon Player. I also arn the dd command you provided and it returned no errors. It seems to be an isolated problem with accessing the disc via Dolphin!

Here the dd output:
Code:
[remote@localhost ~]$ dd if=/dev/sr0 of=/dev/null bs=1024 count=1000
1000+0 records in
1000+0 records out
1024000 bytes (1.0 MB) copied, 2.94332 s, 348 kB/s
[remote@localhost ~]$
I can even access the disc with k9copy, but only if I open k9copy first, and then access the disc. If I try to access the disc from the widget on the task bar, I get the prompt asking for the root password. So far, only thing that won't access DVDs is Dolphin. Unfortunately, that one is important because DVDFab won't read the disc until it's "displayed in Dolphin."
shane2943 is offline  
post #196 of 200 Old 06-20-2010, 02:40 PM
AVS Special Member
 
tux99's Avatar
 
Join Date: Jan 2005
Location: Europe
Posts: 1,523
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 11
Quote:
Originally Posted by shane2943 View Post

OK, this is dadgum strange. I can play a disc from NX just fine under the 'remote' user using Dragon Player. I also arn the dd command you provided and it returned no errors. It seems to be an isolated problem with accessing the disc via Dolphin!

Here the dd output:
Code:
[remote@localhost ~]$ dd if=/dev/sr0 of=/dev/null bs=1024 count=1000
1000+0 records in
1000+0 records out
1024000 bytes (1.0 MB) copied, 2.94332 s, 348 kB/s
[remote@localhost ~]$
I can even access the disc with k9copy, but only if I open k9copy first, and then access the disc. If I try to access the disc from the widget on the task bar, I get the prompt asking for the root password. So far, only thing that won't access DVDs is Dolphin. Unfortunately, that one is important because DVDFab won't read the disc until it's "displayed in Dolphin."

Hmmm, I think we have some misunderstanding here, as far as I can see it is all working correctly now.
Somehow I understood you were getting an access error, not simply a prompt for the root password when trying to mount the DVD.

What happens if you type the root password when dolphin or the k9copy widget prompt you for it?

Do k9copy and dvdfab work after you entered the root password?

Dolphin wants the root password to mount the DVD in the default mount location /media.

Your remote user now has the filesystem rights (that's what we configured earlier) to read the raw DVD device (which is what dd and k9copy do), but he doesn't have the PolicyKit rights to mount the DVD, so there is nothing unusual about it asking for the root passowrd.

Now I'm not an expert at all of Policykit, in fact I have never fiddled with it and it's a fairly recent addition to Linux distros (which I'm not happy about since it just complicates things), but if you want to eliminate the prompt for the root passowrd, then you could look at the config, which AFAIK is accessible from the KDE config tool (configure your desktop icon on the toolbar) under the Advanced tab -> PolicyKit Authorization.
There you will find related config stuff under org.freedesktop.hal.

BTW, for dvdfab to work you don't have to mount the DVD with Dolphin, you could mount it from command line or use any other tool that mounts a DVD.

This could make interesting reading for you (I haven't read it):
PolicyKit Library Reference Manual http://hal.freedesktop.org/docs/PolicyKit/

My Linux news / reviews / tips+tricks / downloads web site: http://www.linuxtech.net/
tux99 is offline  
post #197 of 200 Old 06-21-2010, 05:54 AM - Thread Starter
Advanced Member
 
shane2943's Avatar
 
Join Date: Mar 2009
Posts: 775
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 1 Post(s)
Liked: 10
My apologies, Tux. I probably was not clear in my explanation. I will do some reading/fiddling with the Policykit stuff.

Thanks!
shane2943 is offline  
post #198 of 200 Old 06-24-2010, 04:28 PM - Thread Starter
Advanced Member
 
shane2943's Avatar
 
Join Date: Mar 2009
Posts: 775
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 1 Post(s)
Liked: 10
OMG IT'S FIXED!!!

So I did some research and discovered how to adjust the PolicyKit settings. You can't do it through the gui. You have to edit the config file. So, I opened /etc/PolicyKit/PolicyKit.conf with KWrite and added the following lines:

Code:
So now the whole config file looks like:

Code:
After that, I did as root:

Code:
service haldaemon restart
AND IT'S WORKING FINE!!! I can access the DVD drive without root and DVDFab pulls it up just fine!

YAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAYYYYYY!!!!!!!

Thank you all for putting up with me.
shane2943 is offline  
post #199 of 200 Old 06-24-2010, 05:14 PM
AVS Special Member
 
tux99's Avatar
 
Join Date: Jan 2005
Location: Europe
Posts: 1,523
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 11
Congratulations, see you are on your way to become a Linux guru, soon you won't need any help from us anymore!
Thanks for posting the details here, can come handy for myself or others in the future too, like I said, I know very little about Policykit.
One thing though, you forgot to mention the filename (with full path) of the file you edited, that would be useful to know, too.

My Linux news / reviews / tips+tricks / downloads web site: http://www.linuxtech.net/
tux99 is offline  
post #200 of 200 Old 06-24-2010, 06:42 PM - Thread Starter
Advanced Member
 
shane2943's Avatar
 
Join Date: Mar 2009
Posts: 775
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 1 Post(s)
Liked: 10
Oops. The config file path is:

Code:
/etc/PolicyKit/PolicyKit.conf
I edited my previous post with that as well.
shane2943 is offline  
Reply HTPC - Linux Chat

User Tag List

Thread Tools
Show Printable Version Show Printable Version
Email this Page Email this Page


Forum Jump: 

Posting Rules  
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off