Tuesday, August 31, 2021

Failed to start MySQL Community Server

 $ mysql

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)


$ sudo service mysql start

Job for mysql.service failed. See 'systemctl status mysql.service' and 'journalctl -xn' for details.


$ sudo apt list --installed | grep mysql

mysql-client-8.0/hirsute-updates,hirsute-security,now 8.0.26-0ubuntu0.21.04.3 amd64 [installed,automatic]

mysql-client-core-8.0/hirsute-updates,hirsute-security,now 8.0.26-0ubuntu0.21.04.3 amd64 [installed,automatic]

mysql-client/hirsute-updates,hirsute-updates,hirsute-security,hirsute-security,now 8.0.26-0ubuntu0.21.04.3 all [installed]

mysql-common/hirsute,hirsute,now 5.8+1.0.5ubuntu2 all [installed,automatic]

mysql-server-8.0/hirsute-updates,hirsute-security,now 8.0.26-0ubuntu0.21.04.3 amd64 [installed]

mysql-server-core-8.0/hirsute-updates,hirsute-security,now 8.0.26-0ubuntu0.21.04.3 amd64 [installed,automatic]

mysql-server/hirsute-updates,hirsute-updates,hirsute-security,hirsute-security,now 8.0.26-0ubuntu0.21.04.3 all [installed]

mythes-en-us/hirsute,hirsute,now 1:7.1.0~rc3-3 all [installed]

Saturday, August 28, 2021

Ubuntu Qt5 development packages

Qt module           dev package                         lib package
-------------------------------------------------------------------------
assistant           qttools5-dev-tools                                       
bluetooth           qtconnectivity5-dev                 libqt5bluetooth5
concurrent          qtbase5-dev                         libqt5concurrent5
connectivity        qtmobility-dev                      libqtconnectivity1
contacts            qtmobility-dev                      libqt5contacts5
core                qtbase5-dev                         libqt5core5a
dbus                qtbase5-dev                         libqt5dbus5

Thursday, August 26, 2021

Connect Amarok to MySQL database

sudo apt install libmariadb-dev


sudo apt install mysql-server mysql-client

OR 

sudo apt install mariadb-server mariadb-client

Qt QML KF5 essentials for cmake on Kubuntu

sudo apt install qml-module-qt-labs-platform qml-module-qtqml-models2 qml-module-org-kde-kcm qml-module-qtquick-controls qml-module-qtquick-dialogs qml-module-qtquick-layouts qml-module-qtquick2

sudo apt install qtbase5-dev

sudo apt install qtbase5-private-dev

sudo apt install qtdeclarative5-dev

sudo apt install qtmultimedia5-dev

sudo apt install qttools5-dev // Qt5UiTools

sudo apt install qtwebengine5-dev // Qt5WebEngine

sudo apt install libqt5svg5-dev

sudo apt install qtquickcontrols2-5-dev

sudo apt install kirigami2-dev // KF5Kirigami2

sudo apt install libkf5crash-dev

sudo apt install baloo-kf5-dev

sudo apt install libkf5declarative-dev

sudo apt install libkf5i18n-dev

sudo apt install libkf5filemetadata-dev

sudo apt install libkf5config-dev

sudo apt install libkf5kcmutils-dev // KF5KCMUtils (missing: KF5KCMUtils_DIR)

sudo apt install libvlc-dev // allows to play music in (otherwise QtMultimedia is used)

sudo apt install libphonon4qt5-dev

sudo apt install libkf5itemmodels-dev

sudo apt install libkf5dnssd-dev // KF5DNSSD (missing: KF5DNSSD_DIR)

sudo apt install libkf5globalaccel-dev

sudo apt install libkf5kio-dev

sudo apt install libkf5newstuff-dev // KF5NewStuff (missing: KF5NewStuff_DIR)

sudo apt install libkf5notifications-dev

sudo apt install libkf5package-dev //KF5Package (missing: KF5Package_DIR)

sudo apt install libkf5su-dev // KF5Su (missing: KF5Su_DIR)

sudo apt install libkf5texteditor-dev // KF5TextEditor (missing: KF5TextEditor_DIR)

sudo apt install libkf5threadweaver-dev // KF5ThreadWeaver (missing: KF5ThreadWeaver_DIR)

sudo apt install libkf5configwidgets-dev

sudo apt install libqt5x11extras5-dev

sudo apt install libglib2.0-dev // None of the required 'gobject-2.0' found

sudo apt install libtag1-dev //Taglib (missing: TAGLIB_INCLUDES TAGLIB_LIBRARIES)

sudo apt install libtag-extras-dev

sudo apt install libfftw3-dev //FFTW3 (missing: FFTW3_LIBRARIES FFTW3_INCLUDE_DIRS)

sudo apt install libexiv2-dev

sudo apt install liblcms2-dev

sudo apt install kinit-dev // KF5Init (missing: KF5Init_DIR)

sudo apt install kwin-dev

Kubuntu 21.04 essentials install

Sunday, August 22, 2021

Build and install from source GoldenDict on Ubuntu

Kubuntu 21.04 essentials install

git clone --branch master 'https://github.com/goldendict/goldendict.git'

Go to goldendict folder and make project:

cd goldendict

sudo apt install libvorbis-dev libhunspell-dev libao-dev libavutil-dev libavformat-dev libqt5webkit5-dev libqt5x11extras5-dev qtmultimedia5-dev libqt5multimediawidgets5 libqt5multimedia5-plugins libqt5multimedia5 libbz2-dev liblzo2-dev libtiff5-dev libxtst-dev libxcursor-dev libxrandr-dev libxinerama-dev libxi-dev libxcomposite-dev libqt5svg5-dev qttools5-dev qtmultimedia5-dev libqt5multimediawidgets5 libqt5multimedia5-plugins libqt5multimedia5 ffmpeg

Qt QML KF5 essentials for cmake on Kubuntu

qmake

make clean && make -j<YOUR CPU CORES COUNT>

make install

Friday, August 20, 2021

instead click accidental drag window Kubuntu

Appearance => Application Style => Configure Breeze => General => Windows' drag mode => Drag windows from title bar only


Graphic Tablet => Tablet => Map to Cursor (Relative Mode).

Kubuntu 21.04 essentials install

Install Kubuntu 21.04 without any downloads.

If black screen, boot Ubuntu, with Linux 5.11.0-16-generic, remove nvidia driver, reboot.

sudo apt install nvidia-driver-460

sudo apt install gcc g++

sudo apt install build-essential cmake make extra-cmake-modules git gettext zlib1g-dev libkf5archive-dev libkf5doctools-dev libkf5kio-dev libkf5parts-dev libkf5wallet-dev libkf5xmlgui-dev libkf5notifications-dev zip unzip rar unrar bzip2 bzip2-doc gzip libminizip1:amd64 libzip4:amd64 p7zip p7zip-full p7zip-rar kdiff3 krename

sudo apt install libexiv2-dev liblcms2-dev

sudo apt install net-tools samba smbclient

sudo apt install mysql-server mysql-client

Qt QML KF5 essentials for cmake on Kubuntu

Monday, August 16, 2021

ao_open_live() failed & GoldenDict not playing audio

cat /etc/libao.conf // worked out in GoldenDict 1.5.0-RC2 on Kubuntu 20.04

default_driver=pulse
quiet

sudo nano /etc/libao.conf // change pulse to alsa (or vice versa)

default_driver=alsa
quiet

Wednesday, August 11, 2021

Check hdd smart parameters in Ubuntu console

sudo apt install smartmontools

sudo fdisk -l

sudo smartctl --all /dev/sda

sudo smartctl --all /dev/sda1

sudo smartctl --all /dev/nvme0n1

Tuesday, August 10, 2021

JavaScript React Developer Tools

React Developer Tools extension for Chrome Browser

https://reactjs.org/docs/create-a-new-react-app.html

Build Samba 4.13.17 from source

sudo apt install cifs-utils - in case you need this fucntionality.

dpkg --get-selections | grep -v deinstall | grep samba

./configure

make -j6 depending on CPU cores

sudo make install

            Distutils not installed? Broken python installation? Get python-config now!

./configure --disable-python --without-ad-dc

            perl module Parse::Yapp::Driver 1.05

sudo apt install libparse-yapp-perl

            Jansson JSON support not found.

sudo apt install jansson-dev

sudo apt install libarchive-dev

            ACL support not found.

sudo apt install libacl1-dev

            LDAP support not found. Try installing libldap2-dev or openldap-devel.

sudo apt install libldap2-dev

            PAM support is enabled but prerequisite libraries or headers not found.

sudo apt install libpam0g-dev

sudo apt-mark hold samba

sudo apt-mark unhold $(apt-mark showhold)

https://wiki.samba.org/index.php/Package_Dependencies_Required_to_Build_Samba

https://wiki.samba.org/index.php/Build_Samba_from_Source

sudo nano /etc/samba/smb.conf

Sunday, August 8, 2021

Linux chmod chown permissions table

user@PC:~$ sudo su

[sudo] password for user:

root@PC:/home/user#

Permission Command Examples Description
rwx rwx rwx chmod 777 filename
chmod -R 777 dir
Anybody can read, write, execute.
rwx rwx r-x chmod 775 filename
chmod -R 775 dir
Owner & Group can read, write, execute. Everyone else can read, execute.
rwx rwx r– chmod 774 filename
chmod -R 774 dir
Owner & Group can read, write, execute. Everyone else can read.
rwx r-x r-x chmod 755 filename
chmod -R 755 dir
Owner can read, write, execute. Everyone else can read, execute.
rwx — — chmod 700 filename
chmod -R 700 dir
Owner can read, write, execute. No one else has any rights.
rw- rw- rw- chmod 666 filename
chmod -R 666 dir
Everyone can read, write.
rw- rw- r– chmod 664 filename
chmod -R 664 dir
Owner & Group can read, write. Everyone else can read.
rw- r– r– chmod 644 filename
chmod -R 644 dir
Owner can read, write. Everyone else can read.

root@PC:/home/user# exit

exit

user@PC:~$

Running chmod -R 777 / as root will break your system.

https://www.linode.com/docs/guides/modify-file-permissions-with-chmod/

sudo find / /boot -xdev ! -type s -printf 'chmod %m %p\n' -printf 'chown %u:%g %p\n'

Complete list of default GNU/Linux file permissions as found in Ubuntu Server 16.10 Yakkety Yak with all roles => https://www.vidarholen.net/contents/junk/ubuntu_permissions.html

How to restore root directory permission to default? https://askubuntu.com/questions/958141/fix-permissions-of-server-after-accidental-chmod

sudo adduser user group

sudo deluser user group

groupadd [OPTIONS] GROUPNAME

groupdel [OPTIONS] GROUPNAME

Krusader and Dolphin do not open iso zip 7zip

Dolphin: Ctrl+ Shift + , => Navigation => Open archives as folder.

Krusader: Ctrl+ Shift + , => Archives => Open Archives As Folders.

Krusader: No permission to zip into certain folder.

sudo apt reinstall zip unzip

Failed to pack /media/user/sda1/archive.zip. ied zip warning: Permission denied zip warning: Permission denied zip warning: Permission denied zip warning: Permission denied zip warning: Permission denied zip warning: Permission denied zip warning: Permission denied zip warning: Permission denied zip warning: Permission denied zip warning: Permission denied zip warning: Permission denied zip warning: Permission denied zip warning: Permission denied zip warning: Permission denied zip warning: Permission denied zip warning: Permission denied 


dpkg --get-selections | grep -v deinstall | grep zip

bzip2                                           install

bzip2-doc                                       install

gzip                                            install

libminizip1:amd64                               install

libzip4:amd64                                   install

p7zip                                           install

p7zip-full                                      install

p7zip-rar                                       install

python3-zipp                                    install

unzip                                           install

zip                                             install


Discover > Dolphin - Dolphin Plugins to get Mount ISO in right click menu.

Bug with ISO mount - some ISOs appear under Devices after Dolphin restart.


Kubuntu 20.04 solution that may not work:

/usr/lib/x86_64-linux-gnu/qt5/plugins/kf5/kio/kio_krarc.so

/usr/lib/x86_64-linux-gnu/qt5/plugins/kf5/kio/kio_iso.so

sudo cp kio_iso.so kio_krarc.so /usr/lib/x86_64-linux-gnu/qt5/plugins

Monday, August 2, 2021

Slow boot after swap change on Ubuntu 20.04

Ctrl + Alt + T

sudo pico /etc/fstab

sudo blkid

Create SSD disk image & restore with dd on Ubuntu

Boot from Kubuntu Live USB flash drive.

Choose "Try Kubuntu".

*I deleted Swap partition with KDE Partition Manager just in case.

Ctrl + Alt + T