89luca89 / 89luca89/distrobox

[Suggestion] Integrate .desktop files in a more standard manner, similar to snaps, flatpak, nix etc

Aberta
#386 21 comentários 10 reações 0 responsáveis Ver no GitHub
enhancement
Linguagem predominante
Go
Estrelas
13k
Forks
541
Merge médio
20h 47min
PRs com merge (30d)
4

Descrição

This is similar to a request I made before but is much better thought out and inline with standard XDG practice.

Getting to the point, distrobox app exports could better conform to standard practices by storing exported .desktop files in a directory specifically for distrobox exports, while still showing up in users menu's.

for example $HOME/.distrobox/share
or any where deemed a better location.

To ensure exports show up in the users desktop menus the paths would be added to the users XDG_DATA_DIRS
via a command such as:
`echo export 'XDG_DATA_DIRS=$HOME/.distrobox/share:$HOME/.share:"${XDG_DATA_DIRS:-/usr/local/share/:/usr/share/}" ' >> ~/.xsessionrc
(This command sets up default XDG_DATA_DIRS if they are not already set up)

The .desktop files could also be stored in container specific files .distrobox/ubuntu/share and symlinked to .distrobox/share or whatever the chosen path is. Which would help with issue #301 and allow these files to be deleted simply by deleting the folder.

There are reasons other applications that export .desktop files create their own directory and add the directory to XDG_DATA_DIRS, and making it easier to clean up and manage exports I expect is a key aspect of it. This is practised by GNOME devs and others who are involved in discussing XDG/freedesktop.org standards.

I think if this is not standard behaviour it should at least be an available option via config files, or app exports should accept a custom location so this can be implemented simply by users.

Stack Exchange answer where I got the idea: https://unix.stackexchange.com/questions/310666/nix-desktop-files

*PS: If this suggestion is approved of, I can implement it and submit a pull request.

Guia de contribuição

Abrir o guia de contribuição

Direção de pesquisa

Examine o comando distrobox export e como ele atualmente grava arquivos .desktop. Entenda a variável de ambiente XDG_DATA_DIRS e onde o script a define. Verifique se há um arquivo de configuração para os locais de exportação. O objetivo é modificar a lógica de exportação para gravar em um diretório dedicado como ~/.distrobox/share e garantir que ele seja adicionado a XDG_DATA_DIRS, possivelmente por meio de .xsessionrc ou algo semelhante.

Escrita pelo modelo de indexação a partir do texto da issue.

Avaliação

Stack de tecnologia
bash, linux
Domínio
cli, developer-experience
Tipo de issue
Funcionalidade
Dificuldade
3/5
Tempo estimado
1-2 dias
Status de atividade
Estagnada
Clareza
Razoavelmente clara
Facilidade para iniciantes
45/100

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.