Showing posts with label Linux. Show all posts
Showing posts with label Linux. Show all posts

Sunday, March 15, 2026

Privacy, telemetry, data collection

https://librewolf.net/

LibreWolf — privacy enhanced Firefox gets much better results on https://coveryourtracks.eff.org

sudo apt update && sudo apt install extrepo -y

sudo extrepo enable librewolf && sudo extrepo update librewolf

sudo apt update && sudo apt install librewolf -y

Any program that uses web UI via web-server may leak internal LAN IP-address of the device, for example IP Webcam for Android does this in Referrer. F12 > Dev Tools > Network > check what requests app makes. Any API is potential channel for leaking user data. Be cautions when using proprietary apps in sensitive environment. FOSS is better in such cases, else decompile, modify, rebuild.

https://www.privoxy.org/user-manual/quickstart.html

https://docs.searxng.org/

sudo ufw enable

sudo apt install tor

torsocks --version

sudo systemctl enable tor      // start on boot

sudo systemctl start tor          // start now

sudo systemctl status tor       // check if running

torsocks curl https://check.torproject.org

CLI browsers are not safe browsers. Using w3m/lynx to “avoid JS” doesn’t make sense for anonymity; you’re trading usability and security for terminal UI. CLI inside a Tor-based system is safe way: Whonix, Tails (easiest).

Ordinary goofy will say that he has nothing to hide, but he do not take into account regime change, idiotic laws and limitations that may be in future... The less data you share, the better. Nobody has right to poke nose in your LAN, hardware, behavior, business...

Monday, March 9, 2026

KTorrent not seeding and not downloading

Forward only 6881 for tcp and udp in router or choose another port. Paste it for TCP, mtp, DHT, apply and other ports will be changed automatically.

sudo ufw enable

sudo ufw allow 6881/tcp

sudo ufw allow 6881/udp

sudo ufw reload

netstat -plunt | grep ktorrent

tcp        0      0 PC_IP:6881              0.0.0.0:*       LISTEN       60908/ktorrent

udp        0      0 PC_IP:6881             0.0.0.0:*                           60908/ktorrent

udp        0      0 PC_IP:UDPtrackers 0.0.0.0:*                           60908/ktorrent

udp        0      0 PC_IP:UDP_DHT    0.0.0.0:*                           60908/ktorrent


KTorrent opens with empty torrents list

nano ~/.config/ktorrentrc

Check saveDir=/path/torrents/

tempDir=/path/ktorrent/ // default location => /home/$USER/.local/share/ktorrent/

Make tempDir=/path/torrents/ktorrent/ // your actual path to tor0+ dirs

KTorrent stores its settings in ~/.config/ktorrentrc. If the application crashes, your system runs out of disk space, or a desktop environment update occurs, this file can occasionally corrupt or reset to factory defaults. When it resets, KTorrent reverts to its default temporary directory path (~/.local/share/ktorrent/) [1] and instantly forgets about your custom folder.


Tuesday, March 3, 2026

Shrink disk size partition in terminal with parted resize

The Victory Lap: 851GB shrinked drive (Stable), 323GB 4256-sector slop (Webcam Trash), screaming shrinked 978GB 2005-sector zombie (Torrent Sacrifice). Successfully built "Post-Apocalyptic" Storage Array out of pure e-waste. It's chatty, it spams errors - but it's moving 110MB/s and cost $0.

Monday, March 2, 2026

KGet download and upload limit not working

nano ~/.bashrc

alias slowget='aria2c -c -x 16 -s 16 --file-allocation=prealloc --max-download-limit=1024K -o'

source ~/.bashrc

cd /desired/folder

slowget "file_0.avi" "URL"


If download fails:

slowget "file_0.avi" "NEW_URL" // to resume


Alternatives for using KGet:

E: Package 'trickle' has no installation candidate


sudo apt install firejail // 28.5 MB

firejail --net=eth0 --bandwidth=kget:1500:1500 kget


sudo wondershaper eth0 1500 1500 // NIC limit

Sunday, March 1, 2026

GA-970A-DS3P FX wake on lan not working on Lubuntu

Looks like WOL is Enabled by default, if Erp Disabled, and MB is made solely for Windows, where WOL is enabled in driver. Enabled Power On By Mouse, Power On By Keyboard just in case... No lights on LAN port but 2.5W power draw... If CPU Turbo mode is enabled, 3.5W power draw...

