Global installation of St Terminal in different qubes

I would like to install a self-compiled St-Terminal in all my existing qubes (so not the package stterm). The compiled Terminal works in Dom0, so no compilation error. So I tried with Salt to install the terminal globally in different qubes, but did not succeed until now:

So I copy the compiled files (in my case st, st-copyout, st-urlhandler) in a new directory in /srv/salt/st.

In the same directory I created a *.top-file: st.top

base:
   '*':
     - st.st

Again in the same directory I created a state-file: st.sls

/usr/local/bin/st:
          file.managed:
                  - source: salt://st/st

/usr/local/bin/st-copyout:
          file.managed:
                  - source: salt://st/st-copyout

/usr/local/bin/st-urlhandler:
          file.managed:
                  - source: salt://st/st-urlhandler

I run it with

qubesctl --skip-dom0 --targets=TARGET_LIST

When I open the Target, the files appear in the directory: /usr/local/bin, but still gnome terminal is starting.

Is it the wrong approach with salt? Where is the hook?

If I’ve read this correctly, all you’ve told it to do is put the files on the target. Which it did do.

That doesn’t change what the default editor for the qube is, that’s a totally different bunch of settings that you’d have to also write salt for. (And I’ll be honest, I can’t follow the tangled mess that is the way defaults are set nowadays, nor do I understand salt, so I can’t tell you exactly what to do.)

When I run st in my /usr/local/bin-folder, then the terminal opens. So I tried to add it to the applicationmanager. But still not working.

I created a *.desktopfile in my /st-folder called st.desktop:

[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Name=st
GenericName=Simple Terminal
Exec=/usr/local/bin/st

And I added in the end of my st.sls the last 3 lines:

/usr/local/bin/st:
          file.managed:
                  - source: salt://st/st

/usr/local/bin/st-copyout:
          file.managed:
                  - source: salt://st/st-copyout

/usr/local/bin/st-urlhandler:
          file.managed:
                  - source: salt://st/st-urlhandler

/usr/share/applications/st.desktop:
       file.managed:
                 - source: salt://st/st.desktop

Then (correct code this time):

qubesctl --skip-dom0 --targets=TARGET_LIST state.apply st.st

As a target I choosed the template and the appVM. The files appear in the folders, but the Application is not appearing in the qmenu.

Any idea?

Ok, I got it. Beginner-mistake: install the above first in the templates, then
qvm-sync-appmenus [QUBE]
Thats it…