OH 1.8 Startup as Different User (due to Mint pulseaudio sink/user)

I am running OH on the same Linux Mint machine that is my multimedia server, music, video, internet,YouTube etc.

How to I change the user to run OH on startup? ( I have used sudo apt-get install openhab-runtime to install)

Why?
I am trying to control the volume(e.g. mute) in Linux Mint with an HDMI Output. I have to use a command for example to mute, pactl set-sink-mute 0 toggle. Since the OH executes/runs scripts as a different user, the OH users does not have access to the specific “sink” i.e. example above “0” to control.
The only solution I see is to run OH as the same user I’m using to log in and using Audio.

Anyone else tried controlling Volume of pulseuadio (linux Mint)?

Can root access it? If yes you can add the openhab user to sudoers and have OH run that above command using sudo.

You can research what file that “0” represents and check it’s permissions. It might be as easy as adding the openhab user to the right group.

If Mint is running systemd, I think the file where the user is specified is /etc/systemd/system/openhab2.service. There should be a User=openhab field in that file. However, note that changing the user that OH runs as will likely cause all sorts of permission problems that will be a challenge to solve, and your change will be wiped out every time you update. So I would only do this as a last resort.