Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] Syntax error on linux .desktop file #933

Open
mrnfrancesco opened this issue Dec 26, 2024 · 5 comments
Open

[bug] Syntax error on linux .desktop file #933

mrnfrancesco opened this issue Dec 26, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@mrnfrancesco
Copy link

Describe the bug

I'm on arch linux based distribution. Once installed Onlook cannot be run from UI menu because of a syntax error in /usr/share/applications/onlook.desktop file which has the following content:

Please note the leading " at the end of the binary name

[Desktop Entry]
Name=Onlook
Exec=onlook" %U
Terminal=false
Type=Application
Icon=onlook
StartupWMClass=Onlook
Comment=The first-ever devtool for designers
Categories=Utility;
@mrnfrancesco mrnfrancesco added the bug Something isn't working label Dec 26, 2024
@Kitenite
Copy link
Contributor

Thanks for reporting. This may require setting better options in the linux target. Truthfully we don't really have the capacity to test on Linux atm.

https://github.com/onlook-dev/onlook/blob/main/apps/studio/electron-builder.json5#L37

@JonCastaway
Copy link

Hi, I can confirm that the leading " at the end of the file name is the issue.

Another quick win would be to add Keywords=design;utility;devtool;onlook;keywords;etc;etc; which enables quick finding Onlook from a search bar in most distros.

devin-ai-integration bot added a commit that referenced this issue Jan 12, 2025
- Fix syntax error in Linux .desktop file by properly configuring desktop entries
- Fix Linux URL handling for auth by removing Windows-specific platform check

Fixes #933
Fixes #934

Co-Authored-By: [email protected] <[email protected]>
Copy link
Contributor

Fixed in PR #1028. Added proper desktop file configuration in electron-builder.json5 to prevent syntax errors in the generated .desktop file.

@Kitenite
Copy link
Contributor

Kitenite commented Jan 12, 2025

@JonCastaway @mrnfrancesco could you see if this works? #1028

@mrnfrancesco
Copy link
Author

I got this error building studio app with bun run package:

$ electron-builder
  • electron-builder  version=25.1.8 os=6.11.11-1-MANJARO
  • loaded configuration  file=/tmp/onlook/apps/studio/electron-builder.json5
  • writing effective config  file=release/0.1.16/builder-effective-config.yaml
  • executing @electron/rebuild  electronVersion=33.2.1 arch=x64 buildFromSource=false appDir=./
  • installing native dependencies  arch=x64
  • completed installing native dependencies
  • packaging       platform=linux arch=x64 electron=33.2.1 appOutDir=release/0.1.16/linux-unpacked
  • building        target=AppImage arch=x64 file=release/0.1.16/Onlook-x86_64.AppImage
  • executing @electron/rebuild  electronVersion=33.2.1 arch=arm64 buildFromSource=false appDir=./
  • installing native dependencies  arch=arm64
  • completed installing native dependencies
  • packaging       platform=linux arch=arm64 electron=33.2.1 appOutDir=release/0.1.16/linux-arm64-unpacked
  • building        target=AppImage arch=arm64 file=release/0.1.16/Onlook-arm64.AppImage

  ⨯ Please specify executable name as linux.executableName instead of linux.desktop.Exec  failedTask=build stackTrace=Error: Please specify executable name as linux.executableName instead of linux.desktop.Exec

    at LinuxTargetHelper.computeDesktopEntry (/tmp/onlook/node_modules/app-builder-lib/src/targets/LinuxTargetHelper.ts:107:13)
    at Lazy.creator (/tmp/onlook/node_modules/app-builder-lib/src/targets/AppImageTarget.ts:29:21)
    at Lazy.get value [as value] (/tmp/onlook/node_modules/lazy-val/src/main.ts:18:25)
    at AppImageTarget.build (/tmp/onlook/node_modules/app-builder-lib/src/targets/AppImageTarget.ts:50:25)
    at async Promise.all (index 0)
    at AsyncTaskManager.awaitTasks (/tmp/onlook/node_modules/builder-util/src/asyncTaskManager.ts:65:25)
    at /tmp/onlook/node_modules/app-builder-lib/src/platformPackager.ts:152:7
error: script "package" exited with code 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants