Miscellaneous

Miscellaneous #

https://superuser.com/questions/1595994/dont-let-websites-overwrite-clipboard-in-firefox-without-explicitly-giving-perm

Some web site forbid the paste of content in input field (email, password… field). On Firefox, you can try to change one of following settings in the about:config page:

  • dom.event.clipboardevents.enabled to false,
  • dom.allow_cut_copy to false;
  • dom.events.asyncClipboard.dataTransfer to false (do not exist by defaults, hence already considered to be set to false).

Running time command on more than one command #

https://unix.stackexchange.com/questions/46051/how-to-run-time-on-multiple-commands-and-write-the-time-output-to-file

time sh -c "<command 1>;<command 2> && <commmand 3>…"

Hibernation under Kubuntu #

https://askubuntu.com/questions/1231631/hibernation-in-kubuntu-20-04

https://doc.ubuntu-fr.org/tutoriel/activer_hibernation

Veracrypt and Truecrypt compatibility #

TrueCrypt support was dropped starting from version 1.26 Hence, see : https://veracrypt.fr/en/Downloads_1.25.9.html

Accessing to SFTP folder with Dolphin #

https://askubuntu.com/questions/129794/connect-to-ftp-sftp-in-dolphin-or-transfer-nautilus-bookmarks

  • Create new location (URL)
  • sftp://<username>[:<password>]@<domain>[/<path>]

The corresponding file can be opened an d modified with a text editor.

NTFS and Linux (Ubuntu) #

If a NTFS volume was not unmounted properly, it may no longer be recognized by Linux. Use ntfsfix on the device to fix it.

If the volume is a VeraCrypt volume or container, mount it with VeraCrypt, but check the Do not mount option, and the apply ntfsfix to the corresponding /dev/mapper/veracrypt… device. Unmount and then mount the usual way.

Disabling video autoplay under Firefox #

There’s a setting for this. By default, only audio autoplay is disabled.

https://support.mozilla.org/en-US/kb/block-autoplay

Dolphin (KDE) setting file for toolbar #

The setting for the toolbar of Dolphin is in : ~/.local/share/kxmlgui5/dolphin/dolphinui.rc.

Size of a new window with VSCode #

https://stackoverflow.com/questions/44412233/how-to-set-window-size-and-position-in-visual-studio-code

With the default setting, opening a new empty window with VSCode opens a tiny centered windows.

With following setting, it opens a window with same dimension and position as the last one.

window.newWindowDimensions: inherit

Handling PDF files #

To modify a pdf file : xournal++ (GUI).

To rotate (a do other things) a PDF file and save the result : pdftk (TUI) (https://doc.ubuntu-fr.org/pdftk (fr)).

Tracking by browser, navigation fingerprint #

https://www.cnil.fr/fr/nouvelles-methodes-de-tracage-en-ligne-quelles-solutions-pour-se-proteger

Tweaking Ubuntu #

No menubar in Konsole (or other) #

https://askubuntu.com/questions/1317298/in-app-menubar-wont-show-after-removing-global-menu-widget

Once Global menu widget installed and the removed, there is no way to display the menu bar from Konsole (and may be other applcations). Unchecking System settingsStartup and ShutdownBackground ServicesApplication menus daemon should solve this issue (not tested).

Swapiness #

(https://www.howtogeek.com/449691/what-is-swapiness-on-linux-and-how-to-change-it/)

Using more RAM for swap #

(https://sebsauvage.net/wiki/doku.php?id=linux-ssd)

Add vm.swappiness=<value> in /etc//etc/sysctl.conf (ex.: vm.swappiness=10).

  • To activate: sudo sysctl -p;
  • to verify: sysctl vm.swappiness.

Default value is 60, suggested value is 10.S

Using compressed RAM as swap (zRam) #

(https://doc.ubuntu-fr.org/zram)

Install zram-config package and activate sudo service zram-config start or sudo service zram-config --full-restart. Useful commands: cat /proc/swaps, zramctl.

Laptop battery #

Adding missing resolution #

https://ubuntuhandbook.org/index.php/2017/04/custom-screen-resolution-ubuntu-desktop/

Context : plugged a 2560x1440 display through DisplayPort and a 1280x1024 display through an HDMI->DVI adapter, both to a Thunderbolt hub. The highest resolution available for the 2560x1440 display was 1920x1080. The following commands restores the 2560x1440 entry in the settings.

  • cvt 2560 1440 (displays the parameter to give to following command line) ;
  • sudo xrandr --newmode "2560x1440_60.00" 312.25 2560 2752 3024 3488 1440 1443 1448 1493 -hsync +vsync
  • xrandr (to retrieve the DP-1-3-1 for following command line) ;
  • sudo xrandr --addmode DP-1-3-1 "2560x1440_60.00".

KDE plasmoids (widgets) #

The configuration for the KDE plasmoids is in ~/.config/plasma-org.kde.plasma.desktop-appletsrc.

To reload the configuration : systemctl --user restart plasma-plasmashell.

Adjusting mouse wheel speed #

Install imwheel, put following content in ~/.imwheelrc:

".*"
None,      Up,   Button4, 5
None,      Down, Button5, 5
Control_L, Up,   Control_L|Button4
Control_L, Down, Control_L|Button5
Shift_L,   Up,   Shift_L|Button4
Shift_L,   Down, Shift_L|Button5

and launch imwheel. That’s it.

Adjust the value of the lines 3 and 4 at your convenience, and launch imwheel -kill forthe modification to take effect.

You may have to launch imwheel again when you restart the computer.

Tweaking Windows #

Compose key #

http://wincompose.info/

UTF-8 in DOS prompt #

https://stackoverflow.com/questions/57131654/using-utf-8-encoding-chcp-65001-in-command-prompt-windows-powershell-window

Tweaking Termux #

To add a path to $PATH : in ~/.bashrc export PATH=$PATH:…