Repository navigation
Conversation
Make Exec= compatible with $PATH configured in .bashrc/ or .zshrc/âĶ PR #3351 <#3351> Refs #296 <#296 (comment)> Signed-off-by: Romain Vimont <rom@rom1v.com>
|
Hi, Thank you ð I added a first commit to replace the hardcoded Then I added a The resulting branch is here: Please review and test ð |
|
Awesome improvements! Just one minor suggestion -
"or" indeed makes it clearer, but a slash after .bashrc is somewhat unusual. Probably better with
(Term "shell startup scripts" is just the first one out of my head. Different people use different terms for those files :D)
|
Make Exec= compatible with $PATH configured in .bashrc/ or .zshrc/âĶ PR #3351 <#3351> Refs #296 <#296 (comment)> Signed-off-by: Romain Vimont <rom@rom1v.com>
In
So "shell startup script" looks good to me.
I suggest: +# For some users, the PATH or ADB environment variables are set from the shell
+# startup file, like .bashrc or .zshrcâĶ Run an interactive shell to get
+# environment correctly initialized.What do you think? See
ð
OK |
|
Looks great, thank you very much for the efforts! |
|
@asnelling as the author of #296, any remark? |
| # For some users, `adb` is not in default $PATH but the one configured in .bashrc/.zshrc/... | ||
| # Run an interactive shell to get the same path used in terminals. | ||
| Exec=/bin/sh -c '"$SHELL" -i -c scrcpy' |
There was a problem hiding this comment.
For system-wide installations, Exec should use the system-wide adb installed at, e.g.: /usr/bin/adb and leave customization concerns up to the user in e.g.: ~/.local/applications/scrcpy.desktop
ð good to merge
|
IMO, $ grep '^Exec=' /usr/share/applications/*.desktopMore importantly, merge it ð |
It's up to whether rom1v wants to support
It's also possible to extract those "complex" Exec= lines to standalone scripts like |
So, for the non-console version: For the console version: ? Where should the user define @yangfl any opinion about the content of |
|
Strange, but acceptable as long as the software author satisfies with it. |
Yeah,
I checked and found that qterminal and similar programs expand environment variables. I'm not sure if other terminal emulators do that or not.
That depends on how an X11 or Wayland session is started. Apparently there is no universal way - see https://wiki.archlinux.org/title/Environment_variables#Graphical_environment |
OK. But then the scrcpy-console version will load environment variables from .bashrc (whatever the default shell), while the non-console version will not.
OK, so maybe I will keep Thank you. |
Yeah that's an issue. How about |
Refs <https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html> PR #3351 <#3351> Replaces PR #296 <#296> Fixes #295 <#295> Fixes #748 <#748> Fixes #1636 <#1636> Co-authored-by: Addison Snelling <addison@asnell.io> Co-authored-by: Chih-Hsuan Yen <yan12125@gmail.com> Co-authored-by: Romain Vimont <rom@rom1v.com> Signed-off-by: Romain Vimont <rom@rom1v.com>
Make Exec= compatible with $PATH configured in .bashrc/ or .zshrc/âĶ PR #3351 <#3351> Refs #296 <#296 (comment)> Co-authored-by: Romain Vimont <rom@rom1v.com> Signed-off-by: Romain Vimont <rom@rom1v.com>
Assuming no objection for this approach, I imported pr3351.2 branch, added proposed bash arguments and force-updated this PR. |
Make Exec= compatible with $PATH configured in .bashrc or .zshrcâĶ PR #3351 <#3351> Refs #296 <#296 (comment)> Signed-off-by: Romain Vimont <rom@rom1v.com>
Make Exec= compatible with $PATH configured in .bashrc or .zshrcâĶ PR #3351 <#3351> Refs #296 <#296 (comment)> Signed-off-by: Romain Vimont <rom@rom1v.com>
|
Merged into |
|
Thanks! |
scrcpy v1.25 Changes since v1.24: - Adapt copy-paste internals for Android 13 (Genymobile#3497) - Add support for high-precision scrolling (Genymobile#3363, Genymobile#3369) - Add desktop entry files for Linux (Genymobile#295, Genymobile#296, Genymobile#748, Genymobile#1636, Genymobile#3351) - Add bash and zsh autocompletion for -s/--serial (Genymobile#3522, Genymobile#3523) - Use current adb port (if any) for --tcpip (Genymobile#3591, Genymobile#3592) - Add fallback to get display information on some devices (Genymobile#3416, Genymobile#3573) - Fix click behavior when --forward-all-clicks is set (Genymobile#3568, Genymobile#3579) - Fix support for non-ASCII characters in window title (Genymobile#2932, Genymobile#3547) - Fix getDisplayIds() crash on some versions of Android 13 beta (Genymobile#3446) - Upgrade platform-tools to 33.0.3 (adb) in Windows releases - Upgrade FFmpeg to 5.1.2 in Windows 64-bit releases - Upgrade SDL to 2.26.1 in Windows releases - Various technical fixes
See: https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html
Seems #296 is stale, so I created a replacement with fixes. Differences from the previous pull request are in the second commit.