Blog Spot!


How to Enable Automatic Login on Debian 8 Jessie

In this tutorial, we will help you enable automatic login on Debian 8 Jessie for both GDM3 and LightDM Display Managers. If you find problems in enabling automatic login on Debian Jessie, then this guide may be useful for you.

1. Automatic Login for GDM3

Make a backup copy of the file we are going to edit using this command:

su -
cp /etc/gdm3/daemon.conf /etc/gdm3/daemon.conf.back 

Let's edit this file using this command:

gedit  /etc/gdm3/daemon.conf 

or

nano /etc/gdm3/daemon.conf

Under [daemon] entry uncomment these two lines:

AutomaticLoginEnable = true
AutomaticLogin = user1

Replace user with your own username.
Save the file, then run this command:

dpkg-reconfigure gdm3 

2. Automatic Login for LightDM

Open the terminal and make first a backup of the file we are going to edit:

su - 
cp /etc/lightdm/lightdm.conf /etc/lightdm/lightdm.conf.back

Edit now this file:

gedit /etc/lightdm/lightdm.conf

or

nano /etc/lightdm/lightdm.conf

Uncomment these two lines:

autologin-user=USERNAME
autologin-user-timeout=0

Replace USERNAME with your own username. Save the file and exit.
Run now this command so that changes are taken into effect:

dpkg-reconfigure lightdm

Added on 08.Apr.2016
Tags: linux debian autologin

Guake on the right screen

Edit /usr/lib/guake/guake.py or wherever guake.py is located on your system. Edit the method get_final_window_rect to be the following:

def get_final_window_rect(self):
    """Gets the final size of the main window of guake. The height
    is the window_height property, width is window_width and the
    horizontal alignment is given by window_alignment.
    """
    screen = self.window.get_screen()
    height = self.client.get_int(KEY('/general/window_height'))
    width = 80
    halignment = self.client.get_int(KEY('/general/window_halignment'))

    # future we might create a field to select which monitor you
    # wanna use
    #monitor = 0 # use the left most monitor
    monitor = screen.get_n_monitors() - 1 # use the right most monitor

    monitor_rect = screen.get_monitor_geometry(monitor)
    window_rect = monitor_rect.copy()
    window_rect.height = window_rect.height * height / 100
    window_rect.width = window_rect.width * width / 100

    if width < monitor_rect.width:
        if halignment == ALIGN_CENTER:
            window_rect.x = monitor_rect.x + (monitor_rect.width - window_rect.width) / 2
        elif halignment == ALIGN_LEFT:
            window_rect.x = monitor_rect.x
        elif halignment == ALIGN_RIGHT:
            window_rect.x = monitor_rect.x + monitor_rect.width - window_rect.width

    window_rect.y = monitor_rect.y
    return window_rect

Added on 28.Mar.2016
Tags: linux quake screen

Linux Network Speed Test

Start Netcat to Listen

I'm going to use a utility called netcat, or nc to listen on a particular network port on the Desktop machine. Enter the following command into a terminal on Desktop:

nc -lk 2112 > /dev/null

Linux network speed test: dd and netcat

Now that the first machine, Desktop, is set up to listen, I'll use the second machine, Laptop, to send and receive data to test the network. The command below assumes that the IP address for Desktop is 192.168.2.2. Adjust the address accordingly for your network. From a terminal on Laptop, enter the following:

dd if=/dev/zero bs=16000 count=625 | nc -v 192.168.2.2 2112

tuxtweaks

Added on 16.Mar.2016
Tags: test speed wifi network linux

Monitor MySQL Performance in Linux

mysqladmin

mysqladmin is a default command line MySQL client that comes pre-installed with MySQL package for performing administrative operations such as monitoring processes, checking server configuration, reloading privileges, current status, setting root password, changing root password, create/drop databases, and much more.

To check the mysql status as well as uptime run the following command from the terminal, and make sure you must have root permission to execute the command from the shell.

command:

[root@localhost ~]$ mysqladmin -u root -p version
Enter password:

output:

mysqladmin  Ver 8.42 Distrib 5.1.61, for redhat-linux-gnu on i386
Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Server version          5.1.61-log
Protocol version        10
Connection              Localhost via UNIX socket
UNIX socket             /var/lib/mysql/mysql.sock
Uptime:                 20 days 54 min 30 sec

Threads: 1  Questions: 149941143  Slow queries: 21  Opens: 752  Flush tables: 1  Open tables: 745  Queries per second avg: 86.607

tecmint

Added on 15.Mar.2016
Tags: sql mysq oerformance linux monitor

How to change the default collation of a database?

change database collation:

ALTER DATABASE <database_name> CHARACTER SET utf8 COLLATE utf8_unicode_ci;

change table collation:

ALTER TABLE <table_name> CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci;

change column collation:

ALTER TABLE <table_name> MODIFY <column_name> VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci;

stackoverflow

Added on 11.Mar.2016
Tags: sql mysql database

Search


PHP Libraries


Carbon lib / docs
Idiorm lib / docs
Image Workshop lib / docs
lorenzos/Minixed lib / docs
Parsedown lib / docs
PHP Paginator lib / docs
PHP Redis lib / docs
QrCode lib / docs
Requests lib / docs
Slim lib / docs
Spyc lib / docs
TWIG lib / docs
Upload lib / docs
Validation lib / docs
Zebra Image lib / docs

JS Libraries


AJV lib / docs
BackboneJS lib / docs
Bootstrap Notify lib / docs
C3.js lib / docs
ChartJS lib / docs
FastMD5 lib / docs
HighlightJS lib / docs
jQuery-Storage lib / docs
JS-Cookie lib / docs
Leaflet JS lib / docs
LowDB lib / docs
Marked lib / docs
NeedlyJS lib / docs
ParcelJS lib / docs
RequireJS lib / docs
Swig lib / docs
Toastr lib / docs
Underscore lib / docs
ValidateJS lib / docs
top