-
-
Notifications
You must be signed in to change notification settings - Fork 10.9k
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
Desktop entry file for Linux app launchers (resolves #295) #296
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
[Desktop Entry] | ||
Name=scrcpy | ||
GenericName=Android Remote Control | ||
Comment=Display and control your Android device | ||
Exec=scrcpy | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. At first, it did not work for me. To get the error, I changed to:
And
In fact, the In practice, do you use the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I add the file in
After it, click the icon from menu. Scrcpy starts as expected. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe you can try to change Exec to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I guess |
||
Icon=gparted | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The Android icon at https://github.com/Genymobile/scrcpy/blob/v1.18/app/src/icon.xpm may be a better choice. Here is an improved patch: diff --git a/app/meson.build b/app/meson.build
index 0663c64..321ed38 100644
--- a/app/meson.build
+++ b/app/meson.build
@@ -148,6 +148,14 @@ executable('scrcpy', src,
install_man('scrcpy.1')
+# Desktop entry file for application launchers
+if host_machine.system() == 'linux'
+ # -> /usr/share/applications/scrcpy.desktop
+ install_data('scrcpy.desktop', install_dir : join_paths(get_option('datadir'), 'applications'))
+ install_data('src/icon.xpm', rename: 'scrcpy.xpm',
+ install_dir : join_paths(get_option('datadir'), 'icons', 'hicolor', '48x48', 'apps'))
+endif
+
### TESTS
diff --git a/app/scrcpy.desktop b/app/scrcpy.desktop
new file mode 100644
index 0000000..5933272
--- /dev/null
+++ b/app/scrcpy.desktop
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Name=scrcpy
+GenericName=Android Remote Control
+Comment=Display and control your Android device
+Exec=scrcpy
+Icon=scrcpy
+Terminal=false
+Type=Application
+Categories=Utility;RemoteAccess;
+StartupNotify=false |
||
Terminal=false | ||
Type=Application | ||
Categories=Utility;RemoteAccess; | ||
StartupNotify=false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(by default
/usr/local/share/applications/scrcpy.desktop
, but you can keep this comment as is, it's explicit enough)