Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: pre installed linux pack with meph's tileset (no starter)  (Read 955 times)

cythev

  • Bay Watcher
    • View Profile
pre installed linux pack with meph's tileset (no starter)
« on: April 11, 2020, 05:51:52 am »

Hi all,
I couldn't find any linux mephpack, so I made my own:
https://cythev.ddns.net/df_meph_linux.7z

It's based on v. 47.04 beta

It has no starter, but DFHack, TWBT and meph's beuatiful tileset (full version) are preinstalled.
Dwarf Therapist must be startet as su to be able to write to a different program's allocated memory

To start simply call the dfhack executeable...

so long...
cy
Logged

Clément

  • Bay Watcher
    • View Profile
Re: pre installed linux pack with meph's tileset (no starter)
« Reply #1 on: April 11, 2020, 06:26:33 am »

Dwarf Therapist must be startet as su to be able to write to a different program's allocated memory

No, don't run DT as root. Use this script on the DF directory to patch it.
Logged

cythev

  • Bay Watcher
    • View Profile
Re: pre installed linux pack with meph's tileset (no starter)
« Reply #2 on: April 11, 2020, 07:49:34 am »

thanks for the info.

The script looks pretty complicated. Do you know how it works?
« Last Edit: April 11, 2020, 07:52:55 am by cythev »
Logged

Clément

  • Bay Watcher
    • View Profile
Re: pre installed linux pack with meph's tileset (no starter)
« Reply #3 on: April 11, 2020, 08:45:15 am »

Simply pass the df path to the script: "./patch_df_ptracer /path/to/df/"

If you want to redo manually what the script do:

Compile the following C program (for example in set_ptracer_any.c):
Code: [Select]
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <sys/prctl.h>

void set_ptracer_any() __attribute__((constructor));

void set_ptracer_any()
{
if (-1 == prctl(PR_SET_PTRACER, PR_SET_PTRACER_ANY, 0, 0, 0))
perror("prctl");
}
as a library
Code: [Select]
gcc -fPIC -shared set_ptracer_any.c -o "/path/to/df/set_ptracer_any.so"
Modify the launcher script to preload the library. For DFHack you need to use PRELOAD_LIB, otherwise you need to use LD_PRELOAD directly.

The preloaded library will allow anyone (for example DT) to access DF memory. The alternative is to give extra permissions to DT but it requires an installer script to be run as root each time DT is updated. It is easier if pack creators use the former.
Logged