From d151b71d1dac94d4a795cb5b44ead2df5012b9eb Mon Sep 17 00:00:00 2001 From: lhark Date: Thu, 3 Oct 2019 13:00:22 -0400 Subject: [PATCH] Group some relevant tips together --- how_to | 125 ++++++++++++++++++++++++++++----------------------------- 1 file changed, 61 insertions(+), 64 deletions(-) diff --git a/how_to b/how_to index c937d2b..c20df6c 100644 --- a/how_to +++ b/how_to @@ -26,6 +26,9 @@ Usefull packages : Obscure/Useful vim plugins: better-indent-support-for-php-with-html jedi-vim + Pretty log pager: + lnav + keyboard : console: @@ -96,6 +99,14 @@ synaptics : Option "MaxSpeed" "1.0" Option "MinSpeed" "1.0" +Mouse/Touchpad acceleration disable: + Set MaxSpeed=MinSpeed + For testing: + synclient MaxSpeed= MinSpeed= + For persistence, add to the right section in /etc/X11/xorg.conf.d/XX-synaptics.conf: + Option "MaxSpeed" "1.2" + Option "MinSpeed" "1.2" + st : with ABS (arch) https://wiki.archlinux.org/index.php/Patching_in_ABS @@ -134,6 +145,36 @@ PDF : convert [jpg|png|txt|pdf|...] output.pdf # Might need to tweak /etc/ImageMagick-7/policy.xml # https://stackoverflow.com/questions/52998331/imagemagick-security-policy-pdf-blocking-conversion + Fill form & annotate: + For well formatted interactive forms: + evince + For non-interactive PDF: + xournal + libreoffice Draw + inkscape + +Fill dynamic XFA forms on linux: + Run Acrobat Reader DC 2019 on wine: + https://linuxconfig.org/how-to-install-latest-adobe-acrobat-reader-dc-on-ubuntu-18-04-bionic-beaver-linux-with-wine + https://www.quora.com/How-do-I-install-Adobe-Reader-on-Ubuntu-using-the-Wine-software + ftp://ftp.adobe.com/pub/adobe/reader/win/AcrobatDC/ + WINEARCH=win32 + WINEPREFIX=~/.wine-32 + winetricks mspatcha + winetricks riched20 + winetricks allfonts # Maybe not ? + trizen -S ttf-windows # Indispensable, without it no text in UI + # maybe? winetricks atmlib wsh57 + winetricks settings win7 + wget ftp://ftp.adobe.com/pub/adobe/reader/win/AcrobatDC/1901220034/AcroRdrDC1901220034_en_US.exe # Replace by latest version + wine ./AcroRdrDC1901220034_en_US.exe + wine ~/.wine-32/drive_c/Program\ Files/Adobe/Acrobat\ Reader\ DC/Reader/AcroRd32.exe + Select "Always open with Protected Mode Disabled" + Don't forget to kill the wineserver, adobe leaves a lot of garbage running: + wineserver --kill + Master PDF Editor (free version): + https://code-industry.net/free-pdf-editor/ + trizen -S masterpdfeditor D-Bus : To reload service files /usr/share/dbus-1/services/ @@ -175,6 +216,14 @@ Fix hardware clock (with chrony): Network Manager: nmtui : add/edit connections nmcli : informations + Fix nm-applet/nmtui only working with root/sudo: + # /etc/polkit-1/rules.d/50-org.freedesktop.NetworkManager.rules + polkit.addRule(function(action, subject) { + if (action.id.indexOf("org.freedesktop.NetworkManager.") == 0 && subject.isInGroup("network")) { + return polkit.Result.YES; + } + }); + sudo usermod -aG network Power saving : echo "vm.dirty_writeback_centisecs = 6000" >> /etc/sysctl.d/dirty.conf @@ -216,10 +265,14 @@ Video and audio editing: # https://unix.stackexchange.com/a/294892 ffmpeg -i in.gif -movflags faststart -pix_fmt yuv420p -vf "scale=trunc(iw/2)*2:trunc(ih/2)*2" out.mp4 +ImageMagick: + crop to aspect ratio + convert in.png -gravity center -crop 4:3 out.png + RE .net apps: ilspymono (can be empty) -Wireshark proprement: +Wireshark properly: sudo gpasswd -a wireshark sudo setcap 'CAP_NET_RAW+eip CAP_NET_ADMIN+eip CAP_DAC_OVERRIDE+eip' /usr/bin/dumpcap @@ -253,14 +306,6 @@ Wifi AP: is_wifi_connected() { return 1 } sudo create_ap [-c ] wlp2s0 wlp2s0 -PDF fill form & annotate: - For well formatted interactive forms: - evince - For non-interactive PDF: - xournal - libreoffice Draw - inkscape - Sync from phone: adb-sync -R /sdcard// @@ -277,9 +322,6 @@ fail2ban unban: # Remove leading "-A " iptables -D -Pretty log pager: - lnav - Backup non rooted phone with adb: adb backup -all -shared -obb -f need adb < 1.0.31 @@ -451,14 +493,6 @@ Transition from Thunderbird to mutt+mbsync+msmtp: color status default -Mouse/Touchpad acceleration disable: - Set MaxSpeed=MinSpeed - For testing: - synclient MaxSpeed= MinSpeed= - For persistence, add to the right section in /etc/X11/xorg.conf.d/XX-synaptics.conf: - Option "MaxSpeed" "1.2" - Option "MinSpeed" "1.2" - Get hardware informations: dmidecode Get laptop model: @@ -472,6 +506,7 @@ Get hardware informations: Others values are Music fingerprinting + # https://github.com/beetbox/pyacoustid for f in *.mp3;do echo $f; python ~/src/pyacoustid/aidmatch.py $f;done > ident awk '/\.mp3/{f = $0;next} f{printf "mv %s \"../%s.mp3\"\n", f, $0; f=0}' ident > rename.sh @@ -483,7 +518,7 @@ Reset gpg-agent passphrase cache echo RELOADAGENT | gpg-connect-agent Better Bibtex, Zotero: - Add URL to webpages + Add URL to references to webpages https://retorque.re/zotero-better-bibtex/scripting/ if (Translator.BetterBibTeX && item.itemType === 'webpage') { if (item.accessDate) { @@ -494,10 +529,6 @@ Better Bibtex, Zotero: } } -ImageMagick: - crop to aspect ratio - convert in.png -gravity center -crop 4:3 out.png - Bumblebee runit fix: sed -i 's/Driver=$/Driver=nvidia/' /etc/bumblebee/bumblebee.conf @@ -512,7 +543,6 @@ Artix: Artixlinux pacman gpg unknown trust fix: sudo pacman-key --init sudo pacman-key --populate archlinux artix - Artixlinux steam lib32-systemd fix: https://forum.artixlinux.org/index.php/topic,633.msg7437.html [Attached file]: resources/lib32-systemd-dummy.pkgbuild @@ -567,29 +597,6 @@ Run studiotax on wine: wine ./StudioTax2017Install.exe /extract msiexec /i StudioTax.msi -Fill dynamic XFA forms on linux: - Run Acrobat Reader DC 2019 on wine: - https://linuxconfig.org/how-to-install-latest-adobe-acrobat-reader-dc-on-ubuntu-18-04-bionic-beaver-linux-with-wine - https://www.quora.com/How-do-I-install-Adobe-Reader-on-Ubuntu-using-the-Wine-software - ftp://ftp.adobe.com/pub/adobe/reader/win/AcrobatDC/ - WINEARCH=win32 - WINEPREFIX=~/.wine-32 - winetricks mspatcha - winetricks riched20 - winetricks allfonts # Maybe not ? - trizen -S ttf-windows # Indispensable, without it no text in UI - # maybe? winetricks atmlib wsh57 - winetricks settings win7 - wget ftp://ftp.adobe.com/pub/adobe/reader/win/AcrobatDC/1901220034/AcroRdrDC1901220034_en_US.exe # Replace by latest version - wine ./AcroRdrDC1901220034_en_US.exe - wine ~/.wine-32/drive_c/Program\ Files/Adobe/Acrobat\ Reader\ DC/Reader/AcroRd32.exe - Select "Always open with Protected Mode Disabled" - Don't forget to kill the wineserver, adobe leaves a lot of garbage running: - wineserver --kill - Master PDF Editor (free version): - https://code-industry.net/free-pdf-editor/ - trizen -S masterpdfeditor - Easily switch to russian phonetic keyboard: setxkbmap fr,ru -variant ,phonetic -option grp:shift_caps_toggle man xkeyboard-config # get list of possible toggles @@ -618,6 +625,11 @@ Wayland install: Qt issues: sudo pacman -S qt5-wayland export QT_QPA_PLATFORM="wayland" + sudo/root issues with GUI apps: + # https://bugzilla.redhat.com/show_bug.cgi?id=1274451 + xhost +SI:localuser:root + sudo + xhost -SI:localuser:root # Clean up the security hole MSI ge62 webcam not found: Activate using fn+F6 @@ -680,18 +692,3 @@ Android diagnostic debug phone codes: Android wpa_supplicant conf file path: /data/misc/wifi/wpa_supplicant.conf - -Run GUI apps as root with sudo on Wayland: - # https://bugzilla.redhat.com/show_bug.cgi?id=1274451 - xhost +SI:localuser:root - sudo - xhost -SI:localuser:root # Clean up the security hole - -Fix Network Manager nm-applet/nmtui only working with root/sudo: - # /etc/polkit-1/rules.d/50-org.freedesktop.NetworkManager.rules - polkit.addRule(function(action, subject) { - if (action.id.indexOf("org.freedesktop.NetworkManager.") == 0 && subject.isInGroup("network")) { - return polkit.Result.YES; - } - }); - sudo usermod -aG network