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

suggest xdg-utils to install *.desktop #11066

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Rudxain
Copy link
Contributor

@Rudxain Rudxain commented Jul 1, 2024

This seems more cross-platform, despite depending on a package that isn't coreutils.

Note

It seems --size can't be omitted

@the-mikedavis the-mikedavis added the A-documentation Area: Documentation improvements label Jul 1, 2024
@Rudxain
Copy link
Contributor Author

Rudxain commented Jul 3, 2024

On my GNOME install, xdg-desktop-icon install seems to simply cp the shortcut to ~/Desktop instead of ~/.local/share/applications.

I'll revert that cmd only, as xdg-icon-resource install seems to work as intended

@Rudxain

This comment was marked as outdated.

book/src/building-from-source.md Show resolved Hide resolved
book/src/building-from-source.md Outdated Show resolved Hide resolved
@Rudxain Rudxain changed the title Use xdg-utils to install *.desktop shortcut suggest xdg-utils to install *.desktop Jul 7, 2024
@EpocSquadron
Copy link
Contributor

I think this is a bit confusing as is. There are three lines in one code block with no commentary about whether all three are needed or not. Simply commenting one line doesn't communicate that it is an option or why you would use that option. I had to expand the review discussions in this PR to understand what was going on.

Can we summarize the comments in this PR in the document itself?

@Rudxain
Copy link
Contributor Author

Rudxain commented Jul 10, 2024

Can we summarize the comments in this PR in the document itself?

What about something along the lines of this? :

Use the xdg-* alternative if cp doesn't work for your system.

For more info, refer to #11066

@David-Else
Copy link
Contributor

Can we summarize the comments in this PR in the document itself?

What about something along the lines of this? :

Use the xdg-* alternative if cp doesn't work for your system.
For more info, refer to #11066

I have looked at this thread and can't find an explanation of why cp would not work on anyone's system? I think using xdg-utils is a fantastic idea, how about having first the xdg-utils option, and then in a comment the cp option? If some systems have some quirks with xdg-utils then people can use the cp option. Like the following, but for everything:

xdg-icon-resource install --novendor --size 256 contrib/helix.png # cp contrib/helix.png -- "$HOME/.icons" # or "$HOME/.local/share/icons"

On Debian 12 the following are all installed by default, how about Ubuntu?

$ xdg- (press tab for completion)
xdg-dbus-proxy            xdg-desktop-menu          xdg-icon-resource         xdg-open                  xdg-settings              xdg-user-dirs-gtk-update  
xdg-desktop-icon          xdg-email                 xdg-mime                  xdg-screensaver           xdg-user-dir              xdg-user-dirs-update      

@Rudxain
Copy link
Contributor Author

Rudxain commented Nov 21, 2024

why cp would not work

The problem isn't that cp itself won't be available or might fail, the actual problem is that the hard-coded destination path may not be "especial", so using xdg guarantees the copy will have the desired effect (rather than being no-op)

@Rudxain
Copy link
Contributor Author

Rudxain commented Nov 21, 2024

BTW, could I (please) amend the last commit? I want to use my GH email rather than the placeholder, but that requires a force-push

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-documentation Area: Documentation improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants