How to use init services with silverblue?

Hi,
I was trying to install 3d software called Houdini, it is a production based vfx software, It used to install services in init.d while I was using other linux, but I was not able to locate the folder in silverblue edition. Then, I try to search about and I found out that it uses systemd services, I am just curious, where would the installation will save those files in silverblue ? and how can we manage such services with silverblue ? or is it too soon to use it as workstation, and its not developed for normal users but developers.
I really like the systemctl method of silverblue and it is really important when you wish to have stable system.
any solutions for that ?
thank you.

I don’t know the specifics of Houdini, but there’s no real reason why this wouldn’t work. For instance, you can run systemd services unprivileged as your regular user, which is often the best way to do it with gui apps, anyway. Place the service file in ~/.config/systemd/user and enable with systemctl --user enable --now example.service.

This is a hypothetical solution. I don’t know Houdini at all, so it could be way off.

Houdini installs few files in /usr/lib directory and in silverblue, it is not writable. those library contains the license flies which is being used for houdini license manager. I am not sure, how can I find a way around for it. Maybe I have to stick with fedora workstation instead of silverblue

Pretty sure you can solve this without changing distro. Are you installing it as a layered rpm package? Have you searched for the systemd service file (with find or whatever) to see if it actually got installed? If it’s there, you can enable it with systemctl.

If not, can you install Houdini as regular user somehow? And then copy the service file to the directory I specified above?

I just noticed that it creates a file with /usr/lib/sesi folders which contains all other files and data which require houdini license server to run, On Silverblue, it is not creating any directory over there. I guess I have to manually put such files to some other location and update the service file with updated file to make it run. I am not sure, if it will work or not. But I will give it a try.
Any other way, that anyone might suggest for this ?

But how are you installing it? We need more to go on. If it’s from an rpm file or dnf repo, you can probably just layer it with rpm-ostree. If it’s a different installation method, you should try to run it as user if the script allows it. If not, then manually putting the service file in a place systemd will find it and then enabling it could work. But it all depends.

It comes up with its own .install file, It is provided with the setup.
https://www.sidefx.com/download/houdini-for-linux/
I just opened the service init.d files and I find out something that it try to use init-functions and it require the /etc/init.d link with that service

#!/bin/sh

BEGIN INIT INFO

Provides: sesinetd

Required-Start: $local_fs $network

Required-Stop:

Should-Start:

Default-Start: 2 3 4 5

Default-Stop: 0 1 6

Short-Description: Script to start and stop the Houdini License Manager

Description:

END INIT INFO

Start/Stop Houdini License Manager

Linux:

This script goes in the appropriate init.d directory with symlinks

called S89sesinetd in /etc/rc[2345].d and K89sesinetd in /etc/rc[S016].d

SESI=/usr/lib/sesi # Directory where sesinetd is installed
SESINETD={SESI}/sesinetd # Name of sesinetd executable to run SESICTRL={SESI}/sesictrl # Name of sesictrl executable to run
SESINETD_START=${SESI}/sesinetd_safe # Script to start sesinetd

Location of options files, leave empty to automatically determine this.

Default: ${SESI}/sesinetd.options

OPTIONS_FILE=

Additional options specified on top of those specified in $OPTIONS_FILE

OPTIONS_EXTRA=

Name of log file, leave empty to automatically this.

Default: /var/log/sesinetd.log

LOG_FILE=

Location of directory to store pid file

This is used to determine if sesinetd has already started, and if so, its

process id. Leave this empty to be automatically determine this.

Default: /var/run if it exists, otherwise to $SESI

PID_DIR=

HOST=hostname -s
DEBUG=0 # Set to 1 to debug this script

Load LSB init functions

if [ -f /lib/lsb/init-functions ]; then
. /lib/lsb/init-functions
fi

pidofsesinetd() {
pid=ps -C "sesinetd" -o pid,command | grep -v '/bin/sh' | tail -1 | awk '{print $1}'
if [ “$pid” != “PID” ]; then
echo $pid
return 0
else
return 1
fi
}

Provide our own versions if not defined already

if ! type log_daemon_msg > /dev/null 2>&1; then
log_daemon_msg() {
echo -n $1
}
fi

if ! type log_end_msg > /dev/null 2>&1; then
log_end_msg() {
if [ “$1” = “0” ]; then
echo “.”
else
echo " FAILED"
fi
}
fi

if ! type log_action_msg > /dev/null 2>&1; then
log_action_msg() {
echo “$@.”
}
fi

Check whether installation directory is correct

if [ ! -d “$SESI” ]; then
echo “Error: Directory ‘$SESI’ does not exist.”
exit 1
fi
if [ ! -x “$SESINETD” ]; then
echo “Error: File ‘$SESINETD’ does not exist or is not executable.”
exit 1
fi
if [ ! -x “$SESINETD_START” ]; then
echo “Error: File ‘$SESINETD_START’ does not exist or is not executable.”
exit 1
fi
if [ ! -x “$SESICTRL” ]; then
echo “Error: File ‘$SESICTRL’ does not exist or is not executable.”
exit 1
fi

Determine OPTIONS_FILE if empty

if [ -z "OPTIONS_FILE" ]; then OPTIONS_FILE={SESI}/sesinetd.options
fi

Create user specified OPTIONS

OPTIONS=
if [ -r “$OPTIONS_FILE” ]; then
OPTIONS="$OPTIONS "cat $OPTIONS_FILE
fi
OPTIONS="$OPTIONS $OPTIONS_EXTRA"
if [ $DEBUG -eq 1 ]; then
OPTIONS="$OPTIONS --debug"
fi

Determine LOG_FILE if empty

if [ -z “$LOG_FILE” ]; then
LOG_FILE=/var/log/sesinetd.log
fi

Determine PID_FILE

if [ -z “$PID_DIR” ]; then
if [ -d /var/run ]; then
PID_DIR=/var/run
else
PID_DIR=$SESI
fi
fi

PID_FILE=${PID_DIR}/sesinetd.pid
if [ DEBUG -eq 1 ]; then echo SESI={SESI}
echo SESINETD={SESINETD} echo SESINETD_START={SESINETD_START}
echo SESICTRL={SESICTRL} echo OPTIONS_FILE={OPTIONS_FILE}
echo OPTIONS={OPTIONS} echo LOG_FILE={LOG_FILE}
echo PID_DIR={PID_DIR} echo PID_FILE={PID_FILE}
fi

start_sesinetd() {
$SESINETD_START --sesi=$SESI --sesinetd=$SESINETD --log-file=$LOG_FILE --pid-file=$PID_FILE $OPTIONS &
# Wait for 20 seconds to start
for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20; do
sleep 1
if [ -f $PID_FILE ]; then
return 0
fi
done
return 1
}

stop_sesinetd() {
# Try for 20 seconds to stop
for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20; do
if [ -f $PID_FILE ]; then
rm -f $PID_FILE
fi
pid=pidofsesinetd
if [ -z “$pid” ]; then
return 0
fi
$SESICTRL -h 127.0.0.1 -Q
sleep 1
done
return 1
}

case “$1” in
start)
log_daemon_msg “Starting Houdini License server” “sesinetd”
if start_sesinetd; then
log_end_msg 0
else
log_end_msg 1
fi
;;

stop)
    log_daemon_msg "Stopping Houdini License server" "sesinetd"
    if stop_sesinetd; then
        log_end_msg 0
    else
        log_end_msg 1
    fi
    ;;

restart|force-reload)
    log_daemon_msg "Stopping Houdini License server" "sesinetd"
    if ! stop_sesinetd; then
        log_end_msg 1
        exit 0
    else
        log_end_msg 0
    fi

    log_daemon_msg "Starting Houdini License server" "sesinetd"
    if start_sesinetd; then
        log_end_msg 0
    else
        log_end_msg 1
    fi
    ;;

*)
    log_action_msg "Usage: /etc/init.d/sesinetd {start|stop|restart|force-reload}"
    exit 1

esac

exit 0

I think this is the problem, it requires init-functions to operate. I was thinking to modify this service and give it custom path for sesi library, but I am not sure if it will have some work around

I can modify these path by copying the required files from installation directory, but I guess. I am not comfortable with systemd service management that much.

If it tries to create this on Silverblue it will fail due to that being part of the immutable location on SB. Writable areas are /etc and /var unless you use rpm-ostree ex livefs to make the OS live, but this is experimental and does not track the change so you would need to do it after every update.

