The officially official Devuan Forum!

You are not logged in.

#1 2025-02-01 12:50:10

unixuser
Member
Registered: 2024-09-13
Posts: 14  

.xinitrc like in wayland ?

Hi there,

I'm asking here because I think you guys are the most qualified to answer...

On x11, I used to startx with .bash_profile, then start the wm with the .xinitrc (and start some others stuff at startup), but I wonder what is the right procedure for wayland ?
ATM I start my wm (sway) into the .bash_profile and startup programs into .config/sway/config... But I don't like have startup programs into this file.
I wonder how you guys do ?

Thx and HF guys

Last edited by unixuser (2025-02-01 12:50:58)

Offline

#2 2025-02-02 04:14:02

zapper
Member
Registered: 2017-05-29
Posts: 990  

Re: .xinitrc like in wayland ?

I don't think this works at all in wayland unless they deliberately left this option in for wayland.

Btw, fun fact, there is also sx which is like startx but requires and provides less.

Its basically a suckless startx.  I don't know the specifics, but on hyperbola, I don't need anymore  functionality than that has.
Also, I tried startx on devuan a few times, it worked up until like 5 months ago. Weird it is.


Freedom is never more than one generation away from extinction. Feelings are not facts
If you wish to be humbled, try to exalt yourself long term  If you wish to be exalted, try to humble yourself long term
Favourite operating systems: Hyperbola Devuan OpenBSD
Peace Be With us All!

Offline

#3 2025-02-02 13:49:21

unixuser
Member
Registered: 2024-09-13
Posts: 14  

Re: .xinitrc like in wayland ?

yes looks like there is an automatic "startx" after login, then I start WM with :

[ "$(tty)" = "/dev/tty1" ] && exec dbus-run-session sway

Into .bash_profile

And start programs into WM's config but I don't like it...

Offline

#4 2025-02-06 06:33:35

EDX-0
Member
Registered: 2020-12-12
Posts: 103  

Re: .xinitrc like in wayland ?

you could give this thing i made a shot, it was originally made with the x11 achitecture in mind but it is written in pure posix shell and should be flexible enough to work with wayland, tho i still got to add some more stuff to differentiate the managed daemons in groups other than the current session service group

https://github.com/eylles/shed

Offline

#5 2025-02-09 20:41:38

recklessswing
Member
From: Türkiye
Registered: 2020-12-18
Posts: 112  

Re: .xinitrc like in wayland ?

Are you possibly doing this for running pipewire in Wayland? I couldn't make it work on wayland so.

Offline

#6 Yesterday 00:29:07

RedGreen925
Member
Registered: 2024-12-07
Posts: 69  

Re: .xinitrc like in wayland ?

Are you possibly doing this for running pipewire in Wayland? I couldn't make it work on wayland so.

Not that I use it as it kills off my mouse button mapping I use but it does work in an autostart script I made the .xsessionrc into on my KDE desktop.

zeus@9600k:~$ cat bin/pipewire_start.sh
#!/bin/bash

# Added to start pipewire on login to desktop
# https://dev1galaxy.org/viewtopic.php?id=5867
# was the ~/.xsessionrc -rw-rw-r-- permissions
# now ~/bin/pipewire_start.sh executable permissions
# as bash script loaded from KDE autostart in System Settings

# kill any existing pipewire instance to restore sound
pkill -u "$USER" -fx /usr/bin/pipewire-pulse 1>/dev/null 2>&1
pkill -u "$USER" -fx /usr/bin/wireplumber 1>/dev/null 2>&1
pkill -u "$USER" -fx /usr/bin/pipewire 1>/dev/null 2>&1

exec /usr/bin/pipewire &

# wait for pipewire to start before attempting to start related daemons
while [ "$(pgrep -f /usr/bin/pipewire)" = "" ] ; do
   sleep 1
done

# start wireplumber
exec /usr/bin/wireplumber &

# start pipewire-pulse
exec /usr/bin/pipewire-pulse &

Edit: I think others desktops have a similar feature to do the same.

Last edited by RedGreen925 (Yesterday 00:31:48)

Offline

Board footer