Skip to content

Commit 3b6cccf

Browse files
author
primalbeing
committed
revert
1 parent c7d9d18 commit 3b6cccf

File tree

1 file changed

+88
-40
lines changed

1 file changed

+88
-40
lines changed

Desktop Entries/README.md

Lines changed: 88 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,29 @@
11
# Custom Desktop Entries
22

3-
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.
3+
Desktop entries are the graphical icons and names in your app menu and other
4+
areas. They follow [the Freedesktop
5+
specification](<<https://specifications.freedesktop.org/desktop-entry-spec/deskto>
6+
p>
7+
-entry-spec-latest.html) and are used by all apps (not AppImages) and in other
8+
areas.
49

510
## System Actions
611

7-
Some useful system actions can be "GUI-fied" using desktop entries. They will show up as apps.
12+
Some useful system actions can be "GUI-fied" using desktop entries. They will
13+
show up as apps.
814

9-
If you want to run `sudo` actions, use `pkexec` instead, which shows a GUI password prompt.
15+
If you want to run `sudo` actions, use `pkexec` instead, which shows a GUI
16+
password prompt.
1017

1118
### Bluetooth Toggle
1219

13-
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:
20+
If you want to disable Bluetooth permanently but keep the ability to enable it
21+
when needed, use the user variant. However, it requires these steps before:
1422

1523
```sh
1624
# Copy system service to user dir
17-
sudo cp /usr/lib/systemd/system/bluetooth.service /etc/systemd/user/bluetooth-user.service
25+
sudo cp /usr/lib/systemd/system/bluetooth.service
26+
/etc/systemd/user/bluetooth-user.service
1827

1928
# Disable and mask the system service
2029
sudo systemctl disable --now bluetooth
@@ -24,31 +33,44 @@ sudo systemctl mask bluetooth
2433
systemctl --user daemon-reload
2534
```
2635

27-
The user variant does not require `wheel` group permissions and does not display a password prompt.
36+
The user variant does not require `wheel` group permissions and does not
37+
display a password prompt.
2838

2939
### Execute or Install Files
3040

31-
Some files, like `.jar` archives or Android `.apk` packages, don't have a graphical "app" registered to execute them.
41+
Some files, like `.jar` archives or Android `.apk` packages, don't have a
42+
graphical "app" registered to execute them.
3243

33-
Most others, like system packages or `.flatpakref`, `.flatpakrepo`, normally have a graphical app store assigned to open them.
44+
Most others, like system packages or `.flatpakref`, `.flatpakrepo`, normally
45+
have a graphical app store assigned to open them.
3446

3547
### Journalctl Errors
3648

37-
Sometimes you may need to get logs of your system. Systemd's `journalctl` is the standard tool for this.
49+
Sometimes you may need to get some logs of your system. Systemd's `journalctl`
50+
is pretty standardized as the way to retrieve them.
3851

39-
That entry uses multiple actions for different log types.
52+
That entry uses multiple actions for the log types.
4053

41-
![Screenshot of the journalctl error entry](https://raw.githubusercontent.com/boredsquirrel/Linux/main/Desktop%20Entries/Images/journalctl-entry.jpg)
54+
![Screenshot of the journalctl error
55+
entry](<<https://raw.githubusercontent.com/boredsquirrel/Linux/main/Desktop%20Ent>
56+
r>
57+
ies/Images/journalctl-entry.jpg)
4258

4359
## Applications
4460

45-
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.
61+
System-wide installed applications have their `.desktop` entry in
62+
`/usr/share/applications/`. To edit them, copy them to
63+
`~/.local/share/applications/`. These will be preferred over the system
64+
entries, practically overwriting them.
4665

4766
### Konsole
4867

49-
![Screenshot](https://raw.githubusercontent.com/trytomakeyouprivate/Linux/main/Desktop%20Entries/Images/konsole-desktop-entry.jpg)
68+
![Screenshot](<<https://raw.githubusercontent.com/trytomakeyouprivate/Linux/main/>
69+
D>
70+
esktop%20Entries/Images/konsole-desktop-entry.jpg)
5071

51-
Konsole has a few annoyances that can be easily fixed. It always opens in a new window, even though it supports tabs.
72+
Konsole has a few annoyances that can be easily fixed. It always opens in a new
73+
window, even though it supports tabs.
5274

5375
You may also want to add custom actions and profiles for certain tasks.
5476

@@ -69,20 +91,27 @@ EOF
6991
```
7092

7193
You can do the same for:
94+
7295
- Running as root
7396
- Running over SSH
7497

75-
Now place the desktop entry in the correct location, and it will change immediately.
98+
Now place my desktop entry in the correct location, and it will change
99+
immediately.
76100

77101
### Firefox
78102

79-
![Screenshot](https://raw.githubusercontent.com/trytomakeyouprivate/Linux/main/Desktop%20Entries/Images/firefox-desktop-entry.jpg)
103+
![Screenshot](<<https://raw.githubusercontent.com/trytomakeyouprivate/Linux/main/>
104+
D>
105+
esktop%20Entries/Images/firefox-desktop-entry.jpg)
80106

81-
Firefox can use profiles too. You might want to run it in private browsing mode or exclude it from a VPN (e.g., MullvadVPN).
107+
Firefox can use profiles too. You might want to run it in private browsing mode
108+
or exclude it from a VPN (here, MullvadVPN as an example).
82109

83-
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).
110+
Use `firefox -p` or `flatpak run org.mozilla.firefox -p`, respectively. Create
111+
a new profile, use a custom location, and use a folder with a dedicated name.
112+
Otherwise, it will be a cryptic sequence of symbols.
84113

85-
Run that profile in private browsing:
114+
Run that profile but in private browsing:
86115

87116
```sh
88117
firefox -p --private-window
@@ -94,49 +123,61 @@ Exclude a custom insecure profile from VPN:
94123
mullvad-exclude firefox -p INSECURE
95124
```
96125

97-
Open a link in an excluded browser:
126+
Open a link in such an excluded browser:
98127

99128
```sh
100129
mullvad-exclude firefox -p INSECURE http://insecure.link.com
101130
```
102131

103-
This is useful for logging into captive portals or using sites that block VPN servers.
132+
This is needed for logging into captive portals (yes, they suck...) or using
133+
sites that block VPN servers.
104134

105-
Edit the Firefox desktop entry:
135+
Edit the Firefox desktop entry like this:
106136

107137
```sh
108-
cp /usr/share/applications/org.mozilla.firefox.desktop ~/.local/share/applications/
138+
cp /usr/share/applications/org.mozilla.firefox.desktop
139+
~/.local/share/applications/
109140
```
110141

111142
### Delete App Data After Launching
112143

113-
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).
114-
115-
Flatpaks store their `.desktop` entries in:
144+
This is Flatpak-specific and very useful. For example, the app
145+
[Decoder](https://flathub.org/apps/com.belmoussaoui.Decoder) will keep a
146+
history of all copied elements, even though this may not be desired (i.e.,
147+
sending passwords).
116148

117-
```
118-
/var/lib/flatpak/app/APPNAME/current/active/export/share/applications/
119-
```
149+
Flatpaks have their desktop entries in
150+
`/var/lib/flatpak/app/APPNAME/current/active/export/share/applications/`. Copy
151+
that to `~/.local/share/applications/` and edit it here.
120152

121-
Copy that to `~/.local/share/applications/` and edit it.
122-
123-
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.
153+
Flatpaks store their app data in `~/.var/app/APPNAME/`, which makes deleting it
154+
easy. Just add `&& rm -rf ~/.var/app/APPNAME` after the `Exec=` command, and it
155+
will delete itself after closing the app.
124156

125157
## Tips
126158

127-
If you want to find system icons or mimetypes (the name a file is recognized by), you can do both graphically in KDE.
159+
If you want to find system icons or mimetypes (the name a file is recognized
160+
by), you can do both graphically in KDE.
128161

129162
### Finding System Icons
130163

131164
| Open the app menu | Find the icon name in the list |
132165
|------------------|------------------------------|
133-
| ![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) |
166+
| ![App
167+
launcher](<<https://raw.githubusercontent.com/boredsquirrel/Linux/main/Desktop%20>
168+
E>
169+
ntries/Images/applauncher-find-icons.jpg) | ![App icon
170+
list](<<https://raw.githubusercontent.com/boredsquirrel/Linux/main/Desktop%20Entr>
171+
i>
172+
es/Images/find-icons.jpg) |
134173

135-
Change "programs" to "all" to display all icons. These names can be used directly in the `Icon=` line of a `.desktop` file.
174+
Change "programs" to "all" to display all icons. These names can directly be
175+
used in the `Icon=` line.
136176

137177
### Finding Mimetypes
138178

139-
To associate an "app" with a specific file type (e.g., "adb install" or "java execute"), use the terminal:
179+
To associate an "app" with a specific file type (see "adb install" and "java
180+
execute"), in the terminal, you can use:
140181

141182
```sh
142183
cat /etc/mime.types | grep FILEEXTENSION
@@ -145,15 +186,22 @@ cat /etc/mime.types | grep FILEEXTENSION
145186
cat /etc/mime.types | grep jar
146187
```
147188

148-
Or use KDE's "File Association" settings and search for the file extension (e.g., "jar").
189+
Or you can use KDE's "File Association" settings page and search for the file
190+
extension (here, "jar").
149191

150-
![System settings page for mimetypes](https://raw.githubusercontent.com/boredsquirrel/Linux/main/Desktop%20Entries/Images/file-names.jpg)
192+
![System settings page for
193+
mimetypes](<<https://raw.githubusercontent.com/boredsquirrel/Linux/main/Desktop%2>
194+
0>
195+
Entries/Images/file-names.jpg)
151196

152197
Here, the mimetype is `application/x-java-archive`.
153198

154-
Example: See KDE Discover's associated mimetypes:
199+
As an example, see KDE Discover's associated mimetypes:
155200

156201
```sh
157202
$ cat /usr/share/applications/org.kde.discover.desktop | grep Mime
158203

159-
MimeType=application/x-rpm;application/vnd.flatpak;application/vnd.flatpak.repo;application/vnd.flatpak.ref;
204+
MimeType=application/x-rpm;application/vnd.flatpak;application/vnd.flatpak.repo;
205+
206+
application/vnd.flatpak.ref;
207+
```

0 commit comments

Comments
 (0)