shadowsocks firefox settings

install ShadowSocks client in Ubuntu 18.04

ShadowSocks client is part of shadowsocks package. This include both client and server. If you are looking to install server, see Install ShadowSocks server on Debian 10

To install ShadowSocks, run

ShadowSocks client is called sslocal, get installed in /usr/bin/sslocal.

On Ubuntu, no start up script provided with this package, so you need to create one or manually run sslocal when required.

Create a service file

Add following content

Now we need to create a configuration file with your ShadowSocks server IP and password.

Add following content

“server” = IP of the server where you installled ShadowSocks server.
“server_port” = Port used by ShadowSocks server
“password” = ShadowSocks server password.

local_port can be anything you like.

Enable shadowsocks service

To start

To see status

Now you can configure your browser or other sock proxy supported application using 127.0.0.1:8044. Here is how to configure firefox

shadowsocks firefox settings

Setting up MineCraft Server in Ubuntu

To setup MineCraft server on Ubuntu, first you need to install Java.

Create a user to run minecraft

You can set a password if you want direct SSH login to this user or login as root, then “su – minecraft”.

Login as user minecraft with SSH or “su”.

Download minecraft server .jar file from

https://www.minecraft.net/en-us/download/server/

At the time of writing, i downloaded

Don’t use above link as it can get older, always go to minecraft site and get new link, so you get latest minecraft server jar file.

You can start minecraft server with command

First time when you run, it exit with some error related to EULA.

You need to edit file

Set

Now minecraft will run. You can create a run.sh file with following command for starting minecrat easily.

Paste following content

To make the file executable, chmod it 755

When you start minecraft from terminal/ssh, it get closed when you disconnect. To keep minecraft server running after you disconnect, use tmux or screen.

Ubuntu Configure systemd-resolved

Latest Ubuntu/Debian use systemd-resolved for DNS resolution. On a fresh Ubuntu 19.04 install DNS failed to resolve.

To fix this, create file

Add content

Restart systemd-resolved

You can find systemd-resolvd status with command

To resolve a domain, use

Ubuntu welcome message

Ubuntu remove SSH welcome message

When you login to an Ubuntu server using SSH, you get welcome message like

Ubuntu welcome message

On most Linux systems, this is generated by /etc/motd. On Ubuntu, MOTD (message of the day) generated dynamically with some scripts. I don’t want to see all the marketing message from Ubuntu everyday.

To disable MOTD on Ubuntu, just delete the scripts from /etc/update-motd.d/

If you want a differnt motd, you can put a shell script in this folder.

Method 2

Another way to disable motd is by disabling pam_motd.so module.

Edit files

Comment out the lines related to pam_motd.so

Install Linux Kernel 5.0 on Ubuntu 18.04 LTS

Ubuntu 18.04 was released with Linux kernel 4.15

On 8 Aug 2019, Cannonical released Ubuntu 18.04.3 LTS with Linux Kernel 5.0.

If you are using older Ubuntu 18.04 point release, you won’t get newer kernel when you do software upgrade.

To get newer Linux kernal installed, you need to install Hardware enablement (HWE) stack, this provide newer kernel that provide support for latest hardware.

To install Hardware enablement (HWE) stack, run

if this is Desktop computer, you may need to run

after installing, reboot

after reboot, you will see latest Linux Kernel.

wifi ubuntu settings

Ubuntu allow a normal user to edit WiFi Connection

When a normal user edit Wi-Fi connection on Wi-Fi Settings, they will be asked to enter administrator user pasword.

wifi ubuntu settings

To allow a normal user to modify network connection, you can edit the connection configuration file in folder

This file look like

Find

Replace with

USER_NAME_HEARE = replace this with actual username, that need to edit the network configuration.

MariaDB Repository Setup Script

This script configure MariaDB repository on your server. You can find more details on offical page

https://mariadb.com/kb/en/library/mariadb-package-repository-setup-and-usage/

To setup mariadb repo, run

I was expecting it ask me what version of MariaDB i like to setup. But it just setup MariaDB 10.4. I wanted to upgrade MariaDB to version 10.2, anyway i did upgrade to 10.4 and everything worked fine.

If you need a speicfic version, you can run like

Availabe versions are

When i run the script on Debian 9 server, i get following error

This is fixed by running

Install x11vnc on Ubuntu

To install x11vnc on Debian/Ubuntu, run

To start vnc server, run

By default, there will be no password. To set password, run

To start x11vnc server with password, run