https://www.gigabyte.com/Motherboard/GA-970A-DS3P-FX-rev-21

Windows 8 Features > Other OS

CSM Support > Never

Boot Mode Selection > UEFI and Legacy

LAN PXE Boot Option ROM > Disabled

Storage Boot Option Control > Disabled

Network stack > Disabled

IOMMU Controller > Enabled


ON REMOTE/TARGER/HOST/SERVER PC:

sudo nano /etc/default/grub

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

GRUB_CMDLINE_LINUX_DEFAULT=""

sudo update-grub


sudo apt install openssh-server -y

sudo systemctl enable --now ssh


ip link

sudo ethtool enp3s0 | grep Wake

        Supports Wake-on: pumbg

        Wake-on: d

sudo ethtool -s enp3s0 wol g

sudo ethtool enp3s0 | grep Wake

        Supports Wake-on: pumbg

        Wake-on: g

BUT IF sudo reboot > Wake-on: d > sudo poweroff > Wake-on: d


nmcli connection show

sudo nmcli connection modify "Wired connection 1" 802-3-ethernet.wake-on-lan magic

sudo nmcli connection down "Wired connection 1" && sudo nmcli connection up "Wired connection 1"


Alternatives:

Option A — NetworkManager

Create a dispatcher script:

sudo nano /etc/NetworkManager/dispatcher.d/99-wol

Put:

#!/bin/sh

ethtool -s eth0 wol g

Make executable:

sudo chmod +x /etc/NetworkManager/dispatcher.d/99-wol

Reboot and check:

ethtool eth0 | grep Wake


Option B — systemd service

sudo nano /etc/systemd/system/wol.service

[Unit]

Description=Enable Wake-on-LAN

[Service]

Type=oneshot

ExecStart=/usr/sbin/ethtool -s eth0 wol g

[Install]

WantedBy=multi-user.target

sudo systemctl enable wol.service


ON CLIENT PC:

sudo apt install wakeonlan

wakeonlan [MAC_ADDRESS]

Sunday, February 22, 2026

KVM install and configuration on Kubuntu

sudo apt install qemu-kvm libvirt-daemon-system libvirt-clients bridge-utils virt-manager


groups                    List groups for the current user.

groups <username>   List groups for a specific user.

id <username>    Display UID, GID, and all group memberships.

cat /etc/group            Show all local groups and their members by reading a file.

getent group            List all groups from all configured databases.

sudo adduser $USER libvirt

Virtual Machine Manager > File > New Virtual Machine > Local Install Media (ISO image or CD-ROM)

If failed to create image, create image.qcow2 in storage location and then choose it for OS install.


sudo nano /etc/libvirt/qemu.conf

# Some examples of valid values are:

#

#       user = "qemu"   # A user named "qemu"

#       user = "+0"     # Super user (uid=0)

#       user = "100"    # A user named "100" or a user with uid=100

#

#user = "libvirt-qemu"


# The group for QEMU processes run by the system instance. It can be

# specified in a similar way to user.

#group = "kvm"


user = "your_username"

group = "your_username"


user = "your_username"

group = "libvirt"


sudo systemctl restart libvirtd


Network selection > Bridge device... > virbr0


ifconfig


On KDE couldn't turn off full screen with shortcuts... but right mouse button > tick full screen > untick full screen... Changing window size and position with shortcuts started working.


dpkg-query -W -f='${Installed-Size} \t ${Package}\n' virtualbox*

qemu-img convert -f vdi -O qcow2 /path/to/your/vm.vdi /path/to/new/vm.qcow2

sudo apt purge "virtualbox*"

sudo apt autoremove


Rescue mode without graphics:

sudo grub-install /dev/vda

sudo update-grub

Tuesday, February 17, 2026

Android Studio sound problems on Kubuntu

Mucis palyers glitch when Android Studio emulator is running.

pw-top

pactl list short clients

cd ~/.android/avd

nano Medium_Phone_API_30.ini


avd.ini.encoding=UTF-8

path=/home/user/.android/avd/Medium_Phone_API_30.avd

path.rel=avd/Medium_Phone_API_30.avd

target=android-30

hw.audioInput = no

hw.audioOutput = no

audio.backend=none

Turning audio off NOT WORKING!!!


Before starting Android Studio:

export QEMU_AUDIO_DRV=none

Turning audio off NOT WORKING!!!


~/.android/avd$ emulator -avd Medium_Phone_API_30 -no-audio

Command 'emulator' not found, but can be installed with:

sudo apt install google-android-emulator-installer


emulator -avd Medium_Phone_API_30 -no-audio

PANIC: Cannot find AVD system path. Please define ANDROID_SDK_ROOT


Add to ~/.bashrc:

export ANDROID_HOME=$HOME/Android/Sdk

export ANDROID_SDK_ROOT=$ANDROID_HOME


Reload: source ~/.bashrc


emulator -avd Medium_Phone_API_30 -no-audio -verbose

Turning audio off WORKS!!!

pw-top

Monday, February 16, 2026

MobSF VM cannot be used for Dynamic Analysis

[INFO] 05/Feb/2026 09:25:06 - Performing System check

[INFO] 05/Feb/2026 09:25:06 - Android API Level identified as 30

[ERROR] 05/Feb/2026 09:25:06 - VM's /system is not writable. This VM cannot be used for Dynamic Analysis.

[ERROR] 05/Feb/2026 09:25:06 - Please start the AVD as per MobSF documentation!

[ERROR] 05/Feb/2026 09:25:06 - Cannot Connect to emulator-5554

[ERROR] 05/Feb/2026 09:25:06 - Internal Server Error: /android_dynamic/a312049526219c769f2fe0d599fc4bc8

[ERROR] 05/Feb/2026 09:25:06 - Internal Server Error: /android_dynamic/a312049526219c769f2fe0d599fc4bc8

adb root

adbd cannot run as root in production builds

Android Studio > Tools > Device Manager > Create Virtual Device > Medium Phone > API 29 > Services > Android Open Source


[INFO] 05/Feb/2026 10:56:33 - Testing Environment is Ready!

adb shell

su


https://stackoverflow.com/questions/43923996/adb-root-is-not-working-on-emulator-cannot-run-as-root-in-production-builds/45668555#45668555

https://xdaforums.com/t/question-how-to-get-writable-system-on-emulator-with-google-apps-android-13-arm-image.4567963/

You should use the open source version of Partition and run AVD with the following code:

emulator -avd <NameAVD> -writable-system

sudo apt install google-android-emulator-installer

Add to ~/.bashrc:

export ANDROID_HOME=$HOME/Android/Sdk

export ANDROID_SDK_ROOT=$ANDROID_HOME

Reload:

source ~/.bashrc

emulator -avd Medium_Phone_API_29 -writable-system -verbose

emulator -avd Medium_Phone_API_29 -writable-system -no-audio -verbose

Friday, February 13, 2026

Root access for Android 4.4 injecting su

lsusb

sudo apt install android-tools-adb

adb devices

adb pull / /$HOME/Videos

adb shell

Thursday, February 12, 2026

Configure Android 5.1 features with root access

Permanent USB Debugging

echo "mtp,adb" > /data/property/persist.sys.usb.config

chmod 644 /data/property/persist.sys.usb.config

echo "1" > /data/property/persist.service.adb.enable

chmod 644 /data/property/persist.service.adb.enable

reboot


MagiskHidePropsConf useless

acc useless

adb shell "magisk --remove-modules" // OR rm -rf /data/adb/modules/*

reboot


Launch Magisk > Settings > Superuser > Enable Tapjacking > Allow for ADB

adb shell su -c "settings put global development_settings_enabled 1"

adb shell su -c "settings put global adb_enabled 1"


Disabling Google Play Services

pm disable-user --user 0 com.google.android.gms

Package com.google.android.gms new state: disabled-user

pm disable-user --user 0 com.android.vending

Package com.android.vending new state: disabled-user


To re-enable:

adb shell su

pm enable com.google.android.gms

pm enable com.android.vending

Do NOT delete APK unless you know what you’re doing.

Wednesday, February 11, 2026

Root access for Android 5.1 with Magisk 22.1-22100

Install Magisk on phone, copy boot.img

Launch Magisk > Install > Select boot.img

DO NOT TICK AVB 2.0 for Android 5.1

adb pull storage/sdcard0/download/magisk_patched.img /home/user/Downloads

BACKUP YOUR DATA!!!

adb reboot bootloader

fastboot devices -l

0123456789ABCDEF       fastboot

usb:5-1

fastboot getvar unlocked

unlocked: no

Finished. Total time: 0.002s

sudo fastboot oem unlock

Press Volume Up on phone (READ MESSAGE!!!)

Shows ==> Fastboot... No need to do anything.

sudo fastboot devices

[sudo] password for user:

0123456789ABCDEF         fastboot

cd ~/Donwloads

ls

sudo fastboot flash boot magisk_patched.img

Sending 'boot' (16384 KB)                          OKAY [  0.464s]

Writing 'boot'                                     OKAY [  2.210s]

Finished. Total time: 2.689s

sudo fastboot reboot

DO EVERYTHING AT YOUR OWN RISK!

Tuesday, February 10, 2026

Linux firewall ufw settings for local PC

sudo ufw enable

sudo ufw default deny incoming


sudo ufw allow from 192.168.1.0/24 to any port *****

sudo ufw allow from 192.168.1.0/24 to any port ***** proto udp

sudo ufw allow from 192.168.1.0/24 to any port ****

sudo ufw allow from 192.168.1.0/24 to any port 22

sudo ufw allow from 192.168.1.0/24 to any port 3389

sudo ufw allow from 192.168.1.0/24 to any port 445 proto tcp


sudo ufw status verbose


ss -tulpn

upnpc -l

curl ifconfig.me // compare with PC public ISP IP

nmap -p **,****,***** IP-address (check PC and ISP)

ip a

ip -4 addr

ip -6 addr // global address (not fe80::)

nmap -6 -p ****,***** YOUR_IPV6

Monday, February 9, 2026

Synchronize Android and Kubuntu folders

Install dk.tacit.android.foldersync.lite

https://www.apkmirror.com/apk/tacit-dynamics/foldersync/foldersync-2-8-0-44-release/foldersync-2-8-0-44-android-apk-download/

Create account for SMB server in FolderSync.

Create new sync and choose interval.

That's easiest way to sync files between Android devices and Linux PC.

Delete useless user: sudo deluser --remove-all-files <username>

Sunday, February 8, 2026

IP Webcam auto file download via SFTP

sudo apt install openssh-server

systemctl status ssh

hostname -I

ifconfig

ip a


sudo adduser ftpdrop

[sudo] password for user:

info: Adding user `ftpdrop' ...

Is the information correct? [Y/n] y

info: Adding new user `ftpdrop' to supplemental / extra groups `users' ...

info: Adding user `ftpdrop' to group `users' ...


id ftpdrop

groups ftpdrop

getent group users // show users in group

sudo deluser ftpdrop users // remove user from group


ssh-keygen -t ed25519 -f ~/ftpdrop_key

Generating public/private ed25519 key pair.


sudo mkdir /home/ftpdrop/.ssh

sudo nano /home/ftpdrop/.ssh/authorized_keys

Paste contents of /home/user/ftpdrop_key.pub


sudo chown -R ftpdrop:ftpdrop /home/ftpdrop/.ssh

sudo chmod 700 /home/ftpdrop/.ssh

sudo chmod 600 /home/ftpdrop/.ssh/authorized_keys

sudo systemctl restart ssh


"Algrotirhm Parameters EC implementation not found" on phone

Saturday, February 7, 2026

IP Webcam manual bulk file download

Open http://192.168.1.10:8080/videomgr.html#/modet in Firefox

F12 → Console


Add Set to remove duplicates:

[...new Set(

  [...document.querySelectorAll("a[href*='/v/modet/']")].map(a => a.href)

)].join("\n")

Explanation:

querySelectorAll → all <a>

map(a => a.href) → array of hrefs

new Set(...) → keeps only unique values

[...new Set(...)] → back to array for join("\n")


Copy output → save as list.txt

mkdir ipcam10

nano list.txt → Ctrl + Shift + V

mv list.txt ipcam10

wget -i list.txt --base=http://192.168.1.10:8080/v/modet/

Friday, February 6, 2026

Sound problems, audio glitches on Kubuntu

cmus playing music. Audio glitches when turning on monitor after sleep. analog-stereo.

Firefox playing Youtube. Monitor speakers - hdmi-stereo. Sound glitches.

journalctl --user -f | grep -i pipewire // shows nothing

pw-top // to see the current quantum and latency in real-time.

Thursday, February 5, 2026

Rust Build completed with 4 failures in Android Studio

Install:

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh


Reload environme:

source ~/.cargo/env


Verify:

which rustc

/home/user/.cargo/bin/rustc

rustc --version

rustc 1.92.0 (ded5c06cf 2025-12-08)

cargo --version

cargo 1.92.0 (344c4567c 2025-10-21)


FAILURE: Build completed with 4 failures.

1: Task failed with an exception.

-----------

* What went wrong:

Execution failed for task ':file_operations:cargoBuildArm'.

> A problem occurred starting process 'command 'rustc''

* Try:

> Run with --info or --debug option to get more log output.

> Run with --scan to get full insights.

> Get more help at https://help.gradle.org.

* Exception is:

org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':file_operations:cargoBuildArm'.

at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.lambda$executeIfValid$1(ExecuteActionsTaskExecuter.java:130)

at org.gradle.internal.Try$Failure.ifSuccessfulOrElse(Try.java:282)...

Wednesday, February 4, 2026

NDK is not installed in Android Studio on Linux

ls /home/user/Android/Sdk/ndk/

29.0.14206865


IF NONE > Android Studio > Tools > SDK Manager > Language & Frameworks> Android SDK > SDK Tools > Tick NDK (Side by side), tick CMake > Apply > OK


nano Project/gradle/libs.versions.toml

[versions]

compileSdk = "34"

minSdk = "21"

targetSdk = "35"

kotlin = "1.9.25"

ndk = "29.0.14206865" #r28c // ENTER VERSION OF YOUR NDK


Ctrl + Shift + O // Sync Project with Grade Files...

Tuesday, February 3, 2026

Connect to Kubuntu from Android via Termux

1. Preparations on your Kubuntu 24.04 PC

    Enable Remote Desktop: Go to System Settings > System > Remote Desktop. Enable "Desktop Sharing" (VNC) or "Remote Login" (RDP).

    sudo apt update && sudo apt install openssh-server.

    To find your PC's local IP address (e.g., 192.168.1.10):

    ip addr  OR ip addr  | grep inet    

2. Installation on Termux (Android)

Install OpenSSH client to create the secure bridge:

    pkg update && pkg upgrade

    pkg install openssh

    Create the Tunnel: Use this command to forward your PC's remote desktop port to your phone.

        For RDP (Recommended): ssh -L 3389:localhost:3389 user@your_pc_ip

        For VNC: ssh -L 5901:localhost:5901 user@your_pc_ip

        (Keep this Termux session running in the background).

3. Connecting to the Desktop

Once the tunnel is active, you do not use Termux to view the screen; you use a dedicated app to connect to the "tunnel" Termux created.

    Download a Client: Install aRDP from Play Store or F-Droid.

    Configure the Connection:

        PC Name / Host: 127.0.0.1 (or localhost).

        Port: If the app asks, use 3389 (RDP) or 5901 (VNC).

    Login: Use your standard Kubuntu username and password.

If you get a black screen when connecting via RDP, ensure you are logged out of the physical PC first. Kubuntu's current RDP implementation often prevents simultaneous local and remote sessions for the same user.

Monday, February 2, 2026

Mobile phone control on PC with scrcpy Screen Copy

Control Android phone from a Kubuntu PC with full GUI and app access

  Setup on Android:

        Go to Settings > About Phone and tap "Build Number" 7 times to enable Developer Options.

        In Developer Options, enable USB Debugging.

    Connect: Plug your phone into your PC via USB.

sudo apt install scrcpy adb

scrcpy

scrcpy 1.25 <https://github.com/Genymobile/scrcpy>

/usr/share/scrcpy/scrcpy-server: 1 file pushed, 0 skipped. 96.3 MB/s (41650 bytes in 0.000s)

[server] INFO: Device:


Once connected via USB once, you can switch to Wi-Fi by running

scrcpy --tcpip=PHONE_IP_ADDRESS


https://github.com/Genymobile/scrcpy

https://www.youtube.com/watch?v=FBicaEkweOs