Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upDesktop entry file for Linux app launchers (resolves #295) #296
Conversation
Cool One small drawback is that scrcpy uses the terminal to output info and error, and there is no terminal when started from the menu (but it's like on Windows then). |
@@ -143,6 +143,12 @@ endif | |||
|
|||
executable('scrcpy', src, dependencies: dependencies, include_directories: src_dir, install: true, c_args: c_args, link_args: link_args) | |||
|
|||
# Desktop entry file for application launchers | |||
if host_machine.system() == 'linux' | |||
# -> /usr/share/applications/scrcpy.desktop |
This comment has been minimized.
This comment has been minimized.
rom1v
Oct 14, 2018
Collaborator
(by default /usr/local/share/applications/scrcpy.desktop
, but you can keep this comment as is, it's explicit enough)
GenericName=Android Remote Control | ||
Comment=Display and control your Android device | ||
Exec=scrcpy | ||
Icon=gparted |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Name=scrcpy | ||
GenericName=Android Remote Control | ||
Comment=Display and control your Android device | ||
Exec=scrcpy |
This comment has been minimized.
This comment has been minimized.
rom1v
Oct 14, 2018
•
Collaborator
At first, it did not work for me.
To get the error, I changed to:
Exec=bash -c "scrcpy &> /tmp/log"
And /tmp/log
contained:
exec: No such file or directory
ERROR: 'adb' command not found (make it accessible from your PATH or define its full path in the ADB environment variable)
ERROR: Could not execute "adb push"
In fact, the adb
directory is added in PATH
in my .bashrc
, so it's not in PATH
when the session is started, so starting it for the menu does not work in that case.
In practice, do you use the android-tools-adb
package, or did you put your adb
directory in PATH
from somewhere else?
This comment has been minimized.
This comment has been minimized.
npes87184
Jan 19, 2019
•
Contributor
I add the file in /usr/share/applications/scrcpy.desktop
with content:
[Desktop Entry]
Name=scrcpy
GenericName=Android Remote Control
Comment=Display and control your Android device
Exec=scrcpy
Icon=gparted
Terminal=false
Type=Application
Categories=Utility;RemoteAccess;
StartupNotify=false
After it, click the icon from menu. Scrcpy starts as expected.
This comment has been minimized.
This comment has been minimized.
npes87184
Jan 24, 2019
Contributor
Maybe you can try to change Exec to echo $PATH > /tmp/path_out
and execute again to get more info for debugging.
srevinsaju
commented
Aug 27, 2019
If you add this code as This is the one I used for the Windows version of guiscrcpy Hope it helps.. |
unclehowell
commented
Oct 16, 2019
In my experience its better to have the .Desktop run a script which resets network adaptors and establishes connection with the android first. In the script the correct screen size and connection speed can be set and appropriate sleep times between commands |
asnelling commentedOct 14, 2018
Adds the ability to launch scrcpy using your preferred application launcher on Linux.
See: https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html