Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Find a file
tims 5f29f214c3
linux: Fix file not opening from file explorer (#21137)
Closes #20070

Release Notes:

- Fixed issue where files wouldn't open from the file explorer.
- Fixed "Open a new workspace" option on the desktop entry right-click
menu.

Context:

Zed consists of two binaries:

- `zed` (CLI component, located at `crates/cli/main.rs`)
- `zed-editor` (GUI component, located at `crates/zed/main.rs`)

When `zed` is used in the terminal, it checks if an existing instance is
running. If one is found, it sends data via a socket to open the
specified file. Otherwise, it launches a new instance of `zed-editor`.
For more details, see the `detect` and `boot_background` functions in
`crates/cli/main.rs`.

Root Cause:

Install process creates directories like `.local/zed.app` and
`.local/zed-preview.app`, which contain desktop entries for the
corresponding release. For example, `.local/zed.app/share/applications`
contains `zed.desktop`.

This desktop entry includes a generic `Exec` field, which is correct by
default:

```sh
Comment=A high-performance, multiplayer code editor.
TryExec=zed
StartupNotify=true
```

The issue is in the `install.sh` script. This script copies the above
desktop file to the common directory for desktop entries
(.local/share/applications). During this process, it replaces the
`TryExec` value from `zed` with the exact binary path to avoid relying
on the shell's PATH resolution and to make it explicit.

However, replacement incorrectly uses the path for `zed-editor` instead
of the `zed` CLI binary. This results in not opening a file as if you
use `zed-editor` directly to do this it will throw `zed is already
running` error on production and open new instance on dev.


Note: This PR solves it for new users. For existing users, they will
either have to update `.desktop` file manually, or use `install.sh`
script again. I'm not aware of zed auto-update method, if it runs
`install.sh` under the hood.
2024-11-29 23:01:29 +02:00
.cargo Revert "Use livekit's Rust SDK instead of their swift SDK (#13343)" (#20809) 2024-11-18 11:43:53 +02:00
.cloudflare docs: Document context servers (#21170) 2024-11-25 11:05:14 -05:00
.config
.github Update astral-sh/setup-uv digest to caf0cab (#20927) 2024-11-28 10:55:46 +02:00
.zed ci: Move collab to Dockerfile-collab (#18515) 2024-09-30 16:14:26 -04:00
assets Expose "Column Git Blame" in the editor controls menu (#21336) 2024-11-29 12:38:12 -03:00
crates linux: Fix Zed not visible in "Open With" list in file manager for Flatpak (#21177) 2024-11-29 22:59:04 +02:00
docs Disable editor autoscroll on mouse clicks (#20287) 2024-11-29 13:51:36 +02:00
extensions Improve file_types in default.json (#20429) 2024-11-18 19:56:45 -05:00
legal legal: Correct privacy policy (#17238) 2024-09-01 11:33:06 -04:00
nix nix: Return to building with crane (#21292) 2024-11-29 10:09:33 +01:00
script linux: Fix file not opening from file explorer (#21137) 2024-11-29 23:01:29 +02:00
tooling/xtask chore: Fix several style lints (#17488) 2024-09-06 11:58:39 +02:00
.git-blame-ignore-revs
.gitattributes
.gitignore nix: Return to building with crane (#21292) 2024-11-29 10:09:33 +01:00
.mailmap Update .mailmap (#20729) 2024-11-15 11:05:41 -05:00
Cargo.lock Remove project panel trash action for remote projects (#21300) 2024-11-29 22:37:24 +02:00
Cargo.toml Force ashpd crate to not use tokio (#21315) 2024-11-29 11:02:56 +02:00
clippy.toml chore: Fix some violations of 'needless_pass_by_ref_mut' lint (#18795) 2024-10-07 01:29:58 +02:00
CODE_OF_CONDUCT.md Remove community content from docs and point to zed.dev (#19895) 2024-10-29 09:44:58 -04:00
compose.yml Add Postgrest to Docker Compose (#16498) 2024-08-19 20:50:45 -04:00
CONTRIBUTING.md Remove community content from docs and point to zed.dev (#19895) 2024-10-29 09:44:58 -04:00
Cross.toml Add remote server cross compilation (#19136) 2024-10-12 23:23:56 -07:00
debug.plist
default.nix Add zed-editor package and overlay to flake (#16783) 2024-08-26 11:10:34 -04:00
docker-compose.sql
Dockerfile-collab collab: Remove dependency on X11 (#19079) 2024-10-11 13:28:34 -04:00
Dockerfile-collab.dockerignore ci: Move collab to Dockerfile-collab (#18515) 2024-09-30 16:14:26 -04:00
Dockerfile-cross Add remote server cross compilation (#19136) 2024-10-12 23:23:56 -07:00
Dockerfile-cross.dockerignore Add remote server cross compilation (#19136) 2024-10-12 23:23:56 -07:00
Dockerfile-distros Support More Linux (#18480) 2024-09-30 17:46:21 -04:00
Dockerfile-distros.dockerignore Support More Linux (#18480) 2024-09-30 17:46:21 -04:00
flake.lock nix: Return to building with crane (#21292) 2024-11-29 10:09:33 +01:00
flake.nix nix: Return to building with crane (#21292) 2024-11-29 10:09:33 +01:00
LICENSE-AGPL
LICENSE-APACHE
LICENSE-GPL
livekit.yaml
Procfile
Procfile.postgrest Fix llm queries (#16006) 2024-08-08 17:21:38 -07:00
README.md Format READMEs (#17454) 2024-09-05 15:39:16 -04:00
renovate.json Migrate Renovate config (#20741) 2024-11-15 14:37:39 -05:00
rust-toolchain.toml chore: Bump Rust to 1.81 (#17440) 2024-09-06 00:40:44 +02:00
shell.nix Add zed-editor package and overlay to flake (#16783) 2024-08-26 11:10:34 -04:00
typos.toml Make danger to output less false-positives (#19151) 2024-10-14 01:50:46 +03:00

Zed

CI

Welcome to Zed, a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.


Installation

Packaging status

On macOS and Linux you can download Zed directly or install Zed via your local package manager.

Other platforms are not yet available:

Developing Zed

Contributing

See CONTRIBUTING.md for ways you can contribute to Zed.

Also... we're hiring! Check out our jobs page for open roles.

Licensing

License information for third party dependencies must be correctly provided for CI to pass.

We use cargo-about to automatically comply with open source licenses. If CI is failing, check the following:

  • Is it showing a no license specified error for a crate you've created? If so, add publish = false under [package] in your crate's Cargo.toml.
  • Is the error failed to satisfy license requirements for a dependency? If so, first determine what license the project has and whether this system is sufficient to comply with this license's requirements. If you're unsure, ask a lawyer. Once you've verified that this system is acceptable add the license's SPDX identifier to the accepted array in script/licenses/zed-licenses.toml.
  • Is cargo-about unable to find the license for a dependency? If so, add a clarification field at the end of script/licenses/zed-licenses.toml, as specified in the cargo-about book.