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

Provide a basic .desktop file for Linux #1556

Closed
wants to merge 1 commit into from
Closed

Provide a basic .desktop file for Linux #1556

wants to merge 1 commit into from

Conversation

timschumi
Copy link

@timschumi timschumi commented Feb 20, 2020

Some distributions started to adopt Ghidra into their package repositories, but won't include a .desktop file due to upstream not providing one.

Since Ghidra doesn't have a set default installation location, this .desktop file needs either modification on the users end (to include the full path) or the ghidraRun script has to be present in the search PATH (in addition to the icon being present in one of the icon search directories/providing a full path to that as well).

@anthraxx
Copy link

Small question, where exactly does the Icon=ghidra come from, which specific icon file in this repository is meant?

@timschumi
Copy link
Author

timschumi commented Mar 12, 2020

I tested with the GhidraIcon*.png files that are used for the taskbar icon as well. As far as I could tell, every one of those icon sizes worked fine.

One possible path where that image might be placed (so that it is picked up without a full path) is /usr/share/pixmaps.

EDIT: By the way, I'm not sure whether my code to copy out the .desktop file would work in practice. If someone could take a look at that specifically that would be nice.

@timschumi
Copy link
Author

Thinking about it, copying out one of those images next to the .desktop file would be beneficial to people who build packages from the official release package alone (since as far as I know, the files I linked earlier are embedded into the executable as a resource and not easily accessible).

Also, .ico files do not work. While they are correctly picked up by the image search, the inclusion of multiple resolutions in the same file seems to create issues when rendering (causing some distortion or even an image completely filled with static).

@class101
Copy link

class101 commented Dec 23, 2020

Here is common system-wide implementation tested working on Arch Linux

/usr/share/applications/Ghidra.desktop

[Desktop Entry]
Name=Ghidra
Exec=/opt/ghidra/ghidraRun
Comment=
Terminal=false
Icon=ghidra
Type=Application

Icons (from Generic.jar also attached in ghidra.zip)

GhidraIcon16.png -> /usr/share/icons/hicolor/16x16/apps/ghidra.png
GhidraIcon24.png -> /usr/share/icons/hicolor/24x24/apps/ghidra.png
GhidraIcon32.png -> /usr/share/icons/hicolor/32x32/apps/ghidra.png
GhidraIcon48.png -> /usr/share/icons/hicolor/48x48/apps/ghidra.png
GhidraIcon64.png -> /usr/share/icons/hicolor/64x64/apps/ghidra.png
GhidraIcon128.png -> /usr/share/icons/hicolor/128x128/apps/ghidra.png
GhidraIcon256.png -> /usr/share/icons/hicolor/256x256/apps/ghidra.png

This is a great idea. In my opinion this would standardize the package with what is usually done with others, and the icons are pretty cool well done :)

I initially asked the Arch Linux package maintainer to do that because I first thought this was Arch maintainer responsibility to do that but they asked to report upstream.

What do you think guys, is it implementable this way ?

PS1: Also I'm not sure it has been implemented in 9.2.1, as of writing Arch Linux package is still on 9.2 and is missing this.

PS2: you might need to refresh the icon cache on your system after moving the icon files

sudo touch /usr/share/icons/hicolor
sudo gtk-update-icon-cache

ghidra.zip

@ryanmkurtz
Copy link
Collaborator

We do not plan to include a .desktop file in our release at this time.

@ryanmkurtz ryanmkurtz closed this Jul 23, 2021
@ryanmkurtz ryanmkurtz added the Reason: Won't support This will not be supported by the Ghidra team. label Jul 23, 2021
@timschumi timschumi deleted the desktop-file branch July 23, 2021 12:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature: Platform/Linux Reason: Won't support This will not be supported by the Ghidra team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants