How to change default terminal emulator in Ubuntu 18.04

Ctrl+Alt+t is the keyboard shortcut to open a terminal in Ubuntu. By default, it opens an ‘x-terminal-emulator’ terminal.

I wanted to change that to use my favorite terminal emulator, which is ‘terminator’

To do that:

gsettings set org.gnome.desktop.default-applications.terminal exec 'terminator'

or:

sudo update-alternatives --config x-terminal-emulator

That’s it!

Enjoy!

Source:

https://askubuntu.com/questions/70540/how-can-i-set-default-terminal-used-in-unity

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

azure-cli installation on Ubuntu Bionic (18.04)

No deb packages have been released yet for Ubuntu 18.04, so you have to use the script MS provided here. However, you will face the following error immediately:

 fatal error: Python.h: No such file or directory

To resolve this, simply install the python-dev package:

sudo apt install python-dev

Then run the script normally:

curl -L https://aka.ms/InstallAzureCli | bash

Once done, exit the terminal and open a new one.

That’s it! Enjoy!

Sources:

  1. https://docs.microsoft.com/en-us/cli/azure/install-azure-cli-linux?view=azure-cli-latest
  2. https://github.com/Azure/azure-docs-cli-python/issues/755
  3. https://github.com/benhoyt/scandir/issues/85
Posted in Linux | Tagged , , , , , | Leave a comment

How to uninstall NVidia driver from Linux

This only applies for drivers that have been installed using the .run file.

./NVidiaxxxx.run --uninstall

Source: Red Hat Documentation which they deny access to except if you pay! Idiots!

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

How to to prevent the screen from turning off when locked with gnome-shell on Ubuntu 18.04

This annoys me a lot, as whenever I lock the screen, my big screen turns off and it is an old slow screen that takes a few seconds to turn on again.

To disable this behavior, do the following:

  1. Download this extension: https://www.dropbox.com/s/5owr2bxhbijdino/no-screen-blank%40example.com.zip?dl=1
  2. Extract the file and edit the metadata.json file, adding “3.28” to the list of supported shell-version
  3. Place the folder inside ~/.local/share/gnome-shell/extensions/
  4. Open gnome-tweaks (install it first by apt install gnome-tweaks if you don’t have it already)
  5. Go to Extensions and turn “No screen blank” extension on.
  6. Enjoy!

Note: I have uploaded the modified version to support Gnome 3.28 here.

Tested on Ubuntu 18.04 with Gnome 3.28.

Thanks go to the anonymous developer here, who did quite a good job!

Posted in Linux | Tagged , , , , , , | 5 Comments

Use 7z to compress & encrypt zip files

7z a -tzip -mem=AES128 -bd -y -pPASSWORD -mx=0 -- OUTPUT_FILE.zip file1 file2 file3 file3

This uses AES128 encryption and uses a compression rate of 0 (archive mode). You can pick a number up to 9 (highest compression rate)

Enjoy!

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