-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixed CI so I don't have to manually edit markdowns anymore
- Loading branch information
1 parent
2c37099
commit 96b37ed
Showing
2 changed files
with
160 additions
and
146 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,207 +1,207 @@ | ||
| # Custom Desktop Entries | | ||
# Custom Desktop Entries | ||
|
||
| Desktop entries are the graphical icons and names in your app menu and other | | ||
| areas. They follow [the Freedesktop | | ||
| specification](<<https://specifications.freedesktop.org/desktop-entry-spec/deskto> | | ||
| p> | | ||
| -entry-spec-latest.html) and are used by all apps (not AppImages) and in other | | ||
| areas. | | ||
Desktop entries are the graphical icons and names in your app menu and other | ||
areas. They follow [the Freedesktop | ||
specification](<<https://specifications.freedesktop.org/desktop-entry-spec/deskto> | ||
p> | ||
-entry-spec-latest.html) and are used by all apps (not AppImages) and in other | ||
areas. | ||
|
||
| ## System Actions | | ||
## System Actions | ||
|
||
| Some useful system actions can be "GUI-fied" using desktop entries. They will | | ||
| show up as apps. | | ||
Some useful system actions can be "GUI-fied" using desktop entries. They will | ||
show up as apps. | ||
|
||
| If you want to run `sudo` actions, use `pkexec` instead, which shows a GUI | | ||
| password prompt. | | ||
If you want to run `sudo` actions, use `pkexec` instead, which shows a GUI | ||
password prompt. | ||
|
||
| ### Bluetooth Toggle | | ||
### Bluetooth Toggle | ||
|
||
| If you want to disable Bluetooth permanently but keep the ability to enable it | | ||
| when needed, use the user variant. However, it requires these steps before: | | ||
If you want to disable Bluetooth permanently but keep the ability to enable it | ||
when needed, use the user variant. However, it requires these steps before: | ||
|
||
| ```sh | | ||
| # Copy system service to user dir | | ||
| sudo cp /usr/lib/systemd/system/bluetooth.service | | ||
| /etc/systemd/user/bluetooth-user.service | | ||
```sh | ||
# Copy system service to user dir | ||
sudo cp /usr/lib/systemd/system/bluetooth.service | ||
/etc/systemd/user/bluetooth-user.service | ||
|
||
| # Disable and mask the system service | | ||
| sudo systemctl disable --now bluetooth | | ||
| sudo systemctl mask bluetooth | | ||
# Disable and mask the system service | ||
sudo systemctl disable --now bluetooth | ||
sudo systemctl mask bluetooth | ||
|
||
| # Reload to make it work | | ||
| systemctl --user daemon-reload | | ||
| ``` | | ||
# Reload to make it work | ||
systemctl --user daemon-reload | ||
``` | ||
|
||
| The user variant does not require `wheel` group permissions and does not | | ||
| display a password prompt. | | ||
The user variant does not require `wheel` group permissions and does not | ||
display a password prompt. | ||
|
||
| ### Execute or Install Files | | ||
### Execute or Install Files | ||
|
||
| Some files, like `.jar` archives or Android `.apk` packages, don't have a | | ||
| graphical "app" registered to execute them. | | ||
Some files, like `.jar` archives or Android `.apk` packages, don't have a | ||
graphical "app" registered to execute them. | ||
|
||
| Most others, like system packages or `.flatpakref`, `.flatpakrepo`, normally | | ||
| have a graphical app store assigned to open them. | | ||
Most others, like system packages or `.flatpakref`, `.flatpakrepo`, normally | ||
have a graphical app store assigned to open them. | ||
|
||
| ### Journalctl Errors | | ||
### Journalctl Errors | ||
|
||
| Sometimes you may need to get some logs of your system. Systemd's `journalctl` | | ||
| is pretty standardized as the way to retrieve them. | | ||
Sometimes you may need to get some logs of your system. Systemd's `journalctl` | ||
is pretty standardized as the way to retrieve them. | ||
|
||
| That entry uses multiple actions for the log types. | | ||
That entry uses multiple actions for the log types. | ||
|
||
|  | | ||
 | ||
|
||
| ## Applications | | ||
## Applications | ||
|
||
| System-wide installed applications have their `.desktop` entry in | | ||
| `/usr/share/applications/`. To edit them, copy them to | | ||
| `~/.local/share/applications/`. These will be preferred over the system | | ||
| entries, practically overwriting them. | | ||
System-wide installed applications have their `.desktop` entry in | ||
`/usr/share/applications/`. To edit them, copy them to | ||
`~/.local/share/applications/`. These will be preferred over the system | ||
entries, practically overwriting them. | ||
|
||
| ### Konsole | | ||
### Konsole | ||
|
||
|  | | ||
 | ||
|
||
| Konsole has a few annoyances that can be easily fixed. It always opens in a new | | ||
| window, even though it supports tabs. | | ||
Konsole has a few annoyances that can be easily fixed. It always opens in a new | ||
window, even though it supports tabs. | ||
|
||
| You may also want to add custom actions and profiles for certain tasks. | | ||
You may also want to add custom actions and profiles for certain tasks. | ||
|
||
| Adding a profile to launch inside a Distrobox: | | ||
Adding a profile to launch inside a Distrobox: | ||
|
||
| ```sh | | ||
| mkdir -v ~/.local/share/konsole | | ||
| cat > ~/.local/share/konsole/FedoraBox.profile <<EOF | | ||
| [Appearance] | | ||
| ColorScheme=BlueOnBlack | | ||
```sh | ||
mkdir -v ~/.local/share/konsole | ||
cat > ~/.local/share/konsole/FedoraBox.profile <<EOF | ||
[Appearance] | ||
ColorScheme=BlueOnBlack | ||
| [General] | | ||
| Command=distrobox-enter FedoraBox -- fish | | ||
| Icon=Box | | ||
| Name=Fedorabox | | ||
| Parent=FALLBACK/ | | ||
| EOF | | ||
| ``` | | ||
[General] | ||
Command=distrobox-enter FedoraBox -- fish | ||
Icon=Box | ||
Name=Fedorabox | ||
Parent=FALLBACK/ | ||
EOF | ||
``` | ||
|
||
| You can do the same for: | | ||
You can do the same for: | ||
|
||
| - Running as root | | ||
| - Running over SSH | | ||
- Running as root | ||
- Running over SSH | ||
|
||
| Now place my desktop entry in the correct location, and it will change | | ||
| immediately. | | ||
Now place my desktop entry in the correct location, and it will change | ||
immediately. | ||
|
||
| ### Firefox | | ||
### Firefox | ||
|
||
|  | | ||
 | ||
|
||
| Firefox can use profiles too. You might want to run it in private browsing mode | | ||
| or exclude it from a VPN (here, MullvadVPN as an example). | | ||
Firefox can use profiles too. You might want to run it in private browsing mode | ||
or exclude it from a VPN (here, MullvadVPN as an example). | ||
|
||
| Use `firefox -p` or `flatpak run org.mozilla.firefox -p`, respectively. Create | | ||
| a new profile, use a custom location, and use a folder with a dedicated name. | | ||
| Otherwise, it will be a cryptic sequence of symbols. | | ||
Use `firefox -p` or `flatpak run org.mozilla.firefox -p`, respectively. Create | ||
a new profile, use a custom location, and use a folder with a dedicated name. | ||
Otherwise, it will be a cryptic sequence of symbols. | ||
|
||
| Run that profile but in private browsing: | | ||
Run that profile but in private browsing: | ||
|
||
| ```sh | | ||
| firefox -p --private-window | | ||
|``` | | ||
```sh | ||
firefox -p --private-window | ||
``` | ||
|
||
| Exclude a custom insecure profile from VPN: | | ||
Exclude a custom insecure profile from VPN: | ||
|
||
| ```sh | | ||
| mullvad-exclude firefox -p INSECURE | | ||
|``` | | ||
```sh | ||
mullvad-exclude firefox -p INSECURE | ||
``` | ||
|
||
| Open a link in such an excluded browser: | | ||
Open a link in such an excluded browser: | ||
|
||
| ```sh | | ||
| mullvad-exclude firefox -p INSECURE http://insecure.link.com | | ||
|``` | | ||
```sh | ||
mullvad-exclude firefox -p INSECURE http://insecure.link.com | ||
``` | ||
|
||
| This is needed for logging into captive portals (yes, they suck...) or using | | ||
| sites that block VPN servers. | | ||
This is needed for logging into captive portals (yes, they suck...) or using | ||
sites that block VPN servers. | ||
|
||
| Edit the Firefox desktop entry like this: | | ||
Edit the Firefox desktop entry like this: | ||
|
||
| ```sh | | ||
| cp /usr/share/applications/org.mozilla.firefox.desktop | | ||
| ~/.local/share/applications/ | | ||
|``` | | ||
```sh | ||
cp /usr/share/applications/org.mozilla.firefox.desktop | ||
~/.local/share/applications/ | ||
``` | ||
|
||
| ### Delete App Data After Launching | | ||
### Delete App Data After Launching | ||
|
||
| This is Flatpak-specific and very useful. For example, the app | | ||
| [Decoder](https://flathub.org/apps/com.belmoussaoui.Decoder) will keep a | | ||
| history of all copied elements, even though this may not be desired (i.e., | | ||
| sending passwords). | | ||
This is Flatpak-specific and very useful. For example, the app | ||
[Decoder](https://flathub.org/apps/com.belmoussaoui.Decoder) will keep a | ||
history of all copied elements, even though this may not be desired (i.e., | ||
sending passwords). | ||
|
||
| Flatpaks have their desktop entries in | | ||
| `/var/lib/flatpak/app/APPNAME/current/active/export/share/applications/`. Copy | | ||
| that to `~/.local/share/applications/` and edit it here. | | ||
Flatpaks have their desktop entries in | ||
`/var/lib/flatpak/app/APPNAME/current/active/export/share/applications/`. Copy | ||
that to `~/.local/share/applications/` and edit it here. | ||
|
||
| Flatpaks store their app data in `~/.var/app/APPNAME/`, which makes deleting it | | ||
| easy. Just add `&& rm -rf ~/.var/app/APPNAME` after the `Exec=` command, and it | | ||
| will delete itself after closing the app. | | ||
Flatpaks store their app data in `~/.var/app/APPNAME/`, which makes deleting it | ||
easy. Just add `&& rm -rf ~/.var/app/APPNAME` after the `Exec=` command, and it | ||
will delete itself after closing the app. | ||
|
||
| ## Tips | | ||
## Tips | ||
|
||
| If you want to find system icons or mimetypes (the name a file is recognized | | ||
| by), you can do both graphically in KDE. | | ||
If you want to find system icons or mimetypes (the name a file is recognized | ||
by), you can do both graphically in KDE. | ||
|
||
| ### Finding System Icons | | ||
### Finding System Icons | ||
|
||
| Open the app menu | Find the icon name in the list | | ||
|------------------|------------------------------| | ||
|  |  | | | ||
launcher](<<https://raw.githubusercontent.com/boredsquirrel/Linux/main/Desktop%20> | ||
E> | ||
ntries/Images/applauncher-find-icons.jpg) |  | | ||
|
||
| Change "programs" to "all" to display all icons. These names can directly be | | ||
| used in the `Icon=` line. | | ||
Change "programs" to "all" to display all icons. These names can directly be | ||
used in the `Icon=` line. | ||
|
||
| ### Finding Mimetypes | | ||
### Finding Mimetypes | ||
|
||
| To associate an "app" with a specific file type (see "adb install" and "java | | ||
| execute"), in the terminal, you can use: | | ||
To associate an "app" with a specific file type (see "adb install" and "java | ||
execute"), in the terminal, you can use: | ||
|
||
| ```sh | | ||
| cat /etc/mime.types | grep FILEEXTENSION | | ||
```sh | ||
cat /etc/mime.types | grep FILEEXTENSION | ||
|
||
| # Example: | | ||
| cat /etc/mime.types | grep jar | | ||
| ``` | | ||
# Example: | ||
cat /etc/mime.types | grep jar | ||
``` | ||
|
||
| Or you can use KDE's "File Association" settings page and search for the file | | ||
| extension (here, "jar"). | | ||
Or you can use KDE's "File Association" settings page and search for the file | ||
extension (here, "jar"). | ||
|
||
|  | | ||
 | ||
|
||
| Here, the mimetype is `application/x-java-archive`. | | ||
Here, the mimetype is `application/x-java-archive`. | ||
|
||
| As an example, see KDE Discover's associated mimetypes: | | ||
As an example, see KDE Discover's associated mimetypes: | ||
|
||
| ```sh | | ||
| $ cat /usr/share/applications/org.kde.discover.desktop | grep Mime | | ||
```sh | ||
$ cat /usr/share/applications/org.kde.discover.desktop | grep Mime | ||
|
||
| MimeType=application/x-rpm;application/vnd.flatpak;application/vnd.flatpak.repo; | | ||
MimeType=application/x-rpm;application/vnd.flatpak;application/vnd.flatpak.repo; | ||
|
||
| application/vnd.flatpak.ref; | | ||
| ``` | | ||
application/vnd.flatpak.ref; | ||
``` |