Open hellium6 opened 2 years ago
@hellium6 Have you tried this? https://stackoverflow.com/a/67842921/966338
@hellium6 Have you tried this? https://stackoverflow.com/a/67842921/966338
I tried running export DISPLAY=$(cat /etc/resolv.conf | grep nameserver | awk '{print $2}'):0
and then running the appimage but got the same error. Then I realized it requires me to install X server. I have X installed. I can run other X apps on the system. Maybe it works for WSL/Windows only, not Arch?
With a little bit of searching I think I found a better solution which works. I tried running with --enable-features=UseOzonePlatform --ozone-platform=wayland
according to this and this. It worked.
$ ./Buttercup-linux-x86_64.AppImage --enable-features=UseOzonePlatform --ozone-platform=wayland
Setting $HOME to /home/username/bin/Buttercup-linux-x86_64.AppImage.home
Setting $XDG_CONFIG_HOME to /home/username/bin/Buttercup-linux-x86_64.AppImage.config
[INF] 15:57:17: Application starting
[INF] 15:57:17: Registering protocol: buttercup
[ERR] 15:57:17: Failed registering protocol: buttercup
[INF] 15:57:17: Application ready
[INF] 15:57:17: Application session started: 2022-09-16T15:57:17.904Z
[INF] 15:57:17: Logs location: /home/username/bin/Buttercup-linux-x86_64.AppImage.home/.local/state/Buttercup-nodejs/buttercup-desktop.log
[INF] 15:57:17: Config location: /home/username/bin/Buttercup-linux-x86_64.AppImage.config/Buttercup-nodejs/desktop.config.json
[INF] 15:57:17: Vault config storage location: /home/username/bin/Buttercup-linux-x86_64.AppImage.home/.local/share/Buttercup-nodejs/vaults.json
[INF] 15:57:17: System locale detected: en-US
[INF] 15:57:17: Starting with language: en-US
...
No errors related to display and Buttercup window appears on screen.
I was able to make it work on both X11 and Wayland with this trick:
mkdir -p /tmp/bc-mod
cp Buttercup-linux-x86_64.AppImage /tmp/bc-mod/Buttercup-linux-x86_64.AppImage
cd /tmp/bc-mod
"./Buttercup-linux-x86_64.AppImage" --appimage-extract
cd squashfs-root
I made the following changes to AppRun
:
--- AppRun.old 2022-09-16 17:54:52.897049000 +0000
+++ AppRun 2022-09-16 18:27:35.027133460 +0000
@@ -10,6 +10,7 @@ THIS="$0"
# http://stackoverflow.com/questions/3190818/
args=("$@")
NUMBER_OF_ARGS="$#"
+[ -n "$WAYLAND_DISPLAY" ] && WAYLAND_ARGS="--enable-features=UseOzonePlatform --ozone-platform=wayland"
if [ -z "$APPDIR" ] ; then
# Find the AppDir. It is the directory that contains AppRun.
@@ -40,9 +41,9 @@ atexit()
{
if [ $isEulaAccepted == 1 ] ; then
if [ $NUMBER_OF_ARGS -eq 0 ] ; then
- exec "$BIN"
+ exec "$BIN" $WAYLAND_ARGS
else
- exec "$BIN" "${args[@]}"
+ exec "$BIN" "${args[@]}" $WAYLAND_ARGS
fi
fi
}
cd ..
appimagetool -v squashfs-root "Buttercup-linux-x86_64.AppImage" || /path/to/appimagetool.appimage -v squashfs-root "Buttercup-linux-x86_64.AppImage"
mv -i "Buttercup-linux-x86_64.AppImage" "/home/username/bin/Buttercup-linux-x86_64.AppImage"
If this is too much work, try passing the .appimage file to this script: https://gist.github.com/hellium6/fd90d75002e98befa29492ecdf9e42ed
This way:
wayland-mod.sh /path/to/buttercup.appimage
It will automatically apply the modification, re-create the appimage and then ask you whether you want to replace the original. It may work on other Electron appimages (ie. would allow them to run under Wayland) but haven't tested extensively.
I would accept a PR for this.. but unfortunately don't have time to tackle it myself, sorry.
With a little bit of searching I think I found a better solution which works. I tried running with
--enable-features=UseOzonePlatform --ozone-platform=wayland
according to this and this. It worked.
Thank you for this. I wasn't having any issues launching buttercup-dektop (v2.28) under KDE6 Wayland, but I was experiencing an issue pasting data into a field which made it "hang"/think/retry... edited the menu application by adding --enable-features=UseOzonePlatform --ozone-platform=wayland
as arguements and now I can paste normally.
Thank you.
On Arch Linux, under Wayland, running appimage shows: