03-06-2015 10:51 AM
I am trying to install a touch screen driver on the machine, but when I run
sh setup.sh
I get
(I) Check user permission: admin, you are NOT the supervisor.
(E) The root permission is reuquired to run this installer
I am not sure how to install this driver.
03-06-2015 11:27 AM
[Edit: see replies below.]
It sounds like you're using the local terminal on a cRIO-903x with the display enabled (if not, please clarify your environment). That terminal logs into "lvuser" by default, which is not a superuser. You can use the "su" utility to become a superuser. On NI Linux RT we normally use the "admin" user for this, so "su admin". The password is configured through the web interface as noted in your manual (see "Setting a System Password"). Once you're logged in as "admin", try your setup script again.
03-06-2015 11:56 AM
Hello again, LJHerskowitz!
Can you point us to the touchscreen driver you're using? I have a feeling that it is an issue with the script itself due to the following:
LJHerskowitz wrote:
...
I get
(I) Check user permission: admin, you are NOT the supervisor.
(E) The root permission is reuquired to run this installer
I am not sure how to install this driver.
(emphasis added)
03-06-2015 11:59 AM
Good eye Brad. Sounds like the script doesn't think "admin" is a superuser (even though it is). Might require some small change to the script itself.
03-06-2015 12:16 PM
Here is the site I got the driver off of
http://home.eeti.com.tw/LinuxDriverDownload.html
It is from eGalax which is I'm guessing pretty popular.
I did sign in as the admin using su admin.
So what do you guys suggest?
03-06-2015 12:35 PM
Downloading the installer, I see the issue:
CheckPermission() {
echo -n "(I) Check user permission:"
account=`whoami`
if [ ${account} = "root" ]; then
echo " ${account}, you are the supervisor."
else
echo " ${account}, you are NOT the supervisor."
echo "(E) The root permission is required to run this installer."
echo ""
exit 1
fi
}
Basically, it's checking specifically for the root username. You can either change this to something like
if [ "${account}" = "root" -o "${account}" = "admin" ]; then
or (preferably)
if [ `id -u` -ne 0 ]; then
Make sure to put spaces between the square brackets and the code within. Basically, the root and admin users both have user ID 0, so we're checking for either the root or admin users. Either by either account name or by the UID of the running user.
03-06-2015 02:41 PM
I tried both ways, and I kept getting the same error. Here is my last edit.
if [ `id -u` -ne 0 ]; then
03-06-2015 02:49 PM
The first option should work. The second, I made a silly mistake and it should be
if [ `id -u` -eq 0 ]; then
03-06-2015 03:10 PM
If this is a one-off installation can I suggest a more pragmatic approach? Remove the test in CheckPermission() entirely - you already know you're running as root/admin, the test in the script is just getting in the way.
03-06-2015 03:16 PM
Always trying to ruin the fun by being practical