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

MR #3817 Breaks launching scrcpy-console using the .desktop file #4367

Closed
gardotd426 opened this issue Oct 21, 2023 · 3 comments
Closed

MR #3817 Breaks launching scrcpy-console using the .desktop file #4367

gardotd426 opened this issue Oct 21, 2023 · 3 comments

Comments

@gardotd426
Copy link

  • [x ] I have read the FAQ.
  • [ x] I have searched in existing issues.

Environment

  • OS: Arch Linux
  • scrcpy version: Master
  • installation method: From source via AUR
  • model: N/A
  • Android version: N/A

Describe the bug
#3817 breaks scrcpy-console, because there are one too many backslashes in the Exec line.

/bin/bash --norc --noprofile -i -c "\"\\$SHELL\" -i -c scrcpy || read -p 'Press Enter to quit...'"

errors out, because it reads it as \/bin/zsh (or \/bin/bash, \/bin/fish, etc) and gives you a \/bin/zsh: no such file or directory error.

Removing one of the backslashes before $SHELL fixes the problem completely and you can launch scrcpy-console from the .desktop file as intended.

bash: \/bin/zsh: No such file or directory
Press Enter to quit...

Here's what happens when I run /bin/bash --norc --noprofile -i -c "\"\$SHELL\" -i -c scrcpy || read -p 'Press Enter to quit...'":

scrcpy 2.1.1 <https://github.com/Genymobile/scrcpy>
ERROR: Could not find any ADB device
ERROR: Server connection failed
Press Enter to quit...

Obviously I don't have adb running so that error can be ignored, when I have adb running and a device connected, it functions.

This may be a new issue due to Plasma updating or , but during my update I got this warning and many similar other warnings about other desktop files:

kf.config.core: "KConfigIni: In file /usr/share/applications/scrcpy-console.desktop, line 8: " "Invalid escape sequence \"\\\"\"."

kf.config.core: "KConfigIni: In file /usr/share/applications/scrcpy-console.desktop, line 8: " "Invalid escape sequence \"\\\"\"."
@rom1v
Copy link
Collaborator

rom1v commented Oct 21, 2023

Thank you for your report.

After #4130 (on dev branch), the .desktop scripts have been simplified a bit.

Could you please open a PR based on dev branch which fixes this issue?

@gardotd426
Copy link
Author

gardotd426 commented Oct 21, 2023 via email

@rom1v
Copy link
Collaborator

rom1v commented Oct 30, 2023

Did you have time to take a look?

rom1v pushed a commit that referenced this issue Nov 24, 2023
There were too many backslashes in the Exec line.

Fixes #4367 <#4367>
PR #4448 <#4448>
rom1v pushed a commit that referenced this issue Nov 24, 2023
There were too many backslashes in the Exec line.

Fixes #4367 <#4367>
PR #4448 <#4448>

Signed-off-by: Romain Vimont <[email protected]>
rom1v pushed a commit that referenced this issue Nov 24, 2023
This does not work properly on some desktop environments (KDE), and
$SHELL is unlikely to require quoting.

Fixes #4367 <#4367>
PR #4448 <#4448>

Signed-off-by: Romain Vimont <[email protected]>
rom1v pushed a commit that referenced this issue Nov 25, 2023
This does not work properly on some desktop environments (KDE), and
$SHELL is unlikely to require quoting.

Fixes #4367 <#4367>
PR #4448 <#4448>

Signed-off-by: Romain Vimont <[email protected]>
@rom1v rom1v closed this as completed in 8db4e78 Nov 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants