Issues

To change lid settings:

sudo nano /etc/systemd/logind.conf

enable the #HandleLidSwitch=suspend line and change the value to ignore, lock, poweroff, etc.

HandleLidSwitch=ignore
HandleLidSwitchExternalPower=ignore


After any changes you will need reboot

SSH key’s

Open terminal on the first machine # sudo su
adduser oracle
put password and then dont fill nothing just press enter
su - oracle
ssh-keygen -b 4096
then just press enter
cd .ssh
ls -altr
cat id_rsa.pub
then copy the key in to text file and save
login in to remote server
sudo su
adduser oracle
su - oracle
mkdir .ssh
chmod 700 .ssh
cd .ssh
nano authorized_keys
paste the key inside save and close
chmod 600 authorized_keys
exit and back on the original machine in to the /home/oracle directory
ssh 130.61.23.153

to forcing the server log in only with public key and disable password log in change YES to NO in this file:

sudo nano /etc/ssh/sshd_config.d/50-cloud-init.conf

To hide user oracle from the login screen create file

sudo nano /var/lib/AccountsService/users/oracle

put inside this two lines, save and reload the user server

[User]
SystemAccount=true
sudo systemctl restart accounts-daemon.service

Then logout and check!

WordPress Chikii

Increase upload size limit:
    sudo nano /etc/php/8.1/apache2/php.ini"
    Press Ctrl and W and type "post_max_size"
    Change the value to the number of Mb you want your site to accept as uploads.
    Press Ctrl and W and type "upload_max_filesize"
    Change the value to the number of Mb you want your site to accept as uploads.
Save
sudo systemctl restart apache2

Plugin could not be deleted due to an error: Could not fully remove the plugin(s) my-plugin/my-plugin.php
sudo chown www-data:www-data * -R 
sudo usermod -a -G www-data YOUR-USERNAME-HERE

More rarely, this error can also occur if your WordPress configuration in /wp-config.php is set to use something like:

define( 'FS_METHOD', 'ftpext' );

This tells WordPress that it needs to use FTP to make file changes instead of working directly with the local file system. The line will likely be followed by FTP login information. If this login information is incorrect then WordPress will be unable to login and perform file-system changes


To disable all active plugins wach this video:
https://www.youtube.com/watch?v=thWUmznqznk

To grant full admin acces on user slavy to phpmyadmin:
sudo mysql -u root -p
GRANT ALL PRIVILEGES ON *.* TO 'slavy'@'localhost' WITH GRANT OPTION;	
FLUSH PRIVILEGES;
quit

Repository problem – can not do apt -update

E: The repository ‘https://ppa.launchpadcontent.net/transmissionbt/ppa/ubuntu jammy Release’ does not have a Release file.

sudo add-apt-repository –remove ppa:transmissionbt – tiretata predi remove sa 2

Mount Devices

sudo fdisk -l
sudo mkdir /hdd
sudo nano /etc/fstab
And add following to the end of the file:
/dev/sdb1    /hdd    ext4    defaults    0    0
sudo mount /hdd
sudo mount -a

Why Docker is eating your disk space

du -h $(docker inspect --format='{{.LogPath}}' $(docker ps -qa))
echo "" > $(docker inspect --format='{{.LogPath}}' container_name)
nano /etc/docker/daemon.json
Let's create a basic config for local logging driver.

{
  "log-driver": "local",
  "log-opts": {
    "max-size": "100m",
    "max-file": "3"
  }
}

service docker restart
docker info --format '{{.LoggingDriver}}'
docker-compose up -d --force-recreate

Azuracast change communication ports

cd /var/azuracast
./docker.sh update-self
./docker.sh change-ports

If you’ve actually deleted the sudo command, you can reinstall the package that provides it by running:

pkexec apt-get update
pkexec apt-get --reinstall install sudo

Bluetooth problem pair to Beats Studio3
sudo apt install blueman
turn on the bluetooth
blueman-manager - run in terminal

probblem with jellyfin repository:

remove the .source file

/etc/apt/sources.list.d/jellyfin.sources

sudo apt update

How to fix “Sorry, you are not allowed to upload this file type” error in WordPress

edit the wp-config.php file for your WordPress, which is usually found in the public_html folder and add on a bottom of the config file:

define('ALLOW_UNFILTERED_UPLOADS', true);

save the config file and reload the apache2 server:

sudo systemctl reload apache2

Raspberry pi 5 Ubuntu Server NFS not mount on boot

Неиска да монтира мрежовите дискове при буут на системата. Ръчно после в конзолата монтира без проблем. Направих:

sudo apt install network-manager
sudo systemctl enable NetworkManager.service
sudo systemctl start NetworkManager.service
sudo systemctl status NetworkManager.service
sudo systemctl enable NetworkManager-wait-online.service
sudo systemctl start NetworkManager-wait-online.service
sudo systemctl status NetworkManager-wait-online.service
sudo reboot now

VirtualBox не може да стартира, защото вече има друг хипервайзор (най-често KVM) активиран и той “държи” хардуерната виртуализация (VMX).

👉 За да го оправиш, трябва да изключиш KVM модулите в Linux.


Стъпки за решение (Linux):

  1. Спри KVM модулите (временно до рестарт):
sudo rmmod kvm_intel
sudo rmmod kvm

(Ако си на AMD процесор – използвай kvm_amd вместо kvm_intel.)

Забрани зареждането им при следващи стартирания (постоянно решение):
Създай blacklist файл:

echo "blacklist kvm_intel" | sudo tee /etc/modprobe.d/blacklist-kvm.conf
echo "blacklist kvm" | sudo tee -a /etc/modprobe.d/blacklist-kvm.conf

(Отново – ако си с AMD, ползвай kvm_amd.)

Обнови initramfs и рестартирай:

sudo update-initramfs -u
sudo reboot

След рестарта провери дали модулите са спрени:

lsmod | grep kvm

Ако няма резултат – значи са успешно спрени.