1
DF General Discussion / Re: Lazy Newb Pack Linux V0.40.05 with working Dwarf Therapist
« on: July 29, 2014, 02:36:43 am »
I had to use the following, using the full path to /sbin/getcap since /sbin isn't on my $PATH:
Code: [Select]
#!/bin/sh
LNP_DIR=$(dirname "$0")
cd "${LNP_DIR}"
#Check whether Dwarf Therapist can read from DF memory:
dt_capabilities=$(/sbin/getcap LNP/utilities/dwarf_therapist/DwarfTherapist |cut -f2 -d"=")
dt_capabilities=${dt_capabilities:=0}
if [ ${dt_capabilities} != "cap_sys_ptrace+eip" ]; then
msg="Enable Dwarf Therapist to read from Dwarf Fortress memory"
xterm -e "echo $msg;sudo setcap cap_sys_ptrace=eip LNP/utilities/dwarf_therapist/DwarfTherapist"
fi
#run Lazy Newb Pack
java -jar lazy-newbpack-gui-0.5.3-SNAPSHOT.jar
.
.