|
|
@ -1,287 +1,307 @@ |
|
|
|
-Qt for wayland requires qt5-wayland package and "export QT_QPA_PLATFORM=wayland" |
|
|
|
= An Open Source collection of common problems and solutions for *nix users |
|
|
|
|
|
|
|
Alessandro Mauri <alemauri001@gmail.com> |
|
|
|
-You still have tor and "arm" to monitor it |
|
|
|
v1.0, 2019-12-02 |
|
|
|
|
|
|
|
:doctype: manpage |
|
|
|
-Docker is pretty cool you should use it, https://www.kali.org/news/official-kali-linux-docker-images/ |
|
|
|
|
|
|
|
also works with wifite2, it basically is a shell-oriented low-weight high-performance virtual machine |
|
|
|
== Arch Linux |
|
|
|
wich can run prebuilt docker images or your personal docker images. Docs: https://docs.docker.com/ |
|
|
|
|
|
|
|
|
|
|
|
=== Links useful during an arch install |
|
|
|
# ARCH SECTION |
|
|
|
https://wiki.archlinux.org/index.php/Installation_guide[1], |
|
|
|
|
|
|
|
https://wiki.archlinux.org/index.php/GRUB[2], |
|
|
|
-Links useful during an arch install: |
|
|
|
https://wiki.archlinux.org/index.php/General_recommendations#Users_and_groups[3], |
|
|
|
https://wiki.archlinux.org/index.php/Installation_guide |
|
|
|
https://wiki.archlinux.org/index.php/EFI_system_partition[4], |
|
|
|
https://wiki.archlinux.org/index.php/GRUB |
|
|
|
https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/Disks[5], |
|
|
|
https://wiki.archlinux.org/index.php/General_recommendations#Users_and_groups |
|
|
|
https://wiki.archlinux.org/index.php/List_of_applications[6], |
|
|
|
https://wiki.archlinux.org/index.php/EFI_system_partition |
|
|
|
|
|
|
|
https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/Disks |
|
|
|
=== Pacman commands |
|
|
|
https://wiki.archlinux.org/index.php/List_of_applications |
|
|
|
* `pacman -Syy`: update repositories |
|
|
|
|
|
|
|
* `pacman -Su`: update packages |
|
|
|
-Pacman commands: |
|
|
|
* `pacman -Qdtq`: list unused/orphan packages |
|
|
|
"pacman -Syy" update repositories |
|
|
|
* `pacman -R`: remove a package |
|
|
|
"pacman -Su" update packages |
|
|
|
* `pacman -S`: install a package |
|
|
|
"pacman -Qdtq" list unused/orphan packages |
|
|
|
* `pacman -R $(pacman -Qdtq)`: remove orphaned packages recursively |
|
|
|
"pacman -R" remove a package |
|
|
|
* `pacman -Rns`: remove packages and its dependencies recursively |
|
|
|
"pacman -S" install a package |
|
|
|
* `pacman -Rcs`: remove packages and its dependents recursively |
|
|
|
"pacman -R $(pacman -Qdtq)" remove unused packages |
|
|
|
* `pacman -Ql`: list all package's files and locations |
|
|
|
"pacman -Rns" remove packages and its dependencies recursively |
|
|
|
* `pacman -Qqe`: list all installed packages |
|
|
|
"pacman -Rcs" remove packages and its dependents recursively |
|
|
|
* `pacman -Qc`: view package changelog |
|
|
|
"pacman -Ql" list all package's files and locations |
|
|
|
* `pacman -Qm`: list packages not present in official repositories |
|
|
|
"pacman -Qqe" list all installed packages |
|
|
|
|
|
|
|
"pacman -Qc" view package changelog |
|
|
|
If there are update related errors that you do not understand, do not panic |
|
|
|
"pacman -Qm" list packages not present in official repositories |
|
|
|
issue a full update with the following commands: |
|
|
|
If you panic just do "sudo pacman -Syy" and then "sudo pacman -Su" |
|
|
|
`sudo pacman -Syy` and then `sudo pacman -Su` |
|
|
|
"rm -rf /var/lib/pacman/db.lck" remove pacman's transaction lock file |
|
|
|
|
|
|
|
(to solve "could not unlock database" error, which happen when pacman is already running) |
|
|
|
If you get an error similar to `could not unlock database` when trying to |
|
|
|
NOTE: If all of a sudden everything is fucked up bad (like no GUI whatsowever) |
|
|
|
issue a command that means that another program is using the package manager. |
|
|
|
check the pacman log at "/var/log/pacman.log" to see what went wrong and what got removed |
|
|
|
If you feel like taking the risk of breaking your system try manually (and forcefully) |
|
|
|
To manage and download packages from the AUR use: |
|
|
|
removing the transaction lock file by issuing `rm -rf /var/lib/pacman/db.lck` |
|
|
|
pikaur: https://github.com/actionless/pikaur#installation |
|
|
|
|
|
|
|
yaourt (unmantained) |
|
|
|
In the unfortunate event that all of a sudden everything fucked up bad |
|
|
|
These are all wrappers which means they extend some functionalities of pacman to use |
|
|
|
(like no xorg or wayland or login session ...), |
|
|
|
AUR, for example updating and installing packages (-Syu and -S) |
|
|
|
check the pacman log at `/var/log/pacman.log` to see what went wrong and what got removed |
|
|
|
NOTE: pacman wrappers don't need to be run as root since it's dangerous to |
|
|
|
|
|
|
|
run PKGBUILD as such. |
|
|
|
=== AUR pacman wrappers |
|
|
|
Pacman GUI frontends: |
|
|
|
* https://github.com/actionless/pikaur#installation[pikaur] |
|
|
|
"pamac" based on gtk and it is the same GUI frontend in the gnome and KDE releases |
|
|
|
* https://github.com/Jguer/yay[yay] |
|
|
|
of manjaro, to install use the package "pamac-aur" or "pamac-aur-git" from the AUR. |
|
|
|
|
|
|
|
"octopi" is a lightweight GUI frontend for pacman and it is one of the most used ones |
|
|
|
Pacman GUI frontends (I advice you to not use them):: |
|
|
|
although it isn't as visually appealing as pamac and requires a gtk sudo permission |
|
|
|
* `pamac`: based on gtk and it is the same GUI frontend in the gnome and KDE releases |
|
|
|
package such as "blank don't remember" |
|
|
|
of manjaro, install `pamac-aur` or `pamac-aur-git` from the AUR. |
|
|
|
Ranking mirrors based on speed: |
|
|
|
* `octopi`: is a lightweight GUI frontend for pacman and it is one of the most used ones |
|
|
|
|
|
|
|
although it isn't as visually appealing as pamac and requires a gtk permission manager. |
|
|
|
|
|
|
|
|
|
|
|
-Network management |
|
|
|
=== Network management |
|
|
|
Arch uses netctl to manage connections, all the config files and examples are under |
|
|
|
Sources:: |
|
|
|
/etc/netctl/ and /etc/netctl/examples |
|
|
|
https://wiki.archlinux.org/index.php/Netctl[1] |
|
|
|
References: https://wiki.archlinux.org/index.php/Netctl |
|
|
|
https://www.raspberrypi.org/forums/viewtopic.php?t=54080[2] |
|
|
|
https://www.raspberrypi.org/forums/viewtopic.php?t=54080 |
|
|
|
https://wiki.archlinux.org/index.php/Dhcpcd#Static_profile[3] |
|
|
|
https://wiki.archlinux.org/index.php/Dhcpcd#Static_profile |
|
|
|
|
|
|
|
|
|
|
|
Arch uses netctl to manage connections, all the config files and examples are under |
|
|
|
-Network managers: |
|
|
|
`/etc/netctl/` `and /etc/netctl/examples` + |
|
|
|
NetworkManager: default in many distros pretty good but resorce heavy (also depends on systemd?) |
|
|
|
*NOTE*: This is valid for every system that uses systemd(ick) |
|
|
|
void: https://docs.voidlinux.org/config/network/networkmanager.html |
|
|
|
|
|
|
|
arch: https://wiki.archlinux.org/index.php/NetworkManager |
|
|
|
== Void Linux |
|
|
|
Connman: small and fast, does all you need and doesn't hog on resources and has vpn support |
|
|
|
|
|
|
|
void: https://wiki.voidlinux.org/Connman |
|
|
|
Hold package updates:: |
|
|
|
arch: https://wiki.archlinux.org/index.php/ConnMan |
|
|
|
* Hold: `xbps-pkgdb -m hold <pkg>` |
|
|
|
Wicd: outdated by now and written in python 2.7, still pretty good for simple configurations |
|
|
|
* Unhold: `xbps-pkgdb -m unhold <pkg>` |
|
|
|
|
|
|
|
* List packages on hold: `xbps-query --list-hold-pkgs` |
|
|
|
# VOID LINUX SECTION |
|
|
|
|
|
|
|
|
|
|
|
== Sysadmin stuff |
|
|
|
-Hold pkgs form updating |
|
|
|
|
|
|
|
hold: xbps-pkgdb -m hold <pkg> |
|
|
|
=== Fixing mandoc.db permission denied |
|
|
|
unhold: xbps-pkgdb -m unhold <pkg> |
|
|
|
*Source*: https://old.reddit.com/r/voidlinux/comments/dsdn5a/did_sudo_behaviour_change_recently/[link] |
|
|
|
list on hold: xbps-query --list-hold-pkgs |
|
|
|
|
|
|
|
|
|
|
|
If you ran `sudo makewatis ...` then it is possible that the file permissions |
|
|
|
# SYSADMIN SECTION |
|
|
|
of `/usr/share/man/mandoc.db` and `/usr/local/share/man/mandoc.db` were changed from |
|
|
|
|
|
|
|
644 (rw-r--r--) to 600 (rw-------), giving the error when viewing man pages |
|
|
|
-Fixing mandoc.db permission denied |
|
|
|
`... mandoc.db permission denied` or `data changed but could not update mandoc.db` etc. |
|
|
|
Source: https://old.reddit.com/r/voidlinux/comments/dsdn5a/did_sudo_behaviour_change_recently/ |
|
|
|
To fix this simply do: |
|
|
|
If you ran "sudo makewatis ..." then it is possible that the file permissions |
|
|
|
|
|
|
|
of /usr/share/man/mandoc.db and /usr/local/share/man/mandoc.db were changed from |
|
|
|
sudo chmod 644 /usr/share/man/mandoc.db |
|
|
|
644 (rw-r--r--) to 600 (rw-------), giving the error when viewing man pages |
|
|
|
sudo chmod 644 /usr/local/share/man/mandoc.db |
|
|
|
"... mandoc.db permission denied" or "data changed but could not update mandoc.db" etc. |
|
|
|
|
|
|
|
To fix this simply do: sudo chmod 644 /usr/share/man/mandoc.db |
|
|
|
=== Important packages |
|
|
|
sudo chmod 644 /usr/local/share/man/mandoc.db |
|
|
|
* `acpi` gives information and control on battery and power status, it can also handle |
|
|
|
|
|
|
|
power related events (lid open/close, power button press, etc.) |
|
|
|
-"acpi" is kinda important in laptops "acpi -i" for info, also "thinkpad_acpi" should be noted |
|
|
|
* `thinkpad_acpi` acpi addon specific to thinkpads |
|
|
|
|
|
|
|
|
|
|
|
-Basic commands: |
|
|
|
=== Qt in wayland |
|
|
|
GREP: |
|
|
|
To run QT prigrams in wayland install `qt5-wayland` and add the followind line somewhere |
|
|
|
G-REP or "grep" can be used to filter command results: |
|
|
|
in your profile (.profile .zprofile .bash_profile etc.) |
|
|
|
"ps ax | grep whatyouwant" and it will output the line containing "whatyouwant" |
|
|
|
`export QT_QPA_PLATFORM=wayland` |
|
|
|
example "dmesg | grep whatyouwant" |
|
|
|
|
|
|
|
NOTE: "|" is used to pipe the output in another program |
|
|
|
=== Monitor Tor network usage |
|
|
|
PS: |
|
|
|
install the `arm` package and run it |
|
|
|
Ps is a UNIX tool used to get information about the current status of the system |
|
|
|
|
|
|
|
The most basic and or useful usage is to view all the running processes and the corresponding |
|
|
|
=== Basic commands |
|
|
|
UUIDs (like if you want to kill process and you need its UUID), that is done by appending "ax" |
|
|
|
* `grep`: find the lines which contain the input string: + |
|
|
|
to ps: "ps ax" |
|
|
|
`ps ax | grep <query>` and it will output the line containing the query + |
|
|
|
KILL: |
|
|
|
`grep <query> file.txt` search matches in file + |
|
|
|
It kill the specified process given its UUID, syntax "kill <UUID>" |
|
|
|
`grep -i <query> file.txt` case insensitive search |
|
|
|
"|" and ">": |
|
|
|
* `ps`: Ps is a UNIX tool used to get information about the current status of the system. + |
|
|
|
These are both "pipe" functions, they can pipe the output of a script or program into |
|
|
|
The most basic and or useful usage is to view all the running processes and the corresponding |
|
|
|
something (via std i/o), but they are used differently in the sense that "|" is specifically |
|
|
|
UUIDs, that is done by appending `ax` to ps: + |
|
|
|
used to pipe the output into another program EX: "ps ax | grep gnome-shell", this outputs the UUIDs |
|
|
|
`ps ax` |
|
|
|
of all the gnome-shell instances since the output of "ps ax" is piped into GREP which in turn |
|
|
|
* `kill`: kill the specified process given its UUID: + |
|
|
|
returns just the results of the query. |
|
|
|
`kill <UUID>` |
|
|
|
On the other hand ">" is used to pipe the output into a file EX: "ls -la > ls.txt", this puts |
|
|
|
* `killall`: kill all the processes which name matches the arguments: + |
|
|
|
the output of ls into ls.txt which we can then read. |
|
|
|
`killall <proc name>` |
|
|
|
"whoami" and "groups": |
|
|
|
* `|` and `>`: |
|
|
|
they respectively output the current user and groups |
|
|
|
These are both "pipe" functions, they can pipe the output of a script or program into |
|
|
|
NOTE: one alternative to "whoami" is "echo $USER" which can be used in scripts |
|
|
|
something (via std i/o), but they are used differently in the sense that `|` is |
|
|
|
FIND: |
|
|
|
used to pipe the output into another program, example: + |
|
|
|
Sources: |
|
|
|
`ps ax | grep xorg` this outputs all the runnng processes into grep as |
|
|
|
https://www.cyberciti.biz/faq/how-do-i-find-all-the-files-owned-by-a-particular-user-or-group/ |
|
|
|
input, which in turn filters the result. + |
|
|
|
refer to man for all the available options |
|
|
|
On the other hand `>` is used to pipe the output into a file, example: + |
|
|
|
Basic syntax: |
|
|
|
`ls -la > ls.txt` this puts the output of ls into ls.txt which we can then read. |
|
|
|
"find <dir> [OPTIONS]" |
|
|
|
*NOTE*: `>` replaces everything that was in the file |
|
|
|
OPTIONS: |
|
|
|
* `<`: same thing as `>` but in "reverse" |
|
|
|
"-user <user>" find files owned by a particular user |
|
|
|
* `>>` and `<<`: same as `<` and `>` but appends instead of replacing |
|
|
|
"-group <group>" find files owned by a particular group |
|
|
|
* `whoami` and `groups`: |
|
|
|
"-ls" list results in "ls" format: |
|
|
|
they respectively output the current user and groups + |
|
|
|
"-name <filename>" find a specific file or pattern (*.txt) |
|
|
|
*NOTE*: one alternative to `whoami` is `echo $USER` which can be used in scripts |
|
|
|
|
|
|
|
* `find`: Basic syntax: + |
|
|
|
-Groups: |
|
|
|
`find <dir> [OPTIONS]` + |
|
|
|
Adding users to groups: |
|
|
|
Some options: + |
|
|
|
"usermod -a -G group user" |
|
|
|
** `-user <user>`: find files owned by a particular user |
|
|
|
reboot |
|
|
|
** `-group <group>`: find files owned by a particular group |
|
|
|
Listing all groups: |
|
|
|
** `-ls`: list results in "ls" format: |
|
|
|
"cut -d: -f1 /etc/group | sort" |
|
|
|
** `-name <filename>`: find a specific file or pattern (*.txt) |
|
|
|
|
|
|
|
|
|
|
|
-Users: |
|
|
|
=== Group actions |
|
|
|
Creating a new user: |
|
|
|
* Adding a user to a group: + |
|
|
|
useradd -m user-name |
|
|
|
`usermod -a -G group user` then reboot |
|
|
|
Deleting an existing user: |
|
|
|
* Listing all groups: + |
|
|
|
userdel user-name |
|
|
|
`cut -d: -f1 /etc/group | sort` |
|
|
|
|
|
|
|
* Deleting a group: + |
|
|
|
-Linux afterinstall (how to get thing working): |
|
|
|
`groupdel <group name>` then reboot |
|
|
|
Bluetooth usage: |
|
|
|
|
|
|
|
Refers to: |
|
|
|
=== Users actions |
|
|
|
https://wiki.archlinux.org/index.php/Bluetooth_headset |
|
|
|
* Creating a new user: + |
|
|
|
https://wiki.archlinux.org/index.php/bluetooth |
|
|
|
`useradd -m user-name` |
|
|
|
Start the "bluetooth.service" service then refer to: |
|
|
|
* Deleting an existing user: + |
|
|
|
Generating locales (languages and language support): |
|
|
|
`userdel user-name` |
|
|
|
Add locales uncommenting them in /etc/locale.gen |
|
|
|
|
|
|
|
Run "locale-gen" |
|
|
|
=== Generating locales |
|
|
|
Reboot |
|
|
|
. Add locales by uncommenting them in `/etc/locale.gen` |
|
|
|
NOTE: if installing locales with a specific character set (russian, chinese, japanese) |
|
|
|
. generate locales by running `locale-gen` |
|
|
|
it is needed to also install the specific fonts, refer to: |
|
|
|
. Reboot |
|
|
|
"https://wiki.archlinux.org/index.php/Localization" to find the specific font packages |
|
|
|
|
|
|
|
and install them using pacman |
|
|
|
*NOTE*: some languages (russian, chinese, japanese) require specific fonts to be installed |
|
|
|
Getting the graphics drivers: |
|
|
|
refer to: https://wiki.archlinux.org/index.php/Localization[link] for an incomplete list of specific fonts |
|
|
|
For Intel graphics cards: |
|
|
|
|
|
|
|
Refers to: https://wiki.archlinux.org/index.php/intel_graphics |
|
|
|
=== Getting the graphics drivers |
|
|
|
mesa |
|
|
|
For Intel graphics cards:: |
|
|
|
lib32-mesa |
|
|
|
*Source*: https://wiki.archlinux.org/index.php/intel_graphics[link] + |
|
|
|
vulkan-intel |
|
|
|
Install `mesa` on arch or `mesa-intel-dri` on void and `xf86-video-intel` |
|
|
|
For nvidia graphics cards: |
|
|
|
For nvidia graphics cards:: |
|
|
|
Please refer to: https://wiki.archlinux.org/index.php/NVIDIA#Installation |
|
|
|
Follow the steps in: https://wiki.archlinux.org/index.php/NVIDIA#Installation[link] |
|
|
|
For amd graphics cards: |
|
|
|
For AMD graphics cards:: |
|
|
|
mesa |
|
|
|
Install: `mesa` on arch or `mesa-ati-dri` on void and `xf86-video-ati` for Xorg hardware acceleration support |
|
|
|
lib32-mesa |
|
|
|
|
|
|
|
xf86-video-ati: for Xorg hardware acceleration support |
|
|
|
=== Adding entropy to your system (faster boot times) |
|
|
|
mesa-vdpau and lib32-mesa-vdpau: for accelerated video decoding |
|
|
|
*Source*: https://wiki.archlinux.org/index.php/Random_number_generation[link] + |
|
|
|
Adding entropy to your system: |
|
|
|
This is useful as the kernel's built-in random number generator is very slow, as such |
|
|
|
Refers to: https://wiki.archlinux.org/index.php/Random_number_generation |
|
|
|
it makes tasks like loading the login manager a pain. |
|
|
|
This is useful as the kernel's built-in random number generator is very slow, as such |
|
|
|
To solve this problem you can install some pseudo-random number generators such as: |
|
|
|
it makes tasks like loading the login manager a pain. |
|
|
|
* `rng-tools` secure but uses more CPU |
|
|
|
To solve this problem you can install some pseudo-random number generators such as: |
|
|
|
* `haveged` fast and lightweight but less secure |
|
|
|
"rng-tools" secure, uses more CPU |
|
|
|
*NOTE*: Keep in mind that these are not for secure systems and remember to start and enable the service |
|
|
|
"haveged" fast and lightweight |
|
|
|
rngd.service |
|
|
|
NOTE: Keep in mind that these are not for secure systems and remember to start and enable the service |
|
|
|
|
|
|
|
rngd.service |
|
|
|
=== NTFS partitions support |
|
|
|
Getting NTFS support working: |
|
|
|
*Source*: https://wiki.archlinux.org/index.php/NTFS-3G[link] + |
|
|
|
Refers to: https://wiki.archlinux.org/index.php/NTFS-3G |
|
|
|
Install `ntfs-3g` |
|
|
|
Install the "ntfs-3g" package |
|
|
|
|
|
|
|
|
|
|
|
=== Listing all installed packages |
|
|
|
-Listing installed packages: |
|
|
|
With apt/apt-get: `apt list --installed` + |
|
|
|
With apt/apt-get: |
|
|
|
With pacman: `pacman -Qqe` + |
|
|
|
"apt list --installed" |
|
|
|
With xbps: `xbps-query -m` + |
|
|
|
With pacman: |
|
|
|
|
|
|
|
"pacman -Qqe" |
|
|
|
=== Changing the default shell |
|
|
|
With xbps: |
|
|
|
* `chsh -l` list all installed shells and respective path |
|
|
|
xbps-query -m |
|
|
|
* `chsh -s <path-to-shell>` set the shell for the current user |
|
|
|
|
|
|
|
|
|
|
|
-Changing the default shell |
|
|
|
=== Changing keyboard layout |
|
|
|
To change your default shell to something other than bash use: |
|
|
|
*Source*: https://superuser.com/questions/1147320/how-to-change-keyboard-layout-in-i3[link] + |
|
|
|
"chsh -s full-path-to-shell" for example "chsh -s /bin/zsh" |
|
|
|
In a tty (no graphical envirnment line ssh) type: `layout <layout>` + |
|
|
|
to list all installed shells use "chsh -l" |
|
|
|
In a graphical environment (or terminal emulator) type: `setxkbmap <layout>` |
|
|
|
|
|
|
|
|
|
|
|
-Changing keyboard layout: |
|
|
|
|
|
|
|
Source: https://superuser.com/questions/1147320/how-to-change-keyboard-layout-in-i3 |
|
|
|
|
|
|
|
In the system console type "layout <layout>" |
|
|
|
|
|
|
|
In i3, dwm (and possibly other wms) "setxkbmap -layout <layout>" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-"https://wiki.archlinux.org/index.php/systemd" just helpful |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-To run .jar files in cli you must use "java -jar" |
|
|
|
-To run .jar files in cli you must use "java -jar" |
|
|
|
|
|
|
|
|
|
|
|
-To list all partitions "sudo fdisk -l" |
|
|
|
=== Disk and volume info |
|
|
|
|
|
|
|
Graphical:: |
|
|
|
-To list all partition UUIDs "sudo blkid" |
|
|
|
* `gparted` graphical tool for managing disks and partitions |
|
|
|
|
|
|
|
Terminal:: |
|
|
|
-Change default file openers: |
|
|
|
Partitioning tools::: |
|
|
|
Source: https://wiki.archlinux.org/index.php/XDG_MIME_Applications |
|
|
|
* `fdisk` |
|
|
|
create a file (if not present) in .config called mimeapps.list |
|
|
|
* `parted` |
|
|
|
search your file extension in https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Complete_list_of_MIME_types |
|
|
|
Listing drives and mount points::: |
|
|
|
add or modify the entry to that mimetype to be opened with the desired app.desktop |
|
|
|
* `fdisk -l` more info |
|
|
|
IF app.desktop IS NOT PRESENT: |
|
|
|
* `lsblk` |
|
|
|
look again in /usr/share/applications |
|
|
|
Listing drive UUIDs::: |
|
|
|
if it is not present make one and put it into: |
|
|
|
* `blkid` |
|
|
|
~/.local/share/applications/ |
|
|
|
|
|
|
|
with the format: |
|
|
|
=== Automatically mount volumes |
|
|
|
[Desktop Entry] |
|
|
|
Install `udevil` and start `devmon` at login/boot |
|
|
|
Name=Xpdf |
|
|
|
|
|
|
|
Comment=Views Adobe PDF (acrobat) files |
|
|
|
=== Check disk health (if available) |
|
|
|
Exec=xpdf %f |
|
|
|
Install `smartmontools`, then check the drive's compatibility with |
|
|
|
Terminal=false |
|
|
|
.... |
|
|
|
Type=Application |
|
|
|
smartctl -c /dev/sdX |
|
|
|
Icon=xpdf |
|
|
|
.... |
|
|
|
Categories=Office; |
|
|
|
Then either run a short test |
|
|
|
MimeType=application/pdf; |
|
|
|
.... |
|
|
|
NOTE: Exec= are the execution parameters |
|
|
|
smartctl -t short /dev/sdX |
|
|
|
|
|
|
|
.... |
|
|
|
-To check a disk's health you need "smartmontools", first check system compatibility with "sudo smartctl -c /dev/sdX" |
|
|
|
Or a long test |
|
|
|
then either do a short test "sudo smartctl -t short /dev/sdX" or a long test "sudo smartctl -t long /dev/sdX" |
|
|
|
.... |
|
|
|
lastly do "sudo smartctl -H /dev/sdX" to get the results |
|
|
|
smartctl -t long /dev/sdX |
|
|
|
|
|
|
|
.... |
|
|
|
-Recompiling compilers for zerynth: |
|
|
|
lastly run `smartctl -H /dev/sdX` to get the results |
|
|
|
If facing compiling errors in zerynth, manually recompile the compiler for the board in ""~/.zerynth2/sys" |
|
|
|
|
|
|
|
for example replacing the xtensa-lx106 compiler (esp8266) goes: |
|
|
|
=== Change default file openers |
|
|
|
1-Move the old compiler folder somewhere safe (~/.zerynth2/sys/xtensa-lx106) |
|
|
|
*Source*: https://wiki.archlinux.org/index.php/XDG_MIME_Applications[link] |
|
|
|
2-Clone and compile (as standalone) new compiler in a temporary folder, guide here -> "http://domoticx.com/sdk-esp8266-xtensa-architecture-toolchain/" |
|
|
|
. Create a file (if not present) in `$HOME/.config` called `mimeapps.list` |
|
|
|
3-Move the newly created compiler folder (xtensa-lx106-elf) in ~/.zerynth2/sys and rename it as the original one (xtensa-lx106/) |
|
|
|
. Search your file extension in https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Complete_list_of_MIME_types[link] |
|
|
|
4-Copy the old package.json in the new compiler folder |
|
|
|
. Add or modify the entry to that mimetype to be opened with the desired `<applications>.desktop` |
|
|
|
Better yet is to wait for an official fix and report the bug on the troubleshooting section |
|
|
|
*IF* `<application>.desktop` *IS NOT PRESENT*: |
|
|
|
Also the same thing has to be done with the xtensa-lx6 compiler (esp32) |
|
|
|
. Look again in `/usr/share/applications` |
|
|
|
"https://dl.espressif.com/doc/esp-idf/latest/get-started/linux-setup.html" |
|
|
|
. If it is not present make one and put it into: `~/.local/share/applications/` + |
|
|
|
|
|
|
|
with the format: |
|
|
|
-Various permission errors: |
|
|
|
|
|
|
|
Arduino permissions: |
|
|
|
[Desktop Entry] |
|
|
|
Source: https://www.howtogeek.com/50787/add-a-user-to-a-group-or-second-group-on-linux/ |
|
|
|
Name=Xpdf |
|
|
|
"ls -la /dev/tty*" and see which group TTYs are in, then add yourself to that group: |
|
|
|
Comment=Views Adobe PDF (acrobat) files |
|
|
|
"usermod -a -G examplegroup exampleusername" or just use "$USER" to add current user, then reboot. |
|
|
|
Exec=xpdf %f |
|
|
|
Wireshark permissions: |
|
|
|
Terminal=false |
|
|
|
"usermod -a -G wireshark $USER" |
|
|
|
Type=Application |
|
|
|
Pen drive in read only: |
|
|
|
Icon=xpdf |
|
|
|
Refers to: https://www.youtube.com/watch?v=F4lAlb74mGs |
|
|
|
Categories=Office; |
|
|
|
unmount the pen drive (4exmpl /dev/sdb1) |
|
|
|
MimeType=application/pdf; |
|
|
|
type as superuser "dosfsck -a /dev/sdb1" |
|
|
|
|
|
|
|
remount |
|
|
|
*NOTE*: `Exec=` are the execution parameters (-b, -l, etc.) |
|
|
|
profit |
|
|
|
|
|
|
|
|
|
|
|
=== Recompiling compilers for zerynth |
|
|
|
-Arduino not starting: |
|
|
|
If you are facing compiling errors in zerynth, one option is to manually |
|
|
|
Try installing "arduino-avr-core" package |
|
|
|
recompile the compiler for the board/platform. Compilers are locarted at |
|
|
|
|
|
|
|
`~/.zerynth2/sys` + |
|
|
|
-Cannot scroll down in VIM on st: |
|
|
|
For example to replace the `xtensa-lx106` compiler: (esp8266) |
|
|
|
one solution is to add "set ttymouse=sgr" to your .vimrc |
|
|
|
. Move the old compiler folder (located at `~/.zerynth2/sys/xtensa-lx106`) somewhere safe |
|
|
|
|
|
|
|
. Clone and compile (as standalone) new compiler in a temporary folder, guide here |
|
|
|
-DEL key not working in st: |
|
|
|
http://domoticx.com/sdk-esp8266-xtensa-architecture-toolchain/[link] |
|
|
|
source: https://www.reddit.com/r/archlinux/comments/8w4unu/setting_up_the_delete_key_in_st/ |
|
|
|
. Move the fresh compiler folder (xtensa-lx106-elf) in `~/.zerynth2/sys` and rename it as the original one (xtensa-lx106/) |
|
|
|
add: tput smkx |
|
|
|
. Copy the old package.json in the new compiler folder |
|
|
|
in your zshrc or eqiuvalent |
|
|
|
|
|
|
|
|
|
|
|
*NOTE*: Better yet is to wait for an official fix and report the bug on the troubleshooting section + |
|
|
|
-Theming gnome: |
|
|
|
Link for the `xtensa-lx6` compiler: (esp32) |
|
|
|
download the theme packages at "https://www.gnome-look.org/" and unzip them |
|
|
|
https://dl.espressif.com/doc/esp-idf/latest/get-started/linux-setup.html[link] |
|
|
|
then depending if it is an icon theme or an normal theme place them in |
|
|
|
|
|
|
|
"/usr/share/icons" or "/usr/share/themes" accordingly |
|
|
|
=== Various permission errors |
|
|
|
|
|
|
|
Arduino permissions:: |
|
|
|
-Printing documents: |
|
|
|
*Source*: https://www.howtogeek.com/50787/add-a-user-to-a-group-or-second-group-on-linux/[link] + |
|
|
|
Refers to: https://wiki.archlinux.org/index.php/CUPS#Installation |
|
|
|
`ls -la /dev/tty*` and see which group TTYs are in, then add yourself to that group: + |
|
|
|
Install the "cups" package then start and enable it |
|
|
|
`usermod -a -G <group> <user>` or just use `$USER` to add current user, then reboot. |
|
|
|
To start a print use whatever printing program you have |
|
|
|
Wireshark permissions:: |
|
|
|
if you do not have a print manager program you can always open up the web interface in your browser at: |
|
|
|
.... |
|
|
|
localhost:631 |
|
|
|
usermod -a -G wireshark $USER |
|
|
|
NOTE: you might need to add printers and to do so, in some cases like for KDE, you'll need to be logged as root |
|
|
|
.... |
|
|
|
|
|
|
|
Pen drive in read only:: |
|
|
|
-Adding executables and shortcuts: |
|
|
|
*Source*: https://www.youtube.com/watch?v=F4lAlb74mGs[link] + |
|
|
|
Refers to: |
|
|
|
. Unmount the pen drive (`/dev/sdXx`) |
|
|
|
https://askubuntu.com/questions/322772/how-do-i-add-an-executable-to-my-search-path |
|
|
|
. Run `dosfsck -a /dev/sdXx` |
|
|
|
https://unix.stackexchange.com/questions/3809/how-can-i-make-a-program-executable-from-everywhere |
|
|
|
. Remount |
|
|
|
You have to add them to your $PATH, example: "export PATH="$PATH:$HOME/esp/xtensa-esp32-elf/bin" |
|
|
|
|
|
|
|
Quote "If you just type export PATH=$PATH:</path/to/file> at the command line it will only last for the length of the session. |
|
|
|
=== Cannot scroll down in VIM on st |
|
|
|
If you want to change it permanently add export PATH=$PATH:</path/to/file> to your ~/.bashrc file (just at the end is fine)." |
|
|
|
Add `set ttymouse=sgr` to your .vimrc |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
=== DEL key not working in st |
|
|
|
|
|
|
|
*source*: https://www.reddit.com/r/archlinux/comments/8w4unu/setting_up_the_delete_key_in_st/[link] + |
|
|
|
|
|
|
|
Add `tput smkx` in your zshrc/bashrc or equivalent |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
=== Theming gnome |
|
|
|
|
|
|
|
download the themes packages https://www.gnome-look.org/[here] and unzip them |
|
|
|
|
|
|
|
then depending if it is an icon theme or an normal theme place them in |
|
|
|
|
|
|
|
`/usr/share/icons` or `/usr/share/themes` accordingly |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
=== Printing documents |
|
|
|
|
|
|
|
*Source*: https://wiki.archlinux.org/index.php/CUPS#Installation[link] + |
|
|
|
|
|
|
|
Install `cups` then start and enable the cupsd service/daemon or socket if you want |
|
|
|
|
|
|
|
on-demand activation. + |
|
|
|
|
|
|
|
To add and configure a printer either do it in your print manager or trough the cups web interface |
|
|
|
|
|
|
|
at the address: `localhost:631` + |
|
|
|
|
|
|
|
*NOTE*: adding and modifying printers requires administator (root) permissions, so |
|
|
|
|
|
|
|
in the web interface, when asked, insert the root credentials |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
=== Adding executables and shortcuts |
|
|
|
|
|
|
|
*Sources*:: |
|
|
|
|
|
|
|
* https://askubuntu.com/questions/322772/how-do-i-add-an-executable-to-my-search-path[1] |
|
|
|
|
|
|
|
* https://unix.stackexchange.com/questions/3809/how-can-i-make-a-program-executable-from-everywhere[2] |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
You have to add them to your $PATH, example: "export PATH="$PATH:$HOME/esp/xtensa-esp32-elf/bin" |
|
|
|
|
|
|
|
Quote "If you just type export PATH=$PATH:</path/to/file> at the command line it will only last for the length of the session. |
|
|
|
|
|
|
|
If you want to change it permanently add export PATH=$PATH:</path/to/file> to your ~/.bashrc file (just at the end is fine)." |
|
|
|
|
|
|
|
|
|
|
|
-Eagle CAD dark theme fix (KDE): |
|
|
|
-Eagle CAD dark theme fix (KDE): |
|
|
|
Refers to: |
|
|
|
Refers to: |
|
|
@ -499,6 +519,15 @@ |
|
|
|
|
|
|
|
|
|
|
|
# NETWORK SECTION |
|
|
|
# NETWORK SECTION |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-Network managers: |
|
|
|
|
|
|
|
NetworkManager: default in many distros pretty good but resorce heavy (also depends on systemd?) |
|
|
|
|
|
|
|
void: https://docs.voidlinux.org/config/network/networkmanager.html |
|
|
|
|
|
|
|
arch: https://wiki.archlinux.org/index.php/NetworkManager |
|
|
|
|
|
|
|
Connman: small and fast, does all you need and doesn't hog on resources and has vpn support |
|
|
|
|
|
|
|
void: https://wiki.voidlinux.org/Connman |
|
|
|
|
|
|
|
arch: https://wiki.archlinux.org/index.php/ConnMan |
|
|
|
|
|
|
|
Wicd: outdated by now and written in python 2.7, still pretty good for simple configurations |
|
|
|
|
|
|
|
|
|
|
|
-Gathering information on network cards ie IP, MAC, status, etc. |
|
|
|
-Gathering information on network cards ie IP, MAC, status, etc. |
|
|
|
With ifconfig, just type "ifconfig" and it will give: |
|
|
|
With ifconfig, just type "ifconfig" and it will give: |
|
|
|
ether: the MAC address |
|
|
|
ether: the MAC address |