diff --git a/Desktop Entries/README.md b/Desktop Entries/README.md index e915e70..6851ff9 100644 --- a/Desktop Entries/README.md +++ b/Desktop Entries/README.md @@ -1,20 +1,29 @@ # 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/desktop-entry-spec-latest.html) and are used by all apps (except 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](< +p> +-entry-spec-latest.html) and are used by all apps (not AppImages) and in other +areas. ## 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 -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 +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 @@ -24,31 +33,44 @@ sudo systemctl mask bluetooth 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 -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 -Sometimes you may need to get logs of your system. Systemd's `journalctl` is the standard tool for this. +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 different log types. +That entry uses multiple actions for the log types. -![Screenshot of the journalctl error entry](https://raw.githubusercontent.com/boredsquirrel/Linux/main/Desktop%20Entries/Images/journalctl-entry.jpg) +![Screenshot of the journalctl error +entry](< +r> +ies/Images/journalctl-entry.jpg) ## Applications -System-wide installed applications have their `.desktop` entries in `/usr/share/applications/`. To edit them, copy them to `~/.local/share/applications/`. These will be preferred over the system entries, effectively 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 -![Screenshot](https://raw.githubusercontent.com/trytomakeyouprivate/Linux/main/Desktop%20Entries/Images/konsole-desktop-entry.jpg) +![Screenshot](< +D> +esktop%20Entries/Images/konsole-desktop-entry.jpg) -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. @@ -69,20 +91,27 @@ EOF ``` You can do the same for: + - Running as root - Running over SSH -Now place the 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 -![Screenshot](https://raw.githubusercontent.com/trytomakeyouprivate/Linux/main/Desktop%20Entries/Images/firefox-desktop-entry.jpg) +![Screenshot](< +D> +esktop%20Entries/Images/firefox-desktop-entry.jpg) -Firefox can use profiles too. You might want to run it in private browsing mode or exclude it from a VPN (e.g., MullvadVPN). +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 name the folder properly (instead of using the cryptic default name). +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 in private browsing: +Run that profile but in private browsing: ```sh firefox -p --private-window @@ -94,49 +123,61 @@ Exclude a custom insecure profile from VPN: mullvad-exclude firefox -p INSECURE ``` -Open a link in an excluded browser: +Open a link in such an excluded browser: ```sh mullvad-exclude firefox -p INSECURE http://insecure.link.com ``` -This is useful for logging into captive portals 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: +Edit the Firefox desktop entry like this: ```sh -cp /usr/share/applications/org.mozilla.firefox.desktop ~/.local/share/applications/ +cp /usr/share/applications/org.mozilla.firefox.desktop +~/.local/share/applications/ ``` ### Delete App Data After Launching -This is Flatpak-specific and very useful. For example, the app [Decoder](https://flathub.org/apps/com.belmoussaoui.Decoder) keeps a history of all copied elements, which may not be desirable (e.g., for passwords). - -Flatpaks store their `.desktop` entries in: +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). -``` -/var/lib/flatpak/app/APPNAME/current/active/export/share/applications/ -``` +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. -Copy that to `~/.local/share/applications/` and edit it. - -Flatpaks store app data in `~/.var/app/APPNAME/`, making deletion 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 -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 | Open the app menu | Find the icon name in the list | |------------------|------------------------------| -| ![App launcher](https://raw.githubusercontent.com/boredsquirrel/Linux/main/Desktop%20Entries/Images/applauncher-find-icons.jpg) | ![App icon list](https://raw.githubusercontent.com/boredsquirrel/Linux/main/Desktop%20Entries/Images/find-icons.jpg) | +| ![App +launcher](< +E> +ntries/Images/applauncher-find-icons.jpg) | ![App icon +list](< +i> +es/Images/find-icons.jpg) | -Change "programs" to "all" to display all icons. These names can be used directly in the `Icon=` line of a `.desktop` file. +Change "programs" to "all" to display all icons. These names can directly be +used in the `Icon=` line. ### Finding Mimetypes -To associate an "app" with a specific file type (e.g., "adb install" or "java execute"), use the terminal: +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 @@ -145,15 +186,22 @@ cat /etc/mime.types | grep FILEEXTENSION cat /etc/mime.types | grep jar ``` -Or use KDE's "File Association" settings and search for the file extension (e.g., "jar"). +Or you can use KDE's "File Association" settings page and search for the file +extension (here, "jar"). -![System settings page for mimetypes](https://raw.githubusercontent.com/boredsquirrel/Linux/main/Desktop%20Entries/Images/file-names.jpg) +![System settings page for +mimetypes](< +0> +Entries/Images/file-names.jpg) Here, the mimetype is `application/x-java-archive`. -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 -MimeType=application/x-rpm;application/vnd.flatpak;application/vnd.flatpak.repo;application/vnd.flatpak.ref; \ No newline at end of file +MimeType=application/x-rpm;application/vnd.flatpak;application/vnd.flatpak.repo; + +application/vnd.flatpak.ref; +```