https://github.com/Vencord/Vesktop/issues/383
It seems running electron directly on the app.asar causes autostart "Start With System" to not function when using this package.
Git Clone URL: | https://aur.archlinux.org/vesktop-bin.git (read-only, click to copy) |
---|---|
Package Base: | vesktop-bin |
Description: | A cross platform electron-based desktop app aiming to give you a snappier Discord experience with Vencord pre-installed.(Prebuilt version.Use system-wide electron) |
Upstream URL: | https://github.com/Vencord/Vesktop |
Keywords: | discord electron vencord |
Licenses: | GPL-3.0-only |
Conflicts: | vencord-desktop, vesktop |
Provides: | vencord-desktop, vesktop |
Submitter: | zxp19821005 |
Maintainer: | zxp19821005 |
Last Packager: | zxp19821005 |
Votes: | 87 |
Popularity: | 9.67 |
First Submitted: | 2024-01-15 09:12 (UTC) |
Last Updated: | 2025-02-06 06:00 (UTC) |
https://github.com/Vencord/Vesktop/issues/383
It seems running electron directly on the app.asar causes autostart "Start With System" to not function when using this package.
~/.config/vesktop-flags.conf
file is not being read like the old package. Here is a diff which will add this feature.
diff --git a/.SRCINFO b/.SRCINFO
index 96cc98b..a3bed07 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -13,7 +13,7 @@ pkgbase = vesktop-bin
conflicts = vesktop
conflicts = vencord-desktop
source = vesktop.sh
- sha256sums = d4272fed78cdcacd9edfb019134ac485d65b43f4d8c7a4179edbaed56af9b231
+ sha256sums = 831c9cb9d57b7ce3f2347aa9147a5daece70167911b315f1da30bf3c15e4ff80
source_aarch64 = vesktop-1.5.0-aarch64.deb::https://github.com/Vencord/Vesktop/releases/download/v1.5.0/vesktop_1.5.0_arm64.deb
sha256sums_aarch64 = cab6b72a969c759e305d6d7b4d499a30cb03df0da16e878393e71937fe1894b4
source_x86_64 = vesktop-1.5.0-x86_64.deb::https://github.com/Vencord/Vesktop/releases/download/v1.5.0/vesktop_1.5.0_amd64.deb
diff --git a/PKGBUILD b/PKGBUILD
index 2048800..de16b5d 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -29,7 +29,7 @@ depends=(
source_aarch64=("${pkgname%-bin}-${pkgver}-aarch64.deb::${url}/releases/download/v${pkgver}/${pkgname%-bin}_${pkgver}_arm64.deb")
source_x86_64=("${pkgname%-bin}-${pkgver}-x86_64.deb::${url}/releases/download/v${pkgver}/${pkgname%-bin}_${pkgver}_amd64.deb")
source=("${pkgname%-bin}.sh")
-sha256sums=('d4272fed78cdcacd9edfb019134ac485d65b43f4d8c7a4179edbaed56af9b231')
+sha256sums=('831c9cb9d57b7ce3f2347aa9147a5daece70167911b315f1da30bf3c15e4ff80')
sha256sums_aarch64=('cab6b72a969c759e305d6d7b4d499a30cb03df0da16e878393e71937fe1894b4')
sha256sums_x86_64=('e64d144156fdbfc2525158dfaeaa8b0a0dd84e2c55eeab0456fc47514fab9932')
build() {
@@ -48,4 +48,4 @@ package() {
install -Dm644 "${srcdir}/usr/share/icons/hicolor/${_icons}/apps/${pkgname%-bin}.png" \
-t "${pkgdir}/usr/share/icons/hicolor/${_icons}/apps"
done
-}
\ No newline at end of file
+}
diff --git a/vesktop.sh b/vesktop.sh
index aacd8f8..1729b20 100644
--- a/vesktop.sh
+++ b/vesktop.sh
@@ -1,4 +1,5 @@
-#!/bin/sh
+#!/usr/bin/env bash
+
set -e
_APPDIR="/usr/lib/@appname@"
_ASAR="${_APPDIR}/@appasar@"
@@ -6,10 +7,20 @@ export PATH="${_APPDIR}:${PATH}"
export LD_LIBRARY_PATH="${_APPDIR}/swiftshader:${_APPDIR}/lib:${LD_LIBRARY_PATH}"
export ELECTRON_IS_DEV=0
export NODE_ENV=production
-cd "${_APPDIR}"
+_FLAGS_FILE="${XDG_CONFIG_HOME:-$HOME/.config}/@appname@-flags.conf"
+declare -a flags
+if [[ -f "${_FLAGS_FILE}" ]]; then
+ mapfile -t < "${_FLAGS_FILE}"
+fi
+for line in "${MAPFILE[@]}"; do
+ if [[ ! "${line}" =~ ^[[:space:]]*#.* ]] && [[ -n "${line}" ]]; then
+ flags+=("${line}")
+ fi
+done
if [[ $EUID -ne 0 ]] || [[ $ELECTRON_RUN_AS_NODE ]]; then
- exec electron@electronversion@ "${_ASAR}" "$@"
+ cd "${_APPDIR}"
+ exec electron@electronversion@ "${_ASAR}" "$@" "${flags[@]}"
else
- exec electron@electronversion@ "${_ASAR}" --no-sandbox "$@"
+ cd "${_APPDIR}"
+ exec electron@electronversion@ "${_ASAR}" --no-sandbox "$@" "${flags[@]}"
fi
-exit
\ No newline at end of file
This package has renamed to vesktop-bin (https://aur.archlinux.org/packages/vesktop-bin).
@chrrybmb Thank you,fixed it.
@sewer56 Thank you,you can see the https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=vesktop-bin again.
@Fazzi I've tested on my pc:
$ vesktop %U
(node:33372) UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, open '/home/zxp-endeavouros/.config/vesktop/settings/quickCss.css'
(Use `electron --trace-warnings ...` to show where the warning was created)
(node:33372) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
Failed to import settings: Error: ENOENT: no such file or directory, scandir '/home/zxp-endeavouros/.config/Vencord/settings'
at readdirSync (node:fs:1527:3)
at t.readdirSync (node:electron/js2c/asar_bundle:2:11295)
at WebContents.<anonymous> (VCDMain:39:1004)
at WebContents.emit (node:events:517:28) {
errno: -2,
syscall: 'scandir',
code: 'ENOENT',
path: '/home/zxp-endeavouros/.config/Vencord/settings'
}
[arRPC > ipc] listening at /run/user/1000/discord-ipc-0
[arRPC > websocket] listening on 6463
[arRPC > process] started
When I restart it,it worked well:
$ vesktop %U
[arRPC > ipc] listening at /run/user/1000/discord-ipc-0
[arRPC > websocket] listening on 6463
[arRPC > process] started
(node:33784) electron: Failed to load URL: https://discord.com/app with error: ERR_TIMED_OUT
I'm in China,I cann't directlly visit https://discord.com
Hi there, seems the usage of a flags file in .config
is not done in this package like your old vencord-desktop-bin. vesktop.sh
should be updated to read the flags file like you had done previously.
Seems like updating this package might be difficult. The app is fully renamed to 'vesktop' now.
I made small adjustments to the PKGBUILD to get this to install the latest version, but due to the name change, you will wind up with e.g. duplicate .desktop
files.
# Maintainer: zxp19821005 <zxp19821005 at 163 dot com>
# Contributor: HentaiShiroYuki <hentaishiroyuki at gmail dot com>
# Contributor: Sofia Lima
_pkgname=Vesktop
pkgname=vesktop-bin
_appname=vesktop
_assetname=Vesktop
pkgver=1.5.0
_electronversion=27
pkgrel=1
pkgdesc="A cross platform electron-based desktop app aiming to give you a snappier Discord experience with Vencord pre-installed"
arch=(
'aarch64'
'x86_64'
)
url="https://github.com/Vencord/Vesktop"
license=('GPL3')
provides=(
"${pkgname%-bin}=${pkgver}"
"${_appname}=${pkgver}"
)
conflicts=(
"${pkgname%-bin}"
"${_appname}"
)
depends=(
"electron${_electronversion}"
'hicolor-icon-theme'
)
source_aarch64=("${pkgname%-bin}-${pkgver}-aarch64.deb::${url}/releases/download/v${pkgver}/${_assetname}_${pkgver}_arm64.deb")
source_x86_64=("${pkgname%-bin}-${pkgver}-x86_64.deb::${url}/releases/download/v${pkgver}/${_assetname}_${pkgver}_amd64.deb")
source=("${pkgname%-bin}.sh")
sha256sums=('d4272fed78cdcacd9edfb019134ac485d65b43f4d8c7a4179edbaed56af9b231')
sha256sums_aarch64=('cab6b72a969c759e305d6d7b4d499a30cb03df0da16e878393e71937fe1894b4')
sha256sums_x86_64=('e64d144156fdbfc2525158dfaeaa8b0a0dd84e2c55eeab0456fc47514fab9932')
build() {
sed -e "s|@electronversion@|${_electronversion}|" \
-e "s|@appname@|${pkgname%-bin}|g" \
-e "s|@appasar@|app.asar|g" \
-i "${srcdir}/${pkgname%-bin}.sh"
bsdtar -xf "${srcdir}/data.tar.xz"
sed "s|/opt/${_pkgname}/${_appname//-/}|${pkgname%-bin}|g;s|Icon=${_appname//-/}|Icon=${pkgname%-bin}|g" \
-i "${srcdir}/usr/share/applications/${_appname//-/}.desktop"
}
package() {
install -Dm755 "${srcdir}/${pkgname%-bin}.sh" "${pkgdir}/usr/bin/${pkgname%-bin}"
install -Dm644 "${srcdir}/opt/${_pkgname}/resources/app.asar" -t "${pkgdir}/usr/lib/${pkgname%-bin}"
install -Dm644 "${srcdir}/usr/share/applications/${_appname//-/}.desktop" "${pkgdir}/usr/share/applications/${pkgname%-bin}.desktop"
for _icons in 16x16 32x32 48x48 64x64 128x128 256x256 512x512 1024x1024;do
install -Dm644 "${srcdir}/usr/share/icons/hicolor/${_icons}/apps/${_appname//-/}.png" \
"${pkgdir}/usr/share/icons/hicolor/${_icons}/apps/${pkgname%-bin}.png"
done
}
Not sure what the policy for things like this are. Do we manually clean up, do we create a new package? etc.
@zxp19821005 The application's name is vesktop, not vdesktop.
Pinned Comments
zxp19821005 commented on 2024-01-17 01:43 (UTC)
This package has renamed to vesktop-bin (https://aur.archlinux.org/packages/vesktop-bin).