JP1 Remotes Forum Index JP1 Remotes


FAQFAQ SearchSearch 7 days of topics7 Days MemberlistMemberlist UsergroupsUsergroups RegisterRegister
ProfileProfile Log in to check your private messagesLog in to check your private messages Log inLog in

Please test: improved Linux access to URC-6440+OARUSB04G
Goto page Previous  1, 2, 3, 4  Next
 
Post new topic   Reply to topic    JP1 Remotes Forum Index -> JP1 - General Forum
View previous topic :: View next topic  
Author Message
mathdon
Expert


Joined: 22 Jul 2008
Posts: 4523
Location: Cambridge, UK

                    
PostPosted: Fri Jun 30, 2023 6:32 am    Post subject: Reply with quote

Some progress, but rather confusing results. With the line ending issue fixed and your files all installed, when I plug in the remote it creates the /media/REMOTE folder but it is empty and the remote is not mounted. I then unplugged the remote and tried to delete the REMOTE folder, but could not as I got a message that it is busy. After a restart, though, I could delete it.

I then deleted your file in /etc/udev/rules.d, plugged in the remote and did sudo sh mount_ofa in Terminal from the /usr/local/bin folder. That worked and RMIR could download the remote. Unplug the remote, it stays mounted. Do sudo sh umount_ofa and the unmount works.

So it appears that the rules file works and executes mount_ofa but that does not complete properly. However, both mount_ofa and umount_ofa work correctly when executed separately, which is why I describe the findings as confusing.

No more time for testing now, but hope to do more later in the day.
_________________
Graham
Back to top
View user's profile Send private message
davecs



Joined: 28 Mar 2005
Posts: 328
Location: UK

                    
PostPosted: Fri Jun 30, 2023 10:23 am    Post subject: Reply with quote

mathdon wrote:


I then deleted your file in /etc/udev/rules.d, plugged in the remote and did sudo sh mount_ofa in Terminal from the /usr/local/bin folder. That worked and RMIR could download the remote. Unplug the remote, it stays mounted. Do sudo sh umount_ofa and the unmount works.



If you have to put "sh" before mount_ofa or unmount_ofa else it won't work, then you haven't made them executable. You have to run your File Manager as root, right-click on each file in the File Manager, select Properties, the Permissions, and mark them executable. I don't know how the File Manager in Ubuntu works precisely, but if you don't mark them executable, they won't run. I could zip my copies of the files, with permissions set, if it's not straightforward, and you could try them perhaps?
_________________
URC7560/URC7562, URC8910, URC7980, URC6440/OARUSB04G and URC3661
Back to top
View user's profile Send private message Visit poster's website
mathdon
Expert


Joined: 22 Jul 2008
Posts: 4523
Location: Cambridge, UK

                    
PostPosted: Fri Jun 30, 2023 1:19 pm    Post subject: Reply with quote

davecs wrote:
If you have to put "sh" before mount_ofa or unmount_ofa else it won't work, then you haven't made them executable.

I don't know if I had to put the sh, I just did so. The permissions of both mount_ofa and umount_ofa show as -rwxrwxrwx, so a far as I know, they are executable.

Here is what I have now found with all your files in place. On plugging in the remote, a /media/REMOTE file is created but is empty. RMIR cannot find the remote. On running
Code:
sudo mount_ofa

from Terminal in the /usr/local/bin folder, the remote mounts and RMIR can find it. On unplugging the remote, the mount remains in File Manager. On running
Quote:
sudo unmount_ofa

the mount disappears as does the /media/REMOTE folder. If I omit the sudo, I get permission denied.

I have searched the web to try to find a way to get an error message to be printed, but do not understand Linux well enough to understand any answers that seem relevant.

I would be very happy to try your files, as I am at a total loss to understand what is happening.
_________________
Graham
Back to top
View user's profile Send private message
davecs



Joined: 28 Mar 2005
Posts: 328
Location: UK

                    
PostPosted: Fri Jun 30, 2023 6:14 pm    Post subject: Reply with quote

/usr/local/bin is usually on the path, so you should be able to run the commands from anywhere. If you can run them without the "sh", and they work, they must be OK.

I'm about to install a test version of MX Linux, but what I'll do before that is to install Ubuntu 22.04 on the partition I was going to use, if it lets me do that without wanting to wipe the entire disk. Then I will try to see what the problem is. I'll have a go when I get the chance over the next few days.
_________________
URC7560/URC7562, URC8910, URC7980, URC6440/OARUSB04G and URC3661
Back to top
View user's profile Send private message Visit poster's website
mathdon
Expert


Joined: 22 Jul 2008
Posts: 4523
Location: Cambridge, UK

                    
PostPosted: Sat Jul 01, 2023 7:28 am    Post subject: Reply with quote

Yes, I find I can run sudo mount_ofa from anywhere, thanks.

I thought I had found the cause of my issues, but alas not. I have found where the /media/urc6440 folder comes from, and might have guessed it earlier if I knew more about Linux. There was an entry in /etc/fstab that I clearly added a long time ago from some previous forum post about the 6440 in Linux. I deleted that entry and the /media/6440 folder but the behaviour of your files is unchanged. If I plug in the remote, the /media/REMOTE folder is created but is empty and RMIR does not find the remote. The new info is that if I then unplug the remote without running sudo mount_ofa, the /media/REMOTE file is deleted, so umount_ofa is being run.

I understand that the "&" at the end of the lines in the rules file makes the commands run in the background. I wondered if this prevented the mount command from working properly, so I tested by deleting the second rule and the "&" at the end of the first one, but still the same behaviour. The REMOTE folder is created but is empty.
_________________
Graham
Back to top
View user's profile Send private message
mathdon
Expert


Joined: 22 Jul 2008
Posts: 4523
Location: Cambridge, UK

                    
PostPosted: Sat Jul 01, 2023 8:47 am    Post subject: Reply with quote

SOLVED!!

I found the following link when searching to see if this was a problem experienced elsewhere:

Linux - mount command returns zero/o but not working

There is a quote in that from another source which reads:

Code:
Warning: To mount removable drives, do not call mount from udev rules. In case of FUSE filesystems, you will get Transport endpoint not connected errors. Instead, you could use udisks that handles automount correctly or to make mount work inside udev rules, copy /usr/lib/systemd/system/systemd-udevd.service to /etc/systemd/system/systemd-udevd.service and replace MountFlags=slave to MountFlags=shared.

I tried to follow that, but found that systemd-udevd.service did not have a MountFlags=slave entry. I then found the further link:

usbmount not working with MountFlags=shared on newer kernel

which indicated that MountFlags=shared has been superseded by PrivateMounts=yes. I preferred to keep to copying the systemd-udevd.service file as suggested in the first link rather than editing the original as suggested in the second link, so I changed to PrivateMounts=no in the copy, restarted, and bingo! It works!

This suggests to me that the problem I experienced is more widespread than just a Ubuntu peculiarity, so I feel that something needs adding to the Wiki about this.
_________________
Graham
Back to top
View user's profile Send private message
davecs



Joined: 28 Mar 2005
Posts: 328
Location: UK

                    
PostPosted: Sat Jul 01, 2023 11:13 am    Post subject: Reply with quote

mathdon wrote:
SOLVED!!

I found the following link when searching to see if this was a problem experienced elsewhere:

Linux - mount command returns zero/o but not working

There is a quote in that from another source which reads:

Code:
Warning: To mount removable drives, do not call mount from udev rules. In case of FUSE filesystems, you will get Transport endpoint not connected errors. Instead, you could use udisks that handles automount correctly or to make mount work inside udev rules, copy /usr/lib/systemd/system/systemd-udevd.service to /etc/systemd/system/systemd-udevd.service and replace MountFlags=slave to MountFlags=shared.

I tried to follow that, but found that systemd-udevd.service did not have a MountFlags=slave entry. I then found the further link:

usbmount not working with MountFlags=shared on newer kernel