Hello! Sorry for the bad english, this is not my native language. I have encountered a problem running Houdini on Fedora Silverblue and would like to share the solution with you. I also couldn’t install Houdini first because the installer wants to write the files to the / usr / lib / folder which is read-only in Silverblue. I decided to try installing Houdini in the toolbox and I had some problems, but it worked. I had to install additional packages for the installer in the toolbox, and the license server did not start automatically, I had to start it manually, and generate keys on the sideFX website. The program has started. I did not work in the program itself, since my goal was just to check the possibility of running the program, so I don’t know what problems could be due to the use in the toolbox. I hope this information will help you. Good luck! :slightly_smiling_face:

Hi, Thank you for testing it out, but I did not wanted to spend more time in configuring the software and make it run so I switched back to fedora workstation, It is going well.
But I will try it in future someday, As I really admire the immutable system concept, which is really good. :slight_smile:
Can you share some more information as how did you manage to install in toolbox as I am kind of new with toolbox concept ?

Hello, icreatefx! I will try to describe my experience of installing Houdini in Fedora Silverblue with help of the toolbox. English is not my native language and I used google translate, sorry if there are translation errors .

My config: Fedora Silverblue 32, Kernel: 5.8.13-200.fc32.x86_64, CPU: Intel Xeon E3-1230, GPU: NVIDIA GeForce GTX 760.

Steps:

  1. Create a container from the terminal (in this case, named “HOHOHO” ^_^) and go inside this container. Inside the container I am updating via dnf
toolbox create HOHOHO
toolbox enter HOHOHO
sudo dnf update -y
  1. I have an Nvidia video card, I don’t leave from HOHOHO container and continue to work in it, install drivers from the RPM-fusion repository.
sudo dnf install https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm -y; sudo dnf install https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm -y; sudo dnf install akmod-nvidia -y; sudo dnf install xorg-x11-drv-nvidia-cuda -y
  1. Install dependencies like this:
sudo dnf install nss-3.51.0-1.fc32.x86_64 -y; sudo dnf install libXcomposite-0.4.5-2.fc32.x86_64 -y; sudo dnf install libXcursor-1.2.0-2.fc32.x86_64 -y; sudo dnf install mesa-libGLU-devel-9.0.1-2.fc32.x86_64 -y; sudo dnf install libXtst-1.2.3-11.fc32.x86_64 -y; sudo dnf install libXScrnSaver-1.2.3-5.fc32.x86_64 -y; sudo dnf install pciutils-libs-3.6.4-1.fc32.x86_64 -y; sudo dnf install alsa-lib-1.2.2-2.fc32.x86_64 -y; sudo dnf install libnsl-2.31-2.fc32.x86_64 -y; sudo dnf install libSM-1.2.3-5.fc32.x86_64 -y; sudo dnf install fontconfig-2.13.92-8.fc32.x86_64 -y; sudo dnf install qt5-qtbase-gui-5.13.2-4.fc32.x86_64 -y
  1. Install Houdini (I first downloaded the program from the Houdini website to the Downloads folder). In the process, I additionally chose “[3] enable Symlinks in / usr / local / bin” and ‘F’
cd ~/Downloads/houdini
sudo ./houdini.install
  1. Go to the folder with Houdini installed, I can start Houdini without writing the path to the file, by the command “houdini”, and start Houdini (in the process, non-commercial license keys are generated) if i run this commands:
cd /opt/hfs18.0
source houdini_setup
houdini
  1. The program starts. But the license server won’t always start automatically, after the installation the server started up and therefore the program started. In addition, it’s inconvenient to always enter the toolbox via the command toolbox enter HOHOHO, it’s more convenient to launch it with one Houdini command, which would include starting the license server manually and launching the command from the container without entering it. To exit from the container, type exit, and write this command:
toolbox run --container HOHOHO sudo /etc/rc.d/init.d/sesinetd start ; toolbox run --container HOHOHO houdini

Before sending this message, I checked all the commands in the new container, and everything works for me. Fedora Workstation also has toolbox, if I’m not mistaken, you can test the container installation from your current system via toolbox.

Good luck! Hope this helps! :wink:
PS: I made video demo of process

hey @inclusar. that is really great. thank you for this step by step guide. I would definitely give it a try, thank you so much. much appreciate it :slight_smile:

1 Like