Skip to main content
Topic: dinit for volumeicon? (Read 1205 times) previous topic - next topic
0 Members and 2 Guests are viewing this topic.

dinit for volumeicon?

https://gitea.artixlinux.org/packages/volumeicon

should it have a dinit?

Code: [Select]
/etc/dinit.d/user/$ sudo touch volumeicon 
sudo nano volumeicon

added

Code: [Select]
type            = process
command         = /usr/bin/volumeicon

Code: [Select]
dinitctl enable volumeicon
Service 'volumeicon' has been enabled.
Service 'volumeicon' started.

Code: [Select]
dinitctl list
[[+]     ] boot
[{+}     ] system
[{+}     ] dbus (pid: 886)
[{+}     ] pipewire (pid: 890)
[{+}     ] pipewire-pulse (pid: 892)
[{+}     ] wireplumber (pid: 891)
[     {X}] volumeicon (exit status: 1)

so that didn't work.

1) why not?
2) should volumeicon have a dinit?

Re: dinit for volumeicon?

Reply #1
If it crashes a service can be useful.
Otherwise you may just launch it.

Add a log in the service to see what's wrong.
Code: [Select]
logfile = $HOME/.local/state/dinit/volumeicon.log

You need to create the log folder if it does not exist.



Re: dinit for volumeicon?

Reply #4
Are you using startx to launch the GUI?
what gui? the applet shows in systray when it is running?
EDIT
moksha? I am using tuigreet. But I don't really know how moksha starts
/EDIT
are you saying I should not or cannot use turnstile?

Sorry for my ignorance

Re: dinit for volumeicon?

Reply #5
So moksha is the GUI.
There is a bug with startx https://forum.artixlinux.org/index.php/topic,6929.msg42122.html#msg42122 maybe tuigreet uses it.

If you need services that use the "display" at the moment you cannot use turnstile with startx.

Code: [Select]
I can't reproduce it by logging in through lxdm or lightdm (logging into openbox-session with picom enabled)
Thus it should work with those.


 

Re: dinit for volumeicon?

Reply #8
thank you for your reply.
I am aware how I could have this work, and thank you for the reminder.

I am asking how does one make it work with dinit? Or turnstile?

And this leads me to ask stupid things like if greetd should be launching dinit user services and dinit starts everything?

I guess that is not supported?? and moksha currently works a certain way  and upgrades will break that setup?

Does @davmac  know about the startx turnstile issue?

Should init handle login? Is this the path to pottering like madness?


Re: dinit for volumeicon?

Reply #10
lol
#chimera-linux
q66 (Ops) [email protected]> n00b: looks like an artix problem and my level of care about artix problems is very low so i will not check deeper

apparently Chimera Linux says that artix doesn't have graphical service support in turnstile.

So this answers why anything with graphics will be a problem, but works in Chimera

Thanks kiblaster

should I this to the wiki?

Re: dinit for volumeicon?

Reply #11
A warning about startx and services that need the DISPLAY var could be added in the wiki.

I was looking the dinit-service man page maybe adding to the service
Code: [Select]
env-file = $HOME/.config/dinit.d/environment
will work.

And of course you need to make the file.
Code: [Select]
 cat .config/dinit.d/environment 
DISPLAY=:0


Re: dinit for volumeicon?

Reply #13
I tested turnstile again and it does not well.
When I log out the old (user) dinit process it's there so no user services.
After disabling turnstile something kept spawning it so I rebooted.

I do not have elogind so I set in /etc/turnstile/turnstiled.conf
Code: [Select]
export_dbus_address = yes
Thus I think that that service does not have any sense here.

"env-file" works but "~" or "$HOME" do not work there while at least $HOME works in "command".

Since the file is near the service I can just use:
Code: [Select]
type = process
command = picom
logfile = $HOME/.local/state/dinit/picom.log
env-file = environment
restart = true

I have no dbus address set without turnstile but all works always.

Re: dinit for volumeicon?

Reply #14
@kiblaster 

Quote
I do not have elogind so I set in /etc/turnstile/turnstiled.conf

I think
Code: [Select]
export_dbus_address = yes
is there by default?

before I try and add this volumeicon service
Code: [Select]
dinitctl list
[[+]     ] boot
[{+}     ] system
[{+}     ] dbus (pid: 998)
[{+}     ] pipewire (pid: 1002)
[{+}     ] pipewire-pulse (pid: 1004)
[{+}     ] wireplumber (pid: 1003)

service file
Code: ($HOME/.local/state/dinit/volumeicon) [Select]
type = process
command = /usr/bin/volumeicon
logfile = $HOME/.local/state/dinit/volumeicon.log
env-file = enviroment
restart = true

Code: [Select]
dinitctl enable volumeicon
dinitctl: error loading service (or dependency of service).
dinitctl: try 'dinitcheck <service-name>' or check log for more information.

dinitcheck volumeicon
Checking service: volumeicon...
Service 'volumeicon': could not load environment file: No such file or directory
dinitcheck: Warning: Variable substitution performed by dinitcheck for file paths may not match dinit daemon (environment may differ); use --online to avoid this warning
Performing secondary checks...
Secondary checks complete.
One or more errors/warnings issued.

I cannot find a discussion of --online


Code: [Select]
cat ~/.config/dinit.d/enviroment
DISPLAY=:0