Posted: Sun Jul 02, 2023 12:32 pm
Can you please suggest the changes you think I should make, as I don't know how to incorporate what you say into my instructions or shell script.
Forum for JP1 remotes
http://www.hifi-remote.com/forums/
Thank goodness for that! I have tried your earlier suggestion and was about to give you my comments. Here they are anyway, so you will see why I say "thank goodness"davecs wrote:Sorry Graham, there's an easier way.
Instead of running "sh Linux6440fix.sh", you run "sudo sh Linux6440fix.sh" or "su -c sh Linux6440fix.sh", depending on your distro. You will be asked for a password.
I have tested the new way and it works. I will amend my amended instructions to use this.Many thanks. I have changed the instructions and deleted the occurrences of "sudo" from the shell script. I have tested it by first deleting the root files that the script creates, then doing "sudo su" followed by running the script.
It worked, but I found a few things rather off-putting. One was that I was not sure what "sudo su" had done. It gave what I now know was a prompt, but it looked so different from the normal one and ending in # rather than $, that it was not obvious to me that it was a prompt. It was also not clear how to get back to me as user after running the script. I found that "su graham" did the trick, presumably su plus username, but I had to look that up.
It was also more difficult to change the current directory after doing "sudo su" as it needed the full path from root given whereas normally "~" refers to the user's home directory. I suppose I could use ".." to move backwards to a suitable starting point, but I found it better to change it to URC6440_OARUSB04G_LinuxSupport before doing "sudo su" as that does not change the current directory.
Because of these findings, I have slightly changed your suggested replacement text to
Code: Select all
You will need to run it from a root terminal. To get a root terminal, open a terminal and set URC6440_OARUSB04G_LinuxSupport as the current directory. Then, depending on the version of Linux you are using, enter one of the following lines: sudo su su The first of these may take you straight to a root terminal, or it may prompt you for your own password. With the second, you will be prompted for the root password. In either case the current directory should still be URC6440_OARUSB04G_LinuxSupport. Finally run the command "sh Linux6440fix.sh" to do the necessary copying. You should then be able to change back from a root terminal to your normal user terminal with the command "su <username>" where <username> should be replaced by your username.
From "To run it from the terminal" to the end of the paragraph should read:mathdon wrote:Thank goodness for that! I have tried your earlier suggestion and was about to give you my comments. Here they are anyway, so you will see why I say "thank goodness"davecs wrote:Sorry Graham, there's an easier way.
Instead of running "sh Linux6440fix.sh", you run "sudo sh Linux6440fix.sh" or "su -c sh Linux6440fix.sh", depending on your distro. You will be asked for a password..
I have tested the new way and it works. I will amend my amended instructions to use this.Many thanks. I have changed the instructions and deleted the occurrences of "sudo" from the shell script. I have tested it by first deleting the root files that the script creates, then doing "sudo su" followed by running the script.
It worked, but I found a few things rather off-putting. One was that I was not sure what "sudo su" had done. It gave what I now know was a prompt, but it looked so different from the normal one and ending in # rather than $, that it was not obvious to me that it was a prompt. It was also not clear how to get back to me as user after running the script. I found that "su graham" did the trick, presumably su plus username, but I had to look that up.
It was also more difficult to change the current directory after doing "sudo su" as it needed the full path from root given whereas normally "~" refers to the user's home directory. I suppose I could use ".." to move backwards to a suitable starting point, but I found it better to change it to URC6440_OARUSB04G_LinuxSupport before doing "sudo su" as that does not change the current directory.
Because of these findings, I have slightly changed your suggested replacement text to
Code: Select all
You will need to run it from a root terminal. To get a root terminal, open a terminal and set URC6440_OARUSB04G_LinuxSupport as the current directory. Then, depending on the version of Linux you are using, enter one of the following lines: sudo su su The first of these may take you straight to a root terminal, or it may prompt you for your own password. With the second, you will be prompted for the root password. In either case the current directory should still be URC6440_OARUSB04G_LinuxSupport. Finally run the command "sh Linux6440fix.sh" to do the necessary copying. You should then be able to change back from a root terminal to your normal user terminal with the command "su <username>" where <username> should be replaced by your username.
Yes, I had already done that in testing your previous method. I have made your latest change to the instructions and done final testing, so I have taken it that we are agreed all is well and have released RMIR v3.0.1. Many thanks for all your help with this.davecs wrote:You also need to remove all instances of "sudo" in the script.
We did each other a favour. We both learnt a bit about strange udev behaviours under systemd, especially me, as I've been avoiding operating systems that use it. You learned that not all systems use sudo to carry out admin tasks, but instead require proper root access. I also realised that su -c is a viable alternative to sudo if it's just one command (as you have to put the root password in every time) I used to just do su > password > command(s) > exit without really thinking, but the need to simplify the instructions for a reader made me think about it.mathdon wrote: Yes, I had already done that in testing your previous method. I have made your latest change to the instructions and done final testing, so I have taken it that we are agreed all is well and have released RMIR v3.0.1. Many thanks for all your help with this.
I agree absolutely! I also believe you were right to include the Manual method in the Wiki as a fallback, in view of the variants in systemd that we have already seen. If it is changed still further in a way that prevents the Automatic method from working, and we can't resolve it, then I think that is the time to add something about the Manual method into RMIR. For the time being, at least, I prefer to leave that out.davecs wrote:So I reckon we've both gained a lot of knowledge!