How to send a broadcast message on Ubuntu-based distros

How to send a broadcast message on Ubuntu-based distros

Blog Linux

Sometimes we need to notify another users connected by SSH in same server with a simple message like when we use ‘halt‘ or ‘init 0‘ commands. Ubuntu-based distros have a special program to it, it’s wall. Then, to send a broadcast message for all connected users in server terminal, you can use:

Now, all of SSH users will receive a message like this:

Associating JNLP files on Gnome 3

Associating JNLP files on Gnome 3

Blog Linux

On Gnome 3, the support for mimetypes is more better than compared with old Gnome 2. Now we have a mimetype repository for all files types, where we can easily customize rules to manage apps per files, or files per apps (too!).

Java WEB (Java WEB Start) apps use JNLP or JSP files to open him on client browsers and desktops, the problem starts when we try to open these files on file explorer, they always open on our browsers (Chrome, Firefox, etc.) by default. To change this, we need to do few changes by terminal. Then, follow these steps:

Access the managed mimetypes folder:

Then, create a new file to associate your javaws command with JNLP files. This step requires sudo permission.

Ok, now put this content in this file:

Pay attention to this line:

You’ll put the location of your javaws executable at JVM folder. On Ubuntu-based distros the installation folder always is at /usr/lib/jvm/.

Now, we need registry this new configuration for gnome mimetypes manager. To do this, do this:

At the end of this file, put a new entry referring your previous file ‘javaws.desktop’, like this:

Save and close the file.

Now, you can test across browser or your favorite file explorer.

How to fix the big guy called ‘ibdata1’

How to fix the big guy called ‘ibdata1’

Blog Databases Linux

The file ibdata1 is the system tablespace for InnoDB infrastructure, and it contains several informations about InnoDB such as table data pages, index pages, data dictionary, rollback segments, etc. This file is always growing, then, it’s easy to reach to giant sizes.

The size of this file commonly affects development and test machines, because many drops and imports with databases inflate this one. Then, to fix this problem, I have some steps to ends this problem.

Backup all your databases

Do a full dump of your databases.

Drop all your databases

Now, you’ll need remove all your databases, except for mysql and information_schema databases, because they are used by MySQL to control users and data information about managed databases.

Stop MySQL service

For the next step, you will need stop the MySQL service.

Configurations

Now, you’ll need change in MySQL how it’s manage InnoDB data, in this case using one file per table. Locate the my.cnf file on your server and putt this parameter at [mysqld] section:

Save with ‘Esc + :wq!’, then go to MySQL data folder:

The ls -alh command in this folder will print something like this:

Delete this file:

Finally, start MySQL service and import your databases again: