Category Archives: Linux OS

Synergy for Multi-Computer Control

I have to work with Windows, Linux and Macbook environment and with time I have no issues working with all of these environments simultaneously. What used to irk me the most was the need to physically use multiple keyboards and mouse and control my Windows laptop and Macbook. Doing VNC / Remote Desktop into another computer didn’t cut it. So I found out about Synergy project long time ago. This is a free and open source keyboard/mouse sharing solution.

Basically the computer whose keyboard/mouse you want to use becomes the Synergy server and all other laptops / computer would become Synergy client. It is very easy to setup and once it is done I can use the keyboard / mouse of of my Macbook to control my windows laptop as well as Linux laptop simultaneously.

How to find Linux distribution and kernel version

In order find out what version of Linux you are running you can execute either of the following commands:

  • cat /etc/*-release
  • lsb_release -a
  • cat /proc/version
  • dmesg | head -1

To find out the kernel version of Linux you can execute either of the following commands:

  • uname -a
  • uname -mrs

Disclaimer: These commands worked for me on Debian Linux.

Update for Oracle Linux

The following commands gave accurate information about OS and release numbers on Oracle Linux.

rpm -qf /etc/redhat-release

oraclelinux-release-6Server-8.0.3.x86_64
cat /etc/issue.net | head -1

Oracle Linux Server release 6.8

 

Locale issue in Linux VPS Box

In case of a new Linux VPS box it is possible that you might encounter an error like this:

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LC_CTYPE = “UTF-8”,
LANG = “en_US.UTF-8”
are supported and installed on your system.
perl: warning: Falling back to the standard locale (“C”).

To solve this error the following approach worked for me on my Debian box. Execute the following command

sudo vi /etc/ssh/sshd_config

In this file comment the following line. This line basically allows the client OS to pass it’s environment parameters to the remote server which can cause issues.

AcceptEnv LANG LC_*

Save the file and reboot the VPS box. After rebooting this error should not ideally come. If you are still getting this error then it is possible that you don’t have the locale installed. The following command might help you in resolving this problem.

sudo locale-gen
sudo dpkg-reconfigure locales

 

Using wget to do high speed HTTP transfer within LAN

Today I needed to transfer contents between my Linux servers using a CAT5 LAN connection. The source server served files via HTTP and also had a FTP server running. I ruled out using FTP for transfer as I wanted to do the transfer via command line recursively so the natural candidate was wget. On the target Linux box I executed the following command to get a good transfer speed:
wget -r -nH –cut-dirs=2 –no-parent –reject=”index.html*” http://192.168.111.116/files/dump/
The speed received was something like this:
Downloaded: 2476 files, 27G in 45m 49s (10.0 MB/s)

This completed the job in a a short while with no residual HTML file being generated in target.