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

cannot open project on linux #13766

Closed
1 task done
MangoIV opened this issue Jul 3, 2024 · 12 comments · Fixed by #14401
Closed
1 task done

cannot open project on linux #13766

MangoIV opened this issue Jul 3, 2024 · 12 comments · Fixed by #14401
Labels
can't reproduce Issue that can't be reproduced (transient, invalid, etc) defect [core label] linux

Comments

@MangoIV
Copy link

MangoIV commented Jul 3, 2024

Check for existing issues

  • Completed

Describe the bug / provide steps to reproduce it

after opening zed, I am trying to open a project with ctrl + o or with the bottom in the top left corner. both do nothing.

Environment

  • system: "x86_64-linux"
  • host os: Linux 6.6.36, NixOS, 24.11 (Vicuna), 24.11.20240701.00d80d1

If applicable, add mockups / screenshots to help explain present your vision of the feature

image

If applicable, attach your ~/Library/Logs/Zed/Zed.log file to this issue.

Zed.log
@MangoIV MangoIV added admin read Pending admin review defect [core label] triage Maintainer needs to classify the issue labels Jul 3, 2024
@jansol
Copy link
Contributor

jansol commented Jul 3, 2024

Are you using something like sway or hyprland without an xdg-desktop-portal set up? Please use the relevant NixOS module to set up your desktop environment correctly.

@MangoIV
Copy link
Author

MangoIV commented Jul 3, 2024

The portal normally works. Is there something I can do to trouble shoot this?

@jansol
Copy link
Contributor

jansol commented Jul 3, 2024

Make sure your portal actually provides a file chooser, as not all of them do: https://wiki.archlinux.org/title/XDG_Desktop_Portal#List_of_backends_and_interfaces

EDIT: also if you are comparing to e.g. Firefox, that one falls back to the GTK file chooser when the portal is not available...

@jansol
Copy link
Contributor

jansol commented Jul 3, 2024

As for troubleshooting the portal, zed should be logging to the terminal (if you started it from there) and to ~/.local/share/zed/logs/. If the portal is not accessible, that should be visible in the log IIRC.

@MangoIV
Copy link
Author

MangoIV commented Jul 4, 2024

It is not visible I the logs. I’m closing this issue because I’m giving up on Zed. There’s too many things that are not really agreeable with, including but not limited to enabling telemetry by default, or downloading (thankfully dynamically linked) closed source, unaudited executables without asking me before even becoming usable. An editor that already phones home and downloads nodejs, prettier and LLM executables before letting me open a file is not really what I imagined.

@MangoIV MangoIV closed this as completed Jul 4, 2024
@notpeter notpeter added linux can't reproduce Issue that can't be reproduced (transient, invalid, etc) and removed triage Maintainer needs to classify the issue admin read Pending admin review labels Jul 5, 2024
@alexlnkp
Copy link

alexlnkp commented Jul 11, 2024

Please, re-open the issue. This same thing is happening to me right now, and I don't see a reason to open a NEW issue just to say that it should stay open until it's fixed.

Although I STRONGLY agree with You, @MangoIV , We should still attempt to help the project as much as we can, even if just by reporting an issue, which takes ~15 minutes and can potentially help hundreds, if not thousands of people. However, the fact that this issue remained closed, without maintainers intervening is a red flag on it's own.

I imagine it's not that hard to simply ask for a feature to disable all of the questionable additions, such as copilot, other LLMs, etc. Even if those request are not heard - at least we'll still have a WORKING code editor.

Here's the Zed.log I've got:

2024-07-11T16:53:36+07:00 [INFO] ========== starting zed ==========
2024-07-11T16:53:36+07:00 [INFO] perform;
2024-07-11T16:53:36+07:00 [INFO] read_command;
2024-07-11T16:53:36+07:00 [INFO] read_command;
2024-07-11T16:53:36+07:00 [INFO] socket reader;
2024-07-11T16:53:36+07:00 [INFO] Opening main db
2024-07-11T16:53:36+07:00 [INFO] new;
2024-07-11T16:53:36+07:00 [INFO] Using git binary path: None
2024-07-11T16:53:36+07:00 [INFO] set environment variables from shell:/usr/bin/bash, path:/usr/local/sbin:/usr/local/bin:/usr/bin:/opt/cuda/bin:/opt/cuda/nsight_compute:/opt/cuda/nsight_systems/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/usr/lib/rustup/bin
2024-07-11T16:53:36+07:00 [ERROR] theme not found: Catppuccin Mocha
2024-07-11T16:53:36+07:00 [INFO] extensions updated. loading 2, reloading 0, unloading 0
2024-07-11T16:53:36+07:00 [INFO] activate is not implemented on Linux, ignoring the call
2024-07-11T16:53:36+07:00 [INFO] Opening main db
2024-07-11T16:53:36+07:00 [WARN] Theme "Catppuccin Latte" is using a deprecated style property: scrollbar_thumb.background. Use `scrollbar.thumb.background` instead.
2024-07-11T16:53:36+07:00 [WARN] Theme "Catppuccin Frappé" is using a deprecated style property: scrollbar_thumb.background. Use `scrollbar.thumb.background` instead.
2024-07-11T16:53:36+07:00 [WARN] Theme "Catppuccin Macchiato" is using a deprecated style property: scrollbar_thumb.background. Use `scrollbar.thumb.background` instead.
2024-07-11T16:53:36+07:00 [WARN] Theme "Catppuccin Mocha" is using a deprecated style property: scrollbar_thumb.background. Use `scrollbar.thumb.background` instead.
2024-07-11T16:53:36+07:00 [WARN] Theme "Catppuccin Latte - No Italics" is using a deprecated style property: scrollbar_thumb.background. Use `scrollbar.thumb.background` instead.
2024-07-11T16:53:36+07:00 [WARN] Theme "Catppuccin Frappé - No Italics" is using a deprecated style property: scrollbar_thumb.background. Use `scrollbar.thumb.background` instead.
2024-07-11T16:53:36+07:00 [WARN] Theme "Catppuccin Macchiato - No Italics" is using a deprecated style property: scrollbar_thumb.background. Use `scrollbar.thumb.background` instead.
2024-07-11T16:53:36+07:00 [WARN] Theme "Catppuccin Mocha - No Italics" is using a deprecated style property: scrollbar_thumb.background. Use `scrollbar.thumb.background` instead.
2024-07-11T16:53:36+07:00 [INFO] perform;
2024-07-11T16:53:36+07:00 [INFO] read_command;
2024-07-11T16:53:36+07:00 [INFO] read_command;
2024-07-11T16:53:36+07:00 [INFO] socket reader;
2024-07-11T16:53:36+07:00 [INFO] Enabling Vulkan Portability
2024-07-11T16:53:36+07:00 [INFO] Enabling color space support
2024-07-11T16:53:36+07:00 [INFO] Adapter "NVIDIA GeForce RTX 3060"
2024-07-11T16:53:36+07:00 [INFO] Ray tracing is supported
2024-07-11T16:53:37+07:00 [INFO] Using surface present mode MAILBOX
2024-07-11T16:53:37+07:00 [WARN] Unable to forbid exclusive full screen
2024-07-11T16:53:37+07:00 [INFO] Creating a descriptor pool for at most 16 sets
2024-07-11T16:53:37+07:00 [INFO] Creating a descriptor pool for at most 16 sets
2024-07-11T16:53:37+07:00 [INFO] Initializing Blade pipelines for surface SurfaceInfo { format: Bgra8UnormSrgb, alpha: PreMultiplied }
2024-07-11T16:53:37+07:00 [INFO] Using surface present mode MAILBOX
2024-07-11T16:53:37+07:00 [WARN] Unable to forbid exclusive full screen
2024-07-11T16:53:37+07:00 [INFO] Initializing Blade pipelines for surface SurfaceInfo { format: Bgra8UnormSrgb, alpha: Ignored }
2024-07-11T16:53:37+07:00 [INFO] Using surface present mode MAILBOX
2024-07-11T16:53:37+07:00 [WARN] Unable to forbid exclusive full screen
2024-07-11T16:53:37+07:00 [INFO] Node runtime install_if_needed
2024-07-11T16:53:37+07:00 [INFO] Opening main db
2024-07-11T16:53:37+07:00 [INFO] Using surface present mode MAILBOX
2024-07-11T16:53:37+07:00 [WARN] Unable to forbid exclusive full screen
2024-07-11T16:53:37+07:00 [INFO] Initializing default prettier with plugins {}
2024-07-11T16:53:37+07:00 [INFO] starting language server. binary path: "/home/alex/.local/share/zed/node/node-v18.15.0-linux-x64/bin/node", working directory: "/", args: ["/home/alex/.local/share/zed/copilot/copilot-v0.5.0/dist/agent.js", "--stdio"]
2024-07-11T16:53:37+07:00 [INFO] Language server with id 0 sent unhandled notification LogMessage:
{
  "level": 0,
  "message": "[DEBUG] [agent] [2024-07-11T09:53:37.698Z] Agent service starting",
  "metadataStr": "[DEBUG] [agent] [2024-07-11T09:53:37.698Z]",
  "extra": [
    "Agent service starting"
  ]
}
2024-07-11T16:53:37+07:00 [INFO] Language server with id 0 sent unhandled notification client/registerCapability:
{
  "registrations": [
    {
      "id": "adbd9176-4056-46ba-9b69-c660469cdfca",
      "method": "workspace/didChangeWorkspaceFolders",
      "registerOptions": {}
    }
  ]
}
2024-07-11T16:53:37+07:00 [INFO] Language server with id 0 sent unhandled notification LogMessage:
{
  "level": 0,
  "message": "[DEBUG] [agent] [2024-07-11T09:53:37.708Z] Telemetry initialized",
  "metadataStr": "[DEBUG] [agent] [2024-07-11T09:53:37.708Z]",
  "extra": [
    "Telemetry initialized"
  ]
}
2024-07-11T16:53:38+07:00 [INFO] new;
2024-07-11T16:53:38+07:00 [INFO] new;

My system info:

OS: Arch Linux x86_64
Kernel: Linux 6.9.8-arch1-1
Display (GM27-FFS): 1920x1080 @ 165Hz
WM: Hyprland (Wayland)
CPU: 12th Gen Intel(R) Core(TM) i5-12400F (12) @ 4.40 GHz
GPU: NVIDIA GeForce RTX 3060 Lite Hash Rate [Discrete]

@alexlnkp
Copy link

alexlnkp commented Jul 11, 2024

Make sure your portal actually provides a file chooser, as not all of them do: wiki.archlinux.org/title/XDG_Desktop_Portal#List_of_backends_and_interfaces

I have no issues with my xdg-portal. It simply can not be related to that since mine actually provides the file-picker.

As for troubleshooting the portal, zed should be logging to the terminal (if you started it from there) and to ~/.local/share/zed/logs/. If the portal is not accessible, that should be visible in the log IIRC.

This is simply not the case, or at least not anymore. Launching the zeditor from terminal only opens the editor and then immediately quits. I assume the executable simply launches a sub-process and if it doesn't fail - the command simply stops, since Zed was able to launch.

Running:

#!/bin/bash
zeditor

echo "exiting"

Will simply open Zed and then immediately after that print "exiting" into the terminal.

@s3bba
Copy link
Contributor

s3bba commented Jul 11, 2024

@alexlnkp I was having the same issue and I resolved it with this:

  • install xdg-desktop-portal xdg-desktop-portal-gtk packages
  • in the .xinitrc add
    • dbus-update-activation-environment --systemd DBUS_SESSION_BUS_ADDRESS DISPLAY XAUTHORITY
    • systemctl --user start xdg-desktop-portal-gtk xdg-desktop-portal

And this is all I needed to do, but also I'm still on X11, so you will need to adapt this to Wayland.

@jansol
Copy link
Contributor

jansol commented Jul 11, 2024

This is simply not the case, or at least not anymore. Launching the zeditor from terminal only opens the editor and then immediately quits. I assume the executable simply launches a sub-process and if it doesn't fail - the command simply stops, since Zed was able to launch.

Ah, so the arch package already had the CLI helper installed as the default binary. That one does indeed not show anything in the terminal except the output for --help.

mikayla-maki pushed a commit that referenced this issue Jul 15, 2024
This PR adds a warning when the file chooser couldn't be opened on Linux

It's quite confusing when trying to open a file and apparently nothing
happens:

fixes #11089,
#14328,
#13753 (comment),
#13766,
#14384,
#14353,
#9209


![image](https://github.com/user-attachments/assets/5acabdaa-7a9d-4225-9480-e371d20387c3)


Release Notes:

- N/A
SomeoneToIgnore pushed a commit that referenced this issue Jul 15, 2024
This PR adds a warning when the file chooser couldn't be opened on Linux

It's quite confusing when trying to open a file and apparently nothing
happens:

fixes #11089,
#14328,
#13753 (comment),
#13766,
#14384,
#14353,
#9209


![image](https://github.com/user-attachments/assets/5acabdaa-7a9d-4225-9480-e371d20387c3)


Release Notes:

- N/A
@alexlnkp
Copy link

alexlnkp commented Jul 16, 2024

@alexlnkp I was having the same issue and I resolved it with this:

* install `xdg-desktop-portal` `xdg-desktop-portal-gtk` packages

* in the `.xinitrc` add
  
  * `dbus-update-activation-environment --systemd DBUS_SESSION_BUS_ADDRESS DISPLAY XAUTHORITY`
  * `systemctl --user start xdg-desktop-portal-gtk xdg-desktop-portal`

And this is all I needed to do, but also I'm still on X11, so you will need to adapt this to Wayland.

I'm using Hyprland, and I have TWO xdg-desktop portals constantly open, xdg-desktop-portal and xdg-desktop-portal-hyprland
Both seem to work like a charm, I never even had any issues with file-pickers either.
On my system, I'm using thunar for picking files and stuff, never had any issues with it.

It would appear that it's the Zed that has troubles with opening a file-picker assigned by xdg-desktop-portal, rather than the xdg-desktop-portal being configured wrongly.

I'm not really knowledgeable in Rust, however I do know that it supports tools like zenity, which can be used as a file picker. (Seen it used on a project called ntsc-rs) It also seems to work as intended for me personally.

Although I must say, I'm not really knowledgeable in this stuff, therefore some of my assumptions are just speculations based on my PERSONAL experience only. Please take those with a grain of salt.

While we're on the topic of opening projects, it would be nice to have a way of opening a project using terminal while Zed is already open (using embedded terminal); I.E. Opening Zed, opening embedded terminal, typing something like zeditor -p /path/to/project/or/file and having the folder or the file open in the same Zed's instance's window. Although this is just a random thought I have; I don't think this should be prioritized, at least right now.

@jansol
Copy link
Contributor

jansol commented Jul 16, 2024

While we're on the topic of opening projects, it would be nice to have a way of opening a project using terminal while Zed is already open (using embedded terminal); I.E. Opening Zed, opening embedded terminal, typing something like zeditor -p /path/to/project/or/file and having the folder or the file open in the same Zed's instance's window.

That is already possible:

$ zed --help
Usage: zed [OPTIONS] [PATHS_WITH_POSITION]...

Arguments:
  [PATHS_WITH_POSITION]...
          A sequence of space-separated paths that you want to open.

          Use `path:line:row` syntax to open a file at a specific location. Non-existing paths and directories will ignore `:line:row` suffix.

Options:
  -w, --wait
          Wait for all of the given paths to be opened/closed before exiting

  -a, --add
          Add files to the currently open workspace

  -n, --new
          Create a new workspace

Edit: nvm, I guess you meant switching the currently active workspace of the parent zed window via the command line in the embedded terminal?

@alexlnkp
Copy link

I guess you meant switching the currently active workspace of the parent zed window via the command line in the embedded terminal?

Yeah, something like that. If I recall correctly, VSCodium allowed for that somehow, although i honestly don't remember

ConradIrwin pushed a commit that referenced this issue Jul 16, 2024
This PR adds a warning when the file chooser couldn't be opened on Linux

It's quite confusing when trying to open a file and apparently nothing
happens:

fixes #11089,
#14328,
#13753 (comment),
#13766,
#14384,
#14353,
#9209


![image](https://github.com/user-attachments/assets/5acabdaa-7a9d-4225-9480-e371d20387c3)


Release Notes:

- N/A
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
can't reproduce Issue that can't be reproduced (transient, invalid, etc) defect [core label] linux
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants