Sunday, December 27, 2020

mount encfs on login on ubuntu

Install libpam-encfs.

Edit /etc/security/pam_encfs.conf : 

Recommended: comment out the line

encfs_default --idle=1 

This flag will unmount your encrypted folder after 1 minute of inactivity. If you are automounting this on login, you probably would like to keep this mounted for as long as you are logged in.

At the bottom, comment any existing demo entries and add:

#USERNAME SOURCE TARGET PATH ENCFS Options FUSE Options foo /home/foo/EncryptedFolder /home/foo/DecryptedFolder -v allow_other

Make sure to initialize EncryptedFolder with the same user password.

Also, if you see the following line, remove allow_root from the options. Otherwise, it will be in conflict with allow_other defined above.

fuse_default allow_root,nonempty


Next, edit /etc/fuse.conf: Uncomment:

user_allow_other

To test your config, open a new virtual terminal (e.g. Ctrl+Alt+F4) and login. You should see pam successfuly mount your EncFS folder.

Should be enough.


See more at https://wiki.archlinux.org/index.php/EncFS#Mount_at_login_using_pam_encfs


Wednesday, December 16, 2020

Manjaro mdns fix

Install and enable avahi service. Enable systemd-resolved.service:

systemctl status systemd-resolved.service

make a symbolic link:

sudo ln -s /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf


Check:

getent hosts mypc.local

Friday, April 24, 2020

HP 6510b linux boot fix

If there are dkms errors on boot/blank screen with Intel x3100 etc. graphics, boot kernel with
 
video=SVIDEO-1:d

Windows rsync alternative

Copy all files recursively from drive D to E:\WinData subfolder:

Robocopy.exe D:\ E:\WinData /e /z /dcopy:DAT /xd "System Volume Information" /xd "$RECYCLE.BIN" /A-:SH

Fix hidden directory (robocopy bug):








attrib -s -h E:\WinData

Sunday, January 5, 2020

xubuntu 18.04 mouse sensitivity fix

If GUI mouse sensitivity settings don't work try using commands:

> xinput

 Will output:

Virtual core pointer                        id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                  id=4    [slave  pointer  (2)]
⎜   ↳ Logitech USB Receiver                       id=9    [slave  pointer  (2)]
⎜   ↳ Logitech USB Receiver Consumer Control      id=10    [slave  pointer  (2)]
⎜   ↳ Logitech USB Laser Mouse                    id=15    [slave  pointer  (2)]

Remember those id's or use "Logitech USB Receiver" and "Logitech USB Laser Mouse" device names in the following commands.

> xinput list-props 'Logitech USB Laser Mouse'
Device 'Logitech USB Laser Mouse':
    Device Enabled (155):    1
    Coordinate Transformation Matrix (157):    1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
    libinput Natural Scrolling Enabled (289):    0
    libinput Natural Scrolling Enabled Default (290):    0
    libinput Scroll Methods Available (291):    0, 0, 1
    libinput Scroll Method Enabled (292):    0, 0, 0
    libinput Scroll Method Enabled Default (293):    0, 0, 0
    libinput Button Scrolling Button (294):    2
    libinput Button Scrolling Button Default (295):    2
    libinput Middle Emulation Enabled (296):    0
    libinput Middle Emulation Enabled Default (297):    0
    libinput Accel Speed (298):    1.000000
    libinput Accel Speed Default (299):    0.000000
    libinput Accel Profiles Available (300):    1, 1
    libinput Accel Profile Enabled (301):    1, 0
    libinput Accel Profile Enabled Default (302):    1, 0
    libinput Left Handed Enabled (303):    0
    libinput Left Handed Enabled Default (304):    0
    libinput Send Events Modes Available (274):    1, 0
    libinput Send Events Mode Enabled (275):    0, 0
    libinput Send Events Mode Enabled Default (276):    0, 0
    Device Node (277):    "/dev/input/event11"
    Device Product ID (278):    1133, 49257
    libinput Drag Lock Buttons (305):   
    libinput Horizontal Scroll Enabled (306):    1

We need to set 'libinput Accel Speed' property to 1.0 value for maximum speed.

> xinput set-prop 'Logitech USB Laser Mouse' 'libinput Accel Speed' 1.0

Make a bash script and add it to "Session and Startup":

#!/bin/bash
#xinput set-prop 15 298 1.0
#xinput set-prop 9 298 1.0

xinput set-prop 'Logitech USB Laser Mouse' 'libinput Accel Speed' 1.0
xinput set-prop 'Logitech USB Receiver' 'libinput Accel Speed' 1.0

ubuntu avahi fix for Belarus/Beltelecom/Byfly

If there's "Avahi Service discovery disabled" popup displayed, check
"host -t SOA local".
If there's something like "local has SOA record local. root.mgts.by", you can make avahi ignore that wrong configuration via editing /etc/default/avahi-daemon:
AVAHI_DAEMON_DETECT_LOCAL=0 

xubuntu 18.04 installing with nvidia graphics, tearing fixes

Before installing (running LiveCD/USB)

Edit GRUB options in the live-cd menu by adding "nomodeset" argument to the  kernel parameters string.

After installing

Repeat "nomodeset" option as described above before the first boot.
  1. "apt install nvidia-driver-435"
  2. Reboot
  3. In "NVidia X Server Settings -> X Server Display Configuration -> Advanced..." switch on "Force Composition Pipeline".
  4. Enable XFCE compositor (Menu->Window Manager Tweaks->Compositor->Enable display compositing)
  5. Enable the "Synchronize drawing to the vertical blank" option in the "Window Manager Tweaks" "Compositor" tab.