which indicated that MountFlags=shared has been superseded by PrivateMounts=yes. I preferred to keep to copying the systemd-udevd.service file as suggested in the first link rather than editing the original as suggested in the second link, so I changed to PrivateMounts=no in the copy, restarted, and bingo! It works!

This suggests to me that the problem I experienced is more widespread than just a Ubuntu peculiarity, so I feel that something needs adding to the Wiki about this.


Well I now have Ubuntu on a spare partition, and it's horrible. It seems to fight against everything I try to do.

Anyway, I'm trying to follow what you did. From reading it, it amounts to changing PrivateMounts=yes to PrivateMounts=no and copying the file to /etc/ from /usr/lib

I've done that and rebooted and it still doesn't work. The links you provided mention an app called usbmount. I don't seem to have that and I can't install it from the software centre. Am I doing something wrong?
_________________
URC7560/URC7562, URC8910, URC7980, URC6440/OARUSB04G and URC3661
Back to top
View user's profile Send private message Visit poster's website
mathdon
Expert


Joined: 22 Jul 2008
Posts: 4523
Location: Cambridge, UK

                    
PostPosted: Sat Jul 01, 2023 1:06 pm    Post subject: Reply with quote

I have posted a draft for your comments of what I suggest for inclusion in the next RMIR release, It is a folder with full instructions that I hope will be more understandable than the web sources on which it is based.

Edit: Did you reboot after changing PrivateMounts?
_________________
Graham
Back to top
View user's profile Send private message
davecs



Joined: 28 Mar 2005
Posts: 328
Location: UK

                    
PostPosted: Sat Jul 01, 2023 1:25 pm    Post subject: Reply with quote

mathdon wrote:

Edit: Did you reboot after changing PrivateMounts?


Yes, I did. A few times too. I think I've found another theoretical solution that I want to test. Off the computer now as I was cooking and now eating so I will look a little later! If it works it will involve copying the files I posted, but they will be different.
_________________
URC7560/URC7562, URC8910, URC7980, URC6440/OARUSB04G and URC3661
Back to top
View user's profile Send private message Visit poster's website
davecs



Joined: 28 Mar 2005
Posts: 328
Location: UK

                    
PostPosted: Sat Jul 01, 2023 2:48 pm    Post subject: Reply with quote

The theoretical solution was test whether using systemd-mount in Ubuntu fared any better than mount, but alas, it did not. It might have been a case of writing a script with an outline:

mkdir /media/REMOTE
if systemd is running
then systemd-mount /dev/etc
else mount /dev/etc

And umount is replaced by systemd-mount -u

Not sure why Ubuntu hates me so much, I think it might be returning my feelings. An hour with the Unity desktop is enough to put me off computers for life.

But Mint Linux is derived from Ubuntu but uses the friendlier Cinnamon desktop so I might replace the Ubuntu partition with that, and test again.

Then I realised that MX-Linux can be booted using systemd or the traditional sysV-init. I never use the systemd boot up and mounting the remote always worked for me. I tried the alternate systemd bootup and of course the remote didn't mount! I tried the solution you found, to copy that file and change PrivateMounts to no, rebooted to systemd and it worked!!

I'm going to overwrite Ubuntu with Mint and see how that behaves.
_________________
URC7560/URC7562, URC8910, URC7980, URC6440/OARUSB04G and URC3661
Back to top
View user's profile Send private message Visit poster's website
davecs



Joined: 28 Mar 2005
Posts: 328
Location: UK

                    
PostPosted: Sat Jul 01, 2023 3:32 pm    Post subject: Reply with quote

Exactly the same with Mint as with Ubuntu except that the user interface is far more to my liking. Even though I made that alteration in the file to PrivateMounts=no, it wouldn't mount the remote. And as for my other theory, neither would systemd-mount from udev. So that was a non-starter.

EDIT: Got it working in Mint!

I found another site which told me to remove a further line in system-udevd.service but I hashed it out as follows:

# SystemCallFilter=@system-service @module @raw-io bpf

Once I did this, after a reboot, my 6440 remote started mounting, though it also put up an error to say it was already mounted! But that's OK by me. But yes it becomes available when plugged in, and when removed unmounts though sometimes it wants a password to unmount. But it's working! I have no doubt that I needed to make the same second alteration in Ubuntu but please don't make me install it again!!
_________________
URC7560/URC7562, URC8910, URC7980, URC6440/OARUSB04G and URC3661


Last edited by davecs on Sat Jul 01, 2023 3:54 pm; edited 2 times in total
Back to top
View user's profile Send private message Visit poster's website
HamburgerHelper1



Joined: 22 Feb 2014
Posts: 574

                    
PostPosted: Sat Jul 01, 2023 3:47 pm    Post subject: Please test: improved Linux access to URC-6440+OARUSB04G Reply with quote

I use xubuntu with xfce and "Barfs" code From this thread http://www.hifi-remote.com/forums/viewtopic.php?t=102592&postdays=0&postorder=asc&&start=0
I do not use mount or unmount from command line I just click it in my file manager to mount.
I am surprised Barf has not commented

With the line
Code:
/dev/disk/by-id/usb-UEI_Remotes_UEI_Mass_Storage_000000000001-0:0-part1 /urc6440 vfat user,noauto,umask=0,nosuid,nodev,nofail,x-gvfs-show 0 0

in /etc/fstab you can mount it without root/sudo. Just
Code:
mount /urc6440

The directory in the second position can be any existing directory. Before removing the remote, do
Code:

umount /urc6440

otherwise the system might misbehave.

Tested with Fedora.
Back to top
View user's profile Send private message
davecs



Joined: 28 Mar 2005
Posts: 328
Location: UK

                    
PostPosted: Sat Jul 01, 2023 3:51 pm    Post subject: Re: Please test: improved Linux access to URC-6440+OARUSB04G Reply with quote

HamburgerHelper1 wrote:
I use xubuntu with xfce and "Barfs" code From this thread http://www.hifi-remote.com/forums/viewtopic.php?t=102592&postdays=0&postorder=asc&&start=0
I do not use mount or unmount from command line I just click it in my file manager to mount.
I am surprised Barf has not commented

With the line
Code:
/dev/disk/by-id/usb-UEI_Remotes_UEI_Mass_Storage_000000000001-0:0-part1 /urc6440 vfat user,noauto,umask=0,nosuid,nodev,nofail,x-gvfs-show 0 0

in /etc/fstab you can mount it without root/sudo. Just
Code:
mount /urc6440

The directory in the second position can be any existing directory. Before removing the remote, do
Code:

umount /urc6440

otherwise the system might misbehave.

Tested with Fedora.


You can do that. We were trying to make it automount on plugin with no further user interventions.
_________________
URC7560/URC7562, URC8910, URC7980, URC6440/OARUSB04G and URC3661
Back to top
View user's profile Send private message Visit poster's website
HamburgerHelper1



Joined: 22 Feb 2014
Posts: 574

                    
PostPosted: Sat Jul 01, 2023 4:11 pm    Post subject: Please test: improved Linux access to URC-6440+OARUSB04G Reply with quote

I think in xubuntu usb_modeswitch changes it to a serial device,instead of leaving it as a mass storage device
Not sure but as a mass storage device it might auto mount in xubuntu
Back to top
View user's profile Send private message
HamburgerHelper1



Joined: 22 Feb 2014
Posts: 574

                    
PostPosted: Sat Jul 01, 2023 5:02 pm    Post subject: Please test: improved Linux access to URC-6440+OARUSB04G Reply with quote

Further reading and testing of usb-modeswitch did not work for auto mounting
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic       JP1 Remotes Forum Index -> JP1 - General Forum All times are GMT - 5 Hours
Goto page Previous  1, 2, 3, 4  Next
Page 2 of 4

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 

Powered by phpBB © 2001, 2005 phpBB Group
Top 7 Advantages of Playing Online Slots The Evolution of Remote Control