Posts

How to install pgadmin4 in Ubuntu 18.10 throught apt

If you want to install pgadmin4, as the official site said, probably you can't do it if you have Ubuntu Cosmic.

You need to add bionic repository, because in cosmic only pgadmin3 is available. Also, you need to specify if you are using 64 bits architecture.

sudo apt-get install curl ca-certificates
curl https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -

sudo sh -c 'echo "ddeb [arch=amd64] http://apt.postgresql.org/pub/repos/apt/ bionic-pgdg main" > /etc/apt/sources.list.d/pgdg.list'

sudo apt update
sudo apt install pgadmin4

Enjoy it!


Official site: https://wiki.postgresql.org/wiki/Apt

How to install Visual Code from apt in Ubuntu

To get the lastest software versions, is a good idea get it from repositories to upgrade them.
To add Visual Code to apt execute the following lines:

curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg
sudo install -o root -g root -m 644 microsoft.gpg /etc/apt/trusted.gpg.d/
sudo sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main" > /etc/apt/sources.list.d/vscode.list'
sudo apt-get install apt-transport-https
sudo apt-get update
sudo apt-get install code 

Enjoy it!

How to use aria2c with chrome as download manager in Linux

In the following site, you can found the source code and the link to the extension for google chrome:

https://github.com/robbielj/chrome-aria2-integration

After installed aria2, you must run the following sentence:

aria2c -s10 -x10 --enable-rpc --rpc-listen-all=true --rpc-allow-origin-all=true

Now, you could choose download your files with aria2c from google chrome.
Enjoy it!

How to disable power button in Ubuntu 18.10

Image
If you have an Asus notebook, probably you hate the new power button location (right top corner).
To disable it and avoid accidently turn off your computer you can do the following steps:

Step1: Install dconf-editor

sudo apt install dconf-editor

Step2:

Run dconf-editor and go to org.gnome.settings-daemon.plugins.power.power-button-action

Step3:

Choose the value 'nothing'

Enjoy it!

Also, you can try directly with these commands:

gsettings list-recursively org.gnome.settings-daemon.plugins.power
gsettings set org.gnome.settings-daemon.plugins.power button-power 'nothing'

How to choose a background image for grub2

If you want a background image for grub2, first you need to change the colors and resize it (the larger the image, the longer it takes to start grub2).

convert -resize 640x480 -colors 256 image.jpg new_image.png

Now, move the image to grub folder

sudo mv new_image.png /boot/grub

And tell to grub file where  is the path to read the background image:

sudo vim /etc/default/grub

add the following line:

GRUB_BACKGROUND=/boot/grub/new_image.png

Now, update your grub

sudo update-grub

Enjoy it!

How to run Gephi in Ubuntu

If you try to run Gephi in your linux, probably you will see the following issue:

Illegal reflective access by org.netbeans.ProxyURLStreamHandlerFactory

This appears when you are using openjdk9 or newer.
To fix it, you must install openjdk8-jdk and choose it for java and javac

sudo apt-get install openjdk-8-jdk

with the following command you can see your java installed versions:

sudo update-java-alternatives --list

Now, choose version 8 for each one:

sudo update-alternatives --config javac
sudo update-alternatives --config java

Enjoy it!