First, this is a really terrible method, but I could run acroread9 on FreeBSD 8.1 without errors, so I just want to share it.
When you run acroread9, you will see it terminate with the following error message:
However, if you run as root, you won't see it.
According to http://www.eecis.udel.edu/~bmiller/blog/, this is due to missing privilege in 'proc_priocntl'.
I actually don't know what it is, but understood that acroread9 required a sort of special permission or something.
Then, I setuid'ed /usr/local/Adobe/Reader9/ENU/Adobe/Reader9/Reader/intellinux/bin/acroread, which is a binary program of acroread.
However, I got
Since acroread9 uses GTK and GTK hates setuid and setgid, it won't start.
After a short break, I tried sudo.
Then, I visudo'ed and added the following lines.
XXXX is your user name.
I started up acroread9 with
BUT acroread9 still complains:
I'm getting to hate this guy, but continued to find a solution.
I found that a sh script /usr/local/Adobe/Reader9/ENU/Adobe/Reader9/bin/acroread output the message, so I just commented out the following lines in it:
The output error message was mild but they really don't wanna users to use sudo.
Anyway, I typed
again and acroread9 finally started up!
But this is a really horrible way and we need a smarter solution for it.
If you have a better solution, please tell me.
When you run acroread9, you will see it terminate with the following error message:
Code:
terminate called after throwing an instance of 'RSException'
However, if you run as root, you won't see it.
According to http://www.eecis.udel.edu/~bmiller/blog/, this is due to missing privilege in 'proc_priocntl'.
I actually don't know what it is, but understood that acroread9 required a sort of special permission or something.
Then, I setuid'ed /usr/local/Adobe/Reader9/ENU/Adobe/Reader9/Reader/intellinux/bin/acroread, which is a binary program of acroread.
However, I got
Code:
This is not a supported use of GTK+. You must create a helper
program instead. For further details, see:
[url]http://www.gtk.org/setuid.html[/url]
Refusing to initialize GTK+.
Since acroread9 uses GTK and GTK hates setuid and setgid, it won't start.
After a short break, I tried sudo.
Code:
# cd /usr/ports/security/sudo
# make install
Code:
# visudo
XXXX ALL=(root) NOPASSWD: /usr/local/Adobe/Reader9/ENU/Adobe/Reader9/Reader/intellinux/bin/acroread
XXXX ALL=(root) NOPASSWD: /usr/local/bin/acroread
XXXX ALL=(root) NOPASSWD: /usr/local/Adobe/Reader9/ENU/Adobe/Reader9/bin
XXXX is your user name.
I started up acroread9 with
Code:
% sudo -u root acroread
BUT acroread9 still complains:
Code:
Adobe Reader does not need to be run as a privileged user. Please remove 'sudo' from the beginning of the command.
I'm getting to hate this guy, but continued to find a solution.
I found that a sh script /usr/local/Adobe/Reader9/ENU/Adobe/Reader9/bin/acroread output the message, so I just commented out the following lines in it:
Code:
# Do not allow launch using 'sudo'.
#if [ "${ACRO_ALLOW_SUDO+set}" != "set" -a \( "${SUDO_USER+set}" = "set" -o "${SUDO_UID+set}" = "set" -o "${SUDO_GID}" = "set" \) ]; then
# printf "%s\n" "Adobe Reader does not need to be run as a privileged user. Please remove 'sudo' from the beginning of the command."
# exit 1
#fi
The output error message was mild but they really don't wanna users to use sudo.
Anyway, I typed
Code:
% sudo -u root acroread
again and acroread9 finally started up!
But this is a really horrible way and we need a smarter solution for it.
If you have a better solution, please tell me.