contour icon indicating copy to clipboard operation
contour copied to clipboard

Flatpak support

Open christianparpart opened this issue 3 years ago • 7 comments

It's already half implemented (C++-wise), it must be finished (I had issues with privilege escalation to escape the sandbox) and then be submitted to the flatpak store.

Checklist

  • [x] ensure C++ code is done
  • [x] Control codes (e.g. Ctrl+C) do not seem to be passed correctly. It's definitely handled by Contour, but maybe flatpak-spawn does not properly forward it? Not proven nor sure yet what the actual root cause is.
  • [x] Probably same root cause, window resizes are not forwarded correctly. This is probably some missing signal handling in flatpak-spawn.
  • [x] pre-populate a contour terminfo file in a location somewhere in ~/.var/app/org.contourterminal.Contour/terminfo/ if it doesn't exist yet. -- Can we make the sandbox have access to this before-hand to make the file-creation cheap? Yes!.
  • [ ] adapt CI to test against flatpak builds
  • [ ] adapt CI release cycle to ideally(!) also auto-release on flatpak store.

christianparpart avatar Jul 22 '22 13:07 christianparpart

Initial PR: https://github.com/flathub/flathub/pull/3349

christianparpart avatar Jul 23 '22 12:07 christianparpart

@christianparpart since contour flathub has been released will you add flatpak installation guide on the readme?

sitompul avatar Aug 02 '22 06:08 sitompul

@christianparpart since contour flathub has been released will you add flatpak installation guide on the readme?

This is a very good idea. But I consider it experimental for now. I am not yet sure if really everything works in this sandbox. Are you using the flatpak installation?

christianparpart avatar Aug 02 '22 06:08 christianparpart

@christianparpart I'm currently using it with tmux + vim and so far the only issue is when I'm using tmux it won't resize properly ! pic

I'm using fedora 36 + gnome 42 btw

but maximizing contour before running tmux works fine

sitompul avatar Aug 02 '22 11:08 sitompul

Can you please check your TERM var and change it to contour if not already?

uspasojevic96 avatar Aug 02 '22 12:08 uspasojevic96

While now being published on flathub, it is apparent that a few things are definitely still missing before we can advertise for flatpak support in the project's README and the release page:

EDIT: List of todo items moved to top post.

christianparpart avatar Aug 06 '22 18:08 christianparpart

@sitompul a little update. I've updated the flathub package that contains a fix to properly handle ctrl+c as well as window resize propagation.

Fix isn't the right term, because the problem is on flatpak's sandboxing side (flatpak-spawn process not properly handling PTY handles. Especially not when the child process (happens to become flatpak-spawn) is set to be the controlling terminal. The "workaround" is to not set this bit. But that leads to other issues but it's more important to be able to handle SIGWINCH as well as Ctrl+C.

christianparpart avatar Aug 28 '22 09:08 christianparpart