Sway - an i3 compatible wayland compositor

This is the place to talk about the SWAY snap.

Feel free to give feedback, report bugs, contribute or whatever.

Hope this snap makes your life a little bit easier :wink: :sunglasses:

Warning This snap is under heavy development and is in alpha stage.

Working (very rarely tested yet):

  • firstly tested with “classic” mode; now “devmode” is uploaded
  • sway is starting from wayland, X11 and tty (X11 only in devmode, not classic)
  • sway, can start “sway” inside itself, after add “bindsym … exec sway” to the config

Not Working / Issues

  • strict- / jail-mode
  • Xwayland
  • fontconfig on 19.04
  • gtk applications without Xwayland, if DISPLAY environment is set
  • … TODO …

Installation
sudo snap install --devmode --beta sway

HINT: please check previous user configuration before installing ! (see below)

Configuration

  • configuration is located under: ~/snap/sway/current/.config/sway/config
  • initial configuration is found under: /snap/sway/current/etc/xdg/sway/config

Contribute:

To get the source run:
git clone https://github.com/sd-hd/sway-snap.git

Home of the Snap:

2 Likes

I’ll be checking this out soon when I get a chance :+1:

I want to preface this that I’m an intermediate Linux user, and until recently I’ve always used full desktop environments until starting to experiment with Sway. So basically, this problem could all be my fault :wink:

It is not starting correctly for me. On a Focal system I installed yesterday, this is what I get when I try to start it from a console:

$ which sway
/snap/bin/sway
$ sway
- [sway/server.c:140] Unable to open wayland socket

When I install the Sway deb from the Ubuntu archive it opens and run OK when do the same thing.

hello elcste,

no, it is not your fault :wink:

I have the same problem here and try to find a solution.

Until now there are 4 different error case’s.

  • With and without the above workaround.
  • With superuser and without superuser

And of course, there are 4 different error-messages :smiley:

hopefully the error does not hide too long :wink:

In general I’d get grumpy at people suggesting to install things with --devmode, as that invites copy-paste of dangerous commands, but I think you’ve done a good job of making it scary enough in this case so it’s alright.
Just commenting so that other people who I’ve told off for --devmode can’t point at this as a counterexample.

you right :wink: i will change devmode to classic soon

Sorry the upload, still not works because of the approval.

Just figured out, that the config “grade: devel” and classic will not upload to the snapstore.

So, i switched back to devmode.

Hope i can now upload again.

As discussed on IRC, the use of ‘classic’ requires a manual review and you must follow Process for reviewing classic confinement snaps.

I’ve taken a look at the snap and there are older revisions that are hanging up later revisions. I’m working through unclogging those since later revisions seem to address the issues.

As an aside: if you are doing a lot of changes to your snap, you may want to use the review-tools to verify before upload. Eg, snap install review-tools ; snap-review /path/to/your/snap

As another aside: packaging sway as a snap is a very interesting idea. I’ve wanted to try sway myself, but haven’t yet. It is going to need to be classic for the time being, but @alan_g has been working through various items for making desktop shells work under strict mode, so some day it may be able to be strict mode.

Thank you.

I will look at the review tools.

Maybe i can help to build strict desktops :wink:

2 Likes

Yay! I actually tried doing this myself a year ago and failed Building a snap for a wayland compositor

Very glad to see this and will be giving it a try soon – assuming it is supposed to work as is with --classic right now? It is unclear from the discussion above.

Thanks!

1 Like

Hi @tsloughter,

yes, the version described above was tested in classic mode.

I will right now start to upload a new edge version, which starts in “devmode”.

“jailmode” and “strict” is still not worked.

@tsloughter:

would you prefer classic or strict ?

@alan_g

How is the progress to launching a snap from another snap?

A confined snap launching another snap? Slow.

There have been some discussions around the PR: some resolved with actions (e.g. I need to change the interface name) some not resolved yet.

Don’t expect anything you can use soon, as the initial proposal is intentionally very limited in scope to minimize the security “surface” exposed. Even so, it is taking time to ensure things are secure.

oh, that’s odd.
I’ll see if I can find the PRs.

Hmm. What they want to do? Write a protocol filter for the X11 socket?
An external application like a terminal only needs the graphic output, right?,

I also asked here for details: