- Table of Contents
- General
- Arch Linux
- Ubuntu/Debian-based
- Ubuntu/Mint Tips
- Customisation
- Shortcuts (Ubuntu 20.04)
- Printing SysInfo
- Installing Packages
- Missing System Tray Icons?
- Wireless Devices
- Problems/Errors when running sudo apt update and sudo apt upgrade
- Skipping acquire of configured fileCredits go to their respective repo owners, contributors, and maintainers for providing solutions to issues I've come across. This repo only serves as a mini-library of the questions and answers I've found useful and would like to compile them into a list.
This section is meant for all Linux distros and their derivatives!
-
This assumes you have installed or already have GnuPG on your system. You could verify the installation by typing this
gpg --version
into a terminal! -
Open a terminal and type
sudo apt-get install gnupg-curl
for 16.04 and earlier orsudo apt install gnupg-curl
for 18.04 and later. -
Changing the working directory and downloading the SKS CA (Certificate Authorities) by typing this
cd ~/.gnupg; wget https://sks-keyservers.net/sks-keyservers.netCA.pem
-
(OPTIONAL) Verify the CA by going to this website and getting the OpenPGP key. Note that you could continue verifying it if needed, but read this post to see why you don't have to.
-
Add this line
keyserver hkps://hkps.pool.sks-keyservers.net
to~/.gnupg/gpg.conf
by typing in the terminalgedit ~/.gnupg/gpg.conf
. -
(FOR GnuPG 1 ONLY) Add this line
keyserver-options ca-cert-file=/home/.../.gnupg/sks-keyservers.netCA.pem
to~/.gnupg/gpg.conf
. -
(FOR GnuPG 2 ONLY) Add these lines to
~/.gnupg/dirmngr.conf
: (remember to replace...
with your username!)keyserver hkps://hkps.pool.sks-keyservers.net hkp-cacert /home/.../.gnupg/sks-keyservers.netCA.pem
-
Then, type
gpg --recv-keys 4AA4767BBC9C4B1D18AE28B77F2D434B9741E8AC
to verify the keyserver was configured correctly. -
If that doesn't work, then try searching for and adding the key manually by typing this:
curl 'http://pgp.surfnet.nl:11371/pks/lookup?op=get&search=4AA4767BBC9C4B1D18AE28B77F2D434B9741E8AC' > name.key gpg --import name.key
-
Enjoy! :)
-
You could refer to this website for really detailed instructions!
find . -type d -exec cp filename.ext {} \;
Replace 'filename' and 'ext' with the proper filename! Like so:
find . -type d -exec cp helloworld.txt {} \;
Breakdown of the above:
find
is a itemsearch utility.
denotes the current directory-type
acts as a filter for item typesd
denotes a directory-exec
is short for "execute"cp
is short for "copy"{}
indicates (or contains*) the results from thefind
expression.\
is the common "escape" symbol. In this case the backslash is used to allow;
to be parsed by the-exec
flag.
-
Fire up a terminal and paste this in:
wget https://raw.githubusercontent.com/ekalinin/github-markdown-toc/master/gh-md-toc
-
Then this:
chmod a+x gh-md-toc
-
Then in your desired dir, paste this in:
~/gh-md-toc ~/path/to/your/file.md
-
Copy and paste the resulting output into your
markdown
file and enjoy :)
- Fire up a terminal and find the troublemaker's process ID using ps:
ps -eaf | grep process_name
- Kill it:
kill process_id
or
-
Find a process using pgrep:
pgrep processname
-
Kill the process (in the case of multiple processes):
kill process_id
or
- If the job is the only one running, i.e only one "rclone" is running, then:
pkill process_name
-
Paste this into that window you opened!
find . -print | sort | sed 's;[^/]*/;|---;g;s;---|; |;g'
-
Paste this!
ls -R | grep ":$" | sed -e 's/:$//' -e 's/[^-][^\/]*\//--/g' -e 's/^/ /' -e 's/-/|/'
*Will update this section with a breakdown of how it works when I understand bash better.
-
Create a new directory.
mkdir ~/path/to/directory
-
Change the read/write permissions for the above directory.
chmod 700 ~/path/to/directory
-
Now, let's mount your new encrypted folder!
sudo mount -t ~/path/to/directory ~/path/to/directory
-
Answer all questions by typing in
y
foryes
andn
forno
, unless otherwise specified by the square brackets[ ]
. -
It will ask you for a passphrase, so pick one that you will remember. (Or just keep it safe in a password manager.)
-
Next select the default cipher, by entering the number corresponding to
aes
.Select cipher: 1) aes: blocksize = 16; min keysize = 16; max keysize = 32 2) blowfish: blocksize = 8; min keysize = 16; max keysize = 56 3) des3_ede: blocksize = 8; min keysize = 24; max keysize = 24 4) twofish: blocksize = 16; min keysize = 16; max keysize = 32 5) cast6: blocksize = 16; min keysize = 16; max keysize = 32 6) cast5: blocksize = 8; min keysize = 5; max keysize = 16 Selection [aes]: 1
It'll ask you for the amount of key bytes. Select the default amount.
Select key bytes: 1) 16 2) 32 3) 24 Selection [16]: 1
An option called
plaintext passthrough
allows for non-encrypted files to be used inside your encrypted folder. The default (recommended) configuration is to disable this option. If you would like to protect your files against prying eyes, you can enable filename encryption which is disabled by default.Enable plaintext passthrough (y/n) [n]: n Enable filename encryption (y/n) [n]: n
-
It will then attempt to mount the folder using your specified configuration.
Attempting to mount with the following options: ecryptfs_unlink_sigs ecryptfs_key_bytes=16 ecryptfs_cipher=aes ecryptfs_sig=aaaaaaaaaaaaaaaa Mounted eCryptfs
-
Copy the encrypted filename signature, which is labelled
ecryptfs_sig
. In this case it isaaaaaaaaaaaaaaaa
. -
Test that the folder is mounted properly by pasting this in:
mount | grep ~/path/to/directory
It will spit out something like this:
/path/to/directory on /path/to/directory type ecryptfs (rw,relatime,ecryptfs_sig=aaaaaaaaaaaaaaaa,ecryptfs_cipher=aes,ecryptfs_key_bytes=16,ecryptfs_unlink_sigs)
-
Now for the final test: unmount and re-mount your folder.
sudo umount /path/to/directory
Re-mount it:
sudo mount -t ecryptfs -o key=passphrase:passphrase_passwd=your_passphrase_here,ecryptfs_cipher=aes,ecryptfs_key_bytes=16,ecryptfs_passthrough=no,ecryptfs_enable_filename_crypto=yes,ecryptfs_fnek_sig=aaaaaaaaaaaaaaaa /path/to/directory /path/to/directory
-
It will spit out what we saw in step 7 above:
Attempting to mount with the following options: ecryptfs_unlink_sigs ecryptfs_key_bytes=16 ecryptfs_cipher=aes ecryptfs_sig=aaaaaaaaaaaaaaaa Mounted eCryptfs
-
Ensure your target hard drive is mounted using your preferred method.
df -h
will bring up all partitions and disks in human-readable format.Alternatively, you could access the
Disks
application by searching for it (press the Win/Command key.) -
Fire up a terminal and paste this in!
sudo apt-get install -y ecryptfs-utils
OR
sudo apt install -y ecryptfs-utils
-
Once
ecrypt
is installed, paste this:sudo ecryptfs-recover-private
and follow the on-screen instructions.
-
Once your desired directory(ies) are decrypted and you have access to them, move them to another location which you can access easily (and optionally create a new encrypted directory to store aforementioned files).
-
Nautilus
is capable of browsing the temporary directory, just enter this into your terminal:sudo nautilus
-
On Debian-based operating systems, GnuPG is already installed as part of the distro. GnuPG for modern systems kinda takes away the User ID of each key so issues may occur. To fix this, we have to import the public key
4AA4767BBC9C4B1D18AE28B77F2D434B9741E8AC
mentioned in the terminal output when trying to run this commandgpg --keyserver-options auto-key-retrieve --verify archlinux-version-x86_64.iso.sig
. -
Download the Arch Linux .iso file and its corresponding PGP key from the downloads page.
-
Open up a terminal, and type this
gpg --keyserver pool.sks-keyservers.net --recv-keys 4AA4767BBC9C4B1D18AE28B77F2D434B9741E8AC
to import the Arch Linux public key. -
Then type this
gpg --keyserver-options auto-key-retrieve --verify archlinux-version-x86_64.iso.sig
, replacingarchlinux-version-x86_64.iso.sig
with the downloaded signature filename to verify the file's signature. -
Once this is done the output should be similar to this:
gpg: assuming signed data in 'archlinux-2020.05.01-x86_64.iso' gpg: Signature made Fri 01 May 2020 13:33:57 +08 gpg: using RSA key 4AA4767BBC9C4B1D18AE28B77F2D434B9741E8AC gpg: Good signature from "Pierre Schmitz <pierre@archlinux.de>" [unknown] gpg: WARNING: This key is not certified with a trusted signature! gpg: There is no indication that the signature belongs to the owner. Primary key fingerprint: 4AA4 767B BC9C 4B1D 18AE 28B7 7F2D 434B 9741 E8AC
-
You're done!
- To create the EFI mount point, type this
mkdir -p /mnt/efi
in the terminal. - Then to mount the directory, type this
mount /dev/sda1 /mnt/efi
.
Goto easylinuxtips and follow the guides.
- Find the .cur and .ani files you want to use.
- Put them in a folder.
- Open this: CursorCreate
- Alternatively, open this: CursorCreateWindows.zip from the Utilities folder (either external harddrive or from sakae-crypt or kenji-crypt) OR this folder CursorCreate
- Run the program according to the README file.
- Use the template provided for a quickstart.
- Use the latest release for newer Ubuntu distros, if not you could try the older releases too!
Note: GDM3 won't accept filenames with spaces!!! Change filenames to include dashes ( - ) or underscores ( _ ) to work with filenames with spaces :)
- In a terminal, type
sudo apt install libglib2.0-dev-bin
and press Return/Enter. - Then type
curl -L -O github.com/thiggy01/ubuntu-20.04-change-gdm-background/raw/master/ubuntu-20.04-change-gdm-background
orcurl -L -O github.com/ttsuei/ubuntu-20.04-change-gdm-background/raw/master/ubuntu-20.04-change-gdm-background
if the first one doesn't work anymore. - Type
chmod +x ubuntu-20.04-change-gdm-background
to make the script executable. - set the wallpaper with
sudo ./ubuntu-20.04-change-gdm-background /location/of/wallpaper.jpg
***Change "wallpaper" to the name of your image! - It would ask if you would like to restart the GDM service, so type
Y
. If it doesn't, typesystemctl restart gdm.service
to restart it manually. - Wait for a bit and BOOM! You got yoself a nice new lockscreen :D
- Open up a terminal and run this first:
sudo apt-get update
- Then type this once that's done:
sudo apt-get install qt5-style-plugins
- Set all Qt5 applications to use the system theme by doing:
echo "export QT_QPA_PLATFORMTHEME=gtk2" >> ~/.profile
- Once that's squared away, L O G O U T.
- Log back in... and??? 🤑
- Open a terminal window and create a .bash_aliases file in your home directory:
gedit ~/.bash_aliases
- Once the editor is open, add this:
alias your_alias_name='your_terminal_command; second_terminal_command'
- Once you're done, save the file:
Ctrl + S
and exit. - In the terminal window, type this:
. ~/.bashrc
to refresh your .bashrc file. - Try using your new alias in terminal by typing
your_alias_name
in the terminal to confirm it works. - E N J O Y 😃
- Do check if you have
dconf-editor
installed before doing this :) - Installing
dconf-editor
can be done by running this in a terminal:sudo apt update -y && sudo apt install dconf-editor -y
- Change your working directory to the
/planks/docks/
folder:cd ~/.config/planks/docks
and make a new folder:mkdir dock2
, then copy the launcher items from your main dock:cp dock1/launchers dock2/launchers
- Then open a terminal and open the
configuration editor
by typingdconf-editor
in the terminal - There's gonna be a window popping up, with a message warning you that some apps would break with modified settings. Press
"I'll be careful."
- In the top centre bar, press the magnifying glass and enter
/net/launchpad/plank/docks/
- In the results, there will be an entry for
enabled-docks
. Click that T H A N G! - Click the
Use default value
switch to enable custom values, and add,'dock2'
to'dock1'
. - Once that's done, click
Apply
on the bottom left hand corner. - Let's take a short detour back to the terminal, and get the second monitor's name by
plank --preferences
. - A new window will pop up, and there will be a row with a
On Primary Display
switch. Next to it is the active monitors in a dropdown menu. Click on the dropdown menu, and it should list the displays in this manner:eDP-1
HDMI-X
. Usually the second monitor would be theHDMI-X
entry. Note this down! - Now, click on the
plank
folder up top (upper left corner), click ondocks
, then ondock2
. There's a buncha settings we gotta change! - First, you might want to change the icon size (
icon-size
)to a suitable size for your external monitor (if you're using a smaller screen like a laptop screen). Next, change themonitor
value to reflect the value you got in step 11. Finally, change thetheme
to match your current dock theme. That's it! - Back to your terminal! Let's restart the
Plank
dock shall we?pkill plank
and thenplank &
and pressEnter
orReturn
once it loads up! - You'll be able to see your second dock now! Enjoy :D
- Ctrl + Alt + Arrowkey to switch between workspaces
- Ctrl + Alt + Shift + Arrowkey to move the current window between workspaces
- In your upper right hand corner of the screen, click on the arrow facing downwards.
- Click the "Settings" option near the bottom of the dropdown menu which appears.
- A new window will appear. Try scrolling through the categories on the left pane till you find "Keyboard Shortcuts" or something to that effect 😝.
- Install
neofetch
if you haven't done yet! Here's a link to the instructions! Or you could follow the steps below.
- Update yo repositories!
sudo apt update
- Get that stuff in you!
sudo apt install neofetch
- Add the official PPA!
sudo add-apt-repository ppa:dawidd0811/neofetch
- Update yo repositories!
sudo apt update
- Get that stuff in you!
sudo apt install neofetch
- Fire up a terminal, and navigate to the folder containing the downloaded
.deb
file. E.g:cd ~/Downloads
- Type this in:
sudo dpkg -i /path/to/deb/file
- Remember to substitute the filename for
path/to/deb/file
!
- Fire up a terminal, and navigate to the folder containing your downloaded
tar.gz
file! - Type this in:
tar -zxvf FileName.tar.gz
et voila!
- Download the latest package from the official Android Developer website.
- Unpack this
tar.gz
archive into/usr/local/
for yourself or/opt/
if you wanna get every user in on the party! Skipstep 3
if you prefer working from your current directory. - Fire up a terminal, and paste this in:
sudo cp "<folder_name>" /usr/local/ -r
- Navigate "
cd
" intobin
. Let's perform a check before going ahead and running the installer:chmod +rx studio.sh
. - Run the installer, and choose if you want to import your previous settings, or start fresh!
- In the new Android Studio window, click
Configure
, and selectCreate Desktop Entry
for easy access from the App Dashboard. - Next step would be to read the
docs
or start building apps!
- Download your desired fonts, and extract them out of the ZIP file(s) if necessary.
- Double click each of them and press Install for each .ttf or .otf file.
- Open a terminal, and type
fc-cache -f -v
- Enjoy your new fonts!
- Install one of these two: TopIcons Plus or KStatusNotifierItem/AppIndicator Support either from source (on Github) or from the Gnome Extensions page.
Note:
This has been tested on my Galaxy Buds
OS: Ubuntu 20.04
as of 8th May 2020.
Try pairing your BT device and computer. Once they're paired, follow the steps below:
- Open Terminal and run
bluetoothctl
- The output would be something like this:
tatsuei@eijihaus:~$ bluetoothctl
[NEW] Controller xx:xx:xx:xx:xx:xx [default]
[NEW] Device aa:bb:cc:dd:ee:ff Galaxy Buds (4FB9)
Agent registered
[bluetooth]#
- In the above output "Galaxy Buds (4FB9)" is paired but not yet connected.. So to connect to this device we do:
connect aa:bb:cc:dd:ee:ff
at the prompt[bluetooth]#
withaa:bb:cc:dd:ee:ff
as your BT device address.
Example:
[bluetooth]# connect aa:bb:cc:dd:ee:ff
Attempting to connect to aa:bb:cc:dd:ee:ff
[CHG] Device aa:bb:cc:dd:ee:ff Connected: yes
Connection successful
[CHG] Device aa:bb:cc:dd:ee:ff ServicesResolved: yes
[Galaxy Buds (4FB9)]#
This means if you can run the command bluetoothctl
and then at the [bluetooth]#
prompt if you can input connect aa:bb:cc:dd:ee:ff
The Bluetooth Device will connect.
So this can be done with a single command in terminal like this, after your first login open Terminal and run this command.
echo "connect aa:bb:cc:dd:ee:ff" | bluetoothctl
Example:
tatsuei@eijihaus:~$ echo "connect aa:bb:cc:dd:ee:ff" | bluetoothctl
[NEW] Controller xx:xx:xx:xx:xx:xx i7-4770 [default]
[NEW] Device aa:bb:cc:dd:ee:ff Galaxy Buds (4FB9)
Agent registered
[bluetooth]# connect aa:bb:cc:dd:ee:ff
Attempting to connect to aa:bb:cc:dd:ee:ff
Agent unregistered
[DEL] Controller xx:xx:xx:xx:xx:xx [default]
tatsuei@eijihaus:~$
so the command echo "connect aa:bb:cc:dd:ee:ff" | bluetoothctl
is working..
This means if we can run this command at login without human interaction.. the BT device which is paired and already turned on at the time of boot will connect in the above manual way..
mkdir ~/bin
(Create this directory if you dont have already.. Otherwise Ignore this step)touch ~/bin/btautoconnect.sh
gedit ~/bin/btautoconnect.sh
and paste this:
#!/bin/bash
bluetoothctl
sleep 10
echo "connect aa:bb:cc:dd:ee:ff" | bluetoothctl
sleep 12
echo "connect aa:bb:cc:dd:ee:ff" | bluetoothctl
exit
-
Save the file, and then exit the editor.
-
Set the executable permission for this script:
chmod +x ~/bin/btautoconnect.sh
-
Create a .desktop file named
btautoconnect.desktop
in~/.config/autostart/
-
touch ~/.config/autostart/btautoconnect.desktop
-
Edit the file,
gedit ~/.config/autostart/btautoconnect.desktop
, and paste the following into the file.
[Desktop Entry]
Type=Application
Exec=/home/tatsuei/bin/btautoconnect.sh
Hidden=false
NoDisplay=false
X-GNOME-Autostart-enabled=true
Name=BTAutoConnect
X-GNOME-Autostart-Delay=5
Comment=Connects to Galaxy Buds
- Save the file, and then exit the editor.
- Reboot your computer, and see the magic happen(?) :)
- Important!! Remember to substitute the MAC address by going into the Settings menu and find Bluetooth devices
- Try this:
dbus-send --print-reply --system --dest=org.bluez /org/bluez/hci0/dev_<mac_address_of_headphones> org.bluez.MediaControl1.VolumeUp
- If that works, skip steps 4-6 :)
- Another fix would be:
sudo gedit /lib/systemd/system/bluetooth.service
- Add this:
--noplugin=avrcp
to this:ExecStart=/usr/lib/bluetooth/bluetoothd
- Then run:
sudo systemctl daemon-reload
sudo systemctl restart bluetooth
- Reconnect your headphones and enjoy!
-
This is something I came across with
PostgreSQL
, so feel free to change the package name to match the package producing the error. -
Fire up a terminal and paste these commands in one after the other!
sudo grep -i postgresql /etc/apt/sources.list
or
sudo grep -i postgresql /etc/apt/sources.list.d/*.list
-
It'll pop up with a filename along with its directory, so let's edit the file:
sudo -H gedit /etc/apt/sources.list
or
sudo -H gedit /etc/apt/sources.list.d/found_filename.list
*If you're using the second command, do remember to exclude the trailing
:deb
from the filepath.**Also, ignore any error messages that may pop up.
-
Once the editor is open, find the line which starts with:
deb https://
ordeb http://
. -
Change the above line to:
deb [arch=amd64] https://
ordeb [arch=amd64] http://
-
Et voila! Run your
update
andupgrade
commands without issues.