Running Squeak in Linux without root access

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Running Squeak in Linux without root access

Nicola Mingotti
Hi,

I just tried to run Squeak on a server where I don't have root access.

I made a patch, in case somebody else need it, it is very short, file paste is at the bottom.

Procedure:
1] Download Squeak for Linux 5.2b (x64) from here: https://squeak.org/downloads/
2] Unzip
3] Enter into the Squeak5.2-18229-64bit-201810190412-Linux directory
4] create file called squeak-non-root.patch and copy/paste into it what is at the bottom.
5] Run this commands:
$> cp squeak.sh squeak-original.sh
$> patch squeak.sh < squeak-non-root.patch
$> ./squeak.sh
(create the squeak.conf file locally)
$> ./squeak.sh
(finally run squeak)

This was tested in a Linux server of type:
$> cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.6 (Maipo)


bye
Nicola


---------- squeak-non-root.patch ---------------
--- squeak.sh   2019-08-06 18:10:53.506682095 -0700
+++ squeak-new.sh       2019-08-06 18:15:25.078089873 -0700
@@ -10,7 +10,8 @@
 ROOT=$(dirname "${DIR}") #obtain dir of the resolved path
 VM="${ROOT}/bin/squeak"
 RESOURCES="${ROOT}/shared"
-CONF_FILE="/etc/security/limits.d/squeak.conf"
+# CONF_FILE="/etc/security/limits.d/squeak.conf"
+CONF_FILE="${ROOT}/shared/squeak.conf"
 IMAGE=$*
 
 showerror() {
@@ -52,15 +53,17 @@
 ensure_conf_file() {
   local user_input
   if ! [[ -f "${CONF_FILE}" ]]; then
-    read -p "${CONF_FILE} is missing. Do you want to create one?
-This operation requires sudo permissions. (y/N): " user_input
+    read -p "${CONF_FILE} is missing.
+Do you want to create one? (y/N): " user_input
     if [[ "${user_input}" = "y" ]]; then
-      echo "You may be asked to enter your password..."
-      sudo tee -a "${CONF_FILE}" > /dev/null <<END
+      # echo "You may be asked to enter your password..."
+      # sudo tee -a "${CONF_FILE}" > /dev/null <<END
+      tee -a "${CONF_FILE}" > /dev/null <<END
 *       hard    rtprio  2
 *       soft    rtprio  2
 END
-      echo "Done! Please log out and log back in before you try again."
+      # echo "Done! Please log out and log back in before you try again."
+      echo "Done!"
     else
------------------------------------------------


_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners