Skip to content

Commit

Permalink
Fixing md format
Browse files Browse the repository at this point in the history
  • Loading branch information
primalbeing committed Feb 7, 2025
1 parent 9fe29eb commit 367cf8b
Show file tree
Hide file tree
Showing 10 changed files with 159 additions and 144 deletions.
83 changes: 41 additions & 42 deletions Desktop Entries/README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
# 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 (not AppImages) and in other
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 (not AppImages) and in other
areas.

## System Actions

Some useful system actions can be "GUI-fied" using desktop entries. They will
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
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
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
Expand All @@ -32,41 +32,41 @@ sudo systemctl mask bluetooth
systemctl --user daemon-reload
```

The user variant does not require `wheel` group permissions and does not
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
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
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 some logs of your system. Systemd's `journalctl`
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.

![Screenshot of the journalctl error
entry](https://raw.githubusercontent.com/boredsquirrel/Linux/main/Desktop%20Entr
![Screenshot of the journalctl error
entry](<https://raw.githubusercontent.com/boredsquirrel/Linux/main/Desktop%20Entr>
ies/Images/journalctl-entry.jpg)

## 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
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/D
![Screenshot](<https://raw.githubusercontent.com/trytomakeyouprivate/Linux/main/D>
esktop%20Entries/Images/konsole-desktop-entry.jpg)

Konsole has a few annoyances that can be easily fixed. It always opens in a new
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.
Expand All @@ -92,19 +92,19 @@ You can do the same for:
- Running as root
- Running over SSH

Now place my desktop entry in the correct location, and it will change
Now place my desktop entry in the correct location, and it will change
immediately.

### Firefox

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

Firefox can use profiles too. You might want to run it in private browsing mode
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.
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:
Expand All @@ -125,7 +125,7 @@ Open a link in such an excluded browser:
mullvad-exclude firefox -p INSECURE http://insecure.link.com
```

This is needed for logging into captive portals (yes, they suck...) or using
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:
Expand All @@ -137,40 +137,40 @@ cp /usr/share/applications/org.mozilla.firefox.desktop

### 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.,
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
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
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
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%20E
ntries/Images/applauncher-find-icons.jpg) | ![App icon
list](https://raw.githubusercontent.com/boredsquirrel/Linux/main/Desktop%20Entri
| ![App
launcher](<https://raw.githubusercontent.com/boredsquirrel/Linux/main/Desktop%20E>
ntries/Images/applauncher-find-icons.jpg) | ![App icon
list](<https://raw.githubusercontent.com/boredsquirrel/Linux/main/Desktop%20Entri>
es/Images/find-icons.jpg) |

Change "programs" to "all" to display all icons. These names can directly be
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 (see "adb install" and "java
To associate an "app" with a specific file type (see "adb install" and "java
execute"), in the terminal, you can use:

```sh
Expand All @@ -180,11 +180,11 @@ cat /etc/mime.types | grep FILEEXTENSION
cat /etc/mime.types | grep jar
```

Or you can use KDE's "File Association" settings page and search for the file
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%20
![System settings page for
mimetypes](<https://raw.githubusercontent.com/boredsquirrel/Linux/main/Desktop%20>
Entries/Images/file-names.jpg)

Here, the mimetype is `application/x-java-archive`.
Expand All @@ -197,4 +197,3 @@ $ 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;
```

17 changes: 8 additions & 9 deletions Firefox/Simple Menus.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,25 @@
# Simple Firefox Menus

This is a preset built upon
[SimpleMenuWizard](https://github.com/stonecrusher/simpleMenuWizard), which is
This is a preset built upon
[SimpleMenuWizard](https://github.com/stonecrusher/simpleMenuWizard), which is
a nice prebuilt CSS.

It removes as many useless (for me) entries of the Firefox right-click menus as
It removes as many useless (for me) entries of the Firefox right-click menus as
possible, to make it a less cluttered experience.

If you like it, share it with others! Making your Firefox more basic is a
pretty contradictory "mod," as mods are normally done by people seeking more
If you like it, share it with others! Making your Firefox more basic is a
pretty contradictory "mod," as mods are normally done by people seeking more
features.

## Use

1. Open `about:profiles` and find your profile folder, then link that folder to
1. Open `about:profiles` and find your profile folder, then link that folder to
a better location.
2. Delete the folders of profiles you don't use.
3. In your profile folder, create a folder named `chrome` (yes, this is a
3. In your profile folder, create a folder named `chrome` (yes, this is a
Firefox term for "Browser interface"—Google copied it).
4. Download this folder here, so that the `UserChrome.css` file is in that
4. Download this folder here, so that the `UserChrome.css` file is in that
folder.
5. In your browser, search for `about:config`.
6. Set `toolkit.legacyUserProfileCustomizations.stylesheets` to `true`.
7. Restart your browser.

39 changes: 20 additions & 19 deletions Guides/Captive-Portal-Tricks.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ to go!
*we will give everything to law enforcement if they politely ask.
```

These sites redirect any HTTP request to their internally hosted website. This
These sites redirect any HTTP request to their internally hosted website. This
has a lot of flaws, but it’s what we need to use.

## Requirements
Expand All @@ -24,15 +24,15 @@ Captive Portals only work if your DNS is insecure, and your VPN is disconnected.

So:

- `systemd-resolve`: Disable DNSSec and maybe even custom DNS servers in
- `systemd-resolve`: Disable DNSSec and maybe even custom DNS servers in
`systemd-resolve`. You need to use the DNS advertised by DHCP.
- If you use any other tools, disable security features there too.
- If you use a VPN, you need to temporarily disable it. You must allow
- If you use a VPN, you need to temporarily disable it. You must allow
connections without it.
- You need to open an HTTP domain. If your browser upgrades it to HTTPS by
- You need to open an HTTP domain. If your browser upgrades it to HTTPS by
default, this may be tricky.

**WARNING:** Do **not** change any default config files, such as
**WARNING:** Do **not** change any default config files, such as
`resolved.conf`! Use an override config file as explained.

## Captive Portal Appstarter
Expand All @@ -45,10 +45,10 @@ Run this:
firefox -p
```

A dialog opens. Create a new profile named **CAPTIVE** and configure it as
A dialog opens. Create a new profile named **CAPTIVE** and configure it as
securely as you want.

*(You can also use your default profile, but that may block captive portals for
*(You can also use your default profile, but that may block captive portals for
a good reason.)*

Create the app starter:
Expand All @@ -75,13 +75,13 @@ Type=Application
EOF
```

*(Replace `firefox` with `flatpak run org.mozilla.firefox` if you use the
Flatpak. Replace it with the location of the binary if you use a different
*(Replace `firefox` with `flatpak run org.mozilla.firefox` if you use the
Flatpak. Replace it with the location of the binary if you use a different
installation method.)*

## VPN

A good approach is to temporarily disable the VPN, open the captive portal
A good approach is to temporarily disable the VPN, open the captive portal
page, accept their terms, and then re-enable the VPN.

Otherwise, you need to disable it manually.
Expand Down Expand Up @@ -140,20 +140,20 @@ Type=Application
EOF
```

**Not-so-fun-fact**: On Android, captive portals work even with VPN enabled
because the Chromium dialog **"Captive-Portal-Chooser"** (and any other system
app) can bypass the "always on, block other connections" VPN. This is a privacy
**Not-so-fun-fact**: On Android, captive portals work even with VPN enabled
because the Chromium dialog **"Captive-Portal-Chooser"** (and any other system
app) can bypass the "always on, block other connections" VPN. This is a privacy
risk.

## `systemd-resolve` settings

For additional security, the VPN app has its own DNS (which is good), so you
For additional security, the VPN app has its own DNS (which is good), so you
can block most domains when the VPN is not enabled.

Captive portals are sites within the LAN of the connected network. You do not
Captive portals are sites within the LAN of the connected network. You do not
need DNS for these.

All addresses you need to resolve are the ones for captive portal detection
All addresses you need to resolve are the ones for captive portal detection
(e.g., an HTTP site that redirects you).

Run:
Expand Down Expand Up @@ -187,7 +187,8 @@ systemctl restart systemd-resolved

Even with Mullvad turned off (no blocking), it can resolve domains.

An alternative would be to whitelist the browser profile as an app ("Split
Tunneling") to connect without the VPN. While this works well on Android, it
An alternative would be to whitelist the browser profile as an app ("Split
Tunneling") to connect without the VPN. While this works well on Android, it
crashes my client on Linux.
```

```
Loading

0 comments on commit 367cf8b

Please sign in to comment.