I have been using sway (basically i3 for Wayland) instead of a traditional desktop environment because it really makes a difference in my laptops performance.

But apparently sway ignores .desktop files which was how i was autostarting things on KDE.

Is the best way to handle this by going through the sway config? If not, how would you do it.

Bonus points if you can tell me how to get the autostart programs to also open in specific workspaces.

2 points

What are you trying to run? Could you add it to bashrc?

permalink
report
reply
1 point

I want my terminal to start on workspace one. Since this is default behavior of adding ‘exec <program>’ to my sway config, this requirement is satisfied. I also want Firefox to start up on workspace 2. And I would like another terminal to open on workspace 10, but to automatically run cmus, a terminal music player.

permalink
report
parent
reply
4 points

You can manually start the apps configured as .desktop entries in your autostart directory using dex. For instance:

dex --autostart --environment sway

Invoke the above from your Sway config and you’re good to go.

permalink
report
reply

linux4noobs

!linux4noobs@programming.dev

Create post

linux4noobs


Noob Friendly, Expert Enabling

Whether you’re a seasoned pro or the noobiest of noobs, you’ve found the right place for Linux support and information. With a dedication to supporting free and open source software, this community aims to ensure Linux fits your needs and works for you. From troubleshooting to tutorials, practical tips, news and more, all aspects of Linux are warmly welcomed. Join a community of like-minded enthusiasts and professionals driving Linux’s ongoing evolution.


Seeking Support?
  • Mention your Linux distro and relevant system details.
  • Describe what you’ve tried so far.
  • Share your solution even if you found it yourself.
  • Do not delete your post. This allows other people to see possible solutions if they have a similar problem.
  • Properly format any scripts, code, logs, or error messages.
  • Be mindful to omit any sensitive information such as usernames, passwords, IP addresses, etc.

Community Rules

  • Keep discussions respectful and amiable. This community is a space where individuals may freely inquire, exchange thoughts, express viewpoints, and extend help without encountering belittlement. We were all a noob at one point. Differing opinions and ideas is a normal part of discourse, but it must remain civil. Offenders will be warned and/or removed.
  • Posts must be Linux oriented
  • Spam or affiliate links will not be tolerated.

Community stats

  • 63

    Monthly active users

  • 136

    Posts

  • 1.1K

    Comments

Community moderators