DioxusLabs / DioxusLabs/dioxus
Can't change name of Dioxus application
- Dominant language
- Rust
- Stars
- 39.1k
- Forks
- 1.9k
- Avg merge
- 4d 10h
- Merged PRs (30d)
- 4
Description
## Feature Request
I've been looking for a way to change the name of my application (not the title of the window), which is displayed in app listings, system trays, etc.
## The Problem
As I understand it, cargo currently just takes the name of the package in Cargo.toml, e.g. subnet-calculator, and translates the name of the application to "SubnetCalculator" with no space. This is then used in .desktop file on linux.
This is how it looks:
I confirmed this by setting the name of the package in Cargo.toml to:
```[package]
name = "subnet-calculatorsss"
```
And I get:
## Debugging
Attempting to set the `name` variable in Dioxus.toml with something like:
```
[application]
name = "Subnet Calculator"
```
or
```
[bundle]
name = "Subnet Calculator"
```
Doesn't work or even do anything.
I then attempted to add my own .desktop, with something like: (in Dioxus.toml)
```
[bundle.linux]
resources = ["assets/SubnetCalculator.desktop"]
```
And the content:
```
[Desktop Entry]
Type=Application
Name=Subnet Calculator
Comment=IPv4/IPv6 subnet calculator and network tools
Exec=subnet-calculator
Icon=subnet-calculator
Terminal=false
Categories=Utility;Network;
StartupWMClass=subnet-calculator
```
And re-bundling I see that the file doesn't replace the .desktop file in `share/` instead it is placed in `lib/`. Which is a lower priority and doesn't get used to bundle the final .deb file:
## Workaround
The current workaround is going into the `target` directory and manually editing the file in `data/usr/share/applications/SubnetCalculator.desktop` and changing the name or add other attributes.
And then rebuilding the .deb with `dpkg-deb --build data/`:
### Implement Suggestion
Grant us the ability to control the name of the application via the Dioxus.toml file.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.