All posts

Everything is too small on desktop at 1080p

  • by

After installing Ubuntu Linux on a laptop with screen resolution 1920x1080 pixels or more, you may find that the icons and text appear to be small. You can alleviate the problem by taking the following steps.

1. Install gnome-tweak-tool

$ sudo add-apt-repository universe
$ sudo apt-get install gnome-tweak-tool

2.

Read more

Connecting Wacom One CTL-672/KO-CX tablet to Ubuntu Linux

  • by

Wacom CTL-672 connected to computer running Ubuntu Linux

Wacom One CTL-672/KO-CX is an 8.5 inch x 5.3 inch graphic tablet which can be connected to a computer via a USB port. The tablet comes with a pressure sensitive cordless pen. Once connected to a computer via a USB port, pen and tablet work like a mouse on a mouse pad, giving a very fine pointer on the screen.… Read more

nginx 502 Bad Gateway

  • by

1.0 502 Bad Gateway

nginx 502 Bad Gateway

After the update of Linux on the web server, the website would not open in the browser. Instead the following error was displayed.

502 Bad Gateway
nginx/1.14.0

2.0 Solution

First we check the nginx server.

$ systemctl status nginx
● nginx.service
Read more

How to trim a string in C

  • by

Trim a string

The problem of removing leading and trailing whitespace characters in strings occurs in programming quite often. Here is a solution.

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>

void trim (char *dest, char *src); 

int main (int argc, char **argv)
{
    char inbuf [1024];
    char outbuf [1024];

    printf ("Type a string : ");
    while (fgets (inbuf, 1024, stdin) !=
Read more

Socket programming using the select system call

  • by

Server and clients

1.0 Client-Server Paradigm

The Client-Server paradigm divides the software architecture of a system in two parts, the server and its clients. The server works in the background and maintains the system-wide database. Using the database, it provides the functions for system operation and responses to queries from the clients.… Read more

MCE hardware error cpu 0

  • by

1.0 Error

Error

While running Ubuntu 18.04.1 on a laptop, the following errors were observed.

mce: hardware error cpu 0 machine check 0 bank 6 ae0000000040110a
mce: hardware error tsc 0 addr ffb07540 misc 238a0000086
mce: hardware error processor 0:40651 time 1540082330 socket 0 Apic 0 microcode 24
ipmi dmi invalid offset 0

The system would stop in the single user mode.… Read more

Socket Programming using UDP in C

  • by

1.0 Datagram sockets

There are two major types of network sockets, viz. Stream sockets (SOCK_STREAM) and Datagram sockets (SOCK_DGRAM). The socket type defines the semantics of communication between this socket and its remote counterpart. Stream sockets provide full-duplex reliable sequenced data streams.… Read more

Socket Programming using TCP in C

  • by

1.0 Client-server model

Client - Server System

Client server model is a software architecture paradigm prevalent in distributed applications. A server has information resources and processes that provide answers to queries and other services to remote clients over the network. Some of the examples of these services are booking an airline ticket and/or a room in a hotel, sending a file to a client, sending a mail message to another person (client), etc.… Read more

Signals in Linux

  • by

1.0 Signals

A signal is a notification delivered to a process by the kernel. A signal indicates that an event has occurred and the process must take note of it. Signals are mostly delivered asynchronously to a process. Whatever the process was doing is suspended and the processing of the signal takes place immediately.… Read more