Use a classic menu in Unity

28/04/2024 Categories: Logiciel, Système Tags: Aucun commentaire

Source: WebUpd8

If you find Dash to be confusing and want to use a classic menu in Unity, you have at least two alternatives: Cardapio or a new ClassicMenu Indicator.

ClassicMenu Indicator

Classic Menu Indicator Ubuntu
While the idea is great, there are a few annoyances: you can’t move indicators in Ubuntu so you can’t move the menu to the position you want on the panel and also, ClassicMenu AppIndicator doesn’t display icons for the menu items. You can get it to display icons by using the commands posted here.
Still, ClassicMenu Indicator is a great menu alternative for those who don’t like Dash and I’m sure it will improve in the future (this is the first public release).

Update: there’s now a PPA too:

sudo add-apt-repository ppa:diesch/testing
sudo apt-get update
sudo apt-get install classicmenu-indicator

Cardapio

Cardapio Unity launcher

Cardapio is a main menu alternative with quite a few cool features: it comes with Zeitgeist integration, includes plugins for performing inline searches of Files (via Tracker), Software Center, Google, Wikipedia, and much more.

A long time ago, when Cardapio didn’t have an Avant Window Navigator applet, we posted about adding Cardapio to AWN using a feature that displays Cardapio near your mouse using a command (« cardapio show-near-mouse« ). Well, using the same command you can create an Unity panel launcher to run Cardapio, like you can see in the screenshot above.

To use the launcher, firstly install Cardapio:

sudo add-apt-repository ppa:cardapio-team/unstable
sudo apt-get update
sudo apt-get install cardapio
To make things easier, I’ve created the Unity launcher so all you have to do is download it and drag it to the Unity Launcher.
So download the Cardapio launcher from HERE, extract it and place the file under~/.local/share/applications/ (important: if you don’t place it here, it will disappear once you restart your computer). « .local » is a hidden folder in your home directory so press CTRL + H to see it. Then drag the file to the Unity Launcher.

This is an AppIndicator (so it’s displayed in the AppIndicator area) that behaves like a regular GNOME menu.

 

Categories: Logiciel, Système Tags:

Pure-FTPd Administration

27/04/2024 Categories: Logiciel Tags: Aucun commentaire

Source: Novell Cool Solutions

This article was tested on SUSE Linux Enterprise Server and SUSE Linux Enterprise Desktop.

In this article I am going to cover setting up virtual users and administrating user accounts. Some of the tasks we will look at are; chrooting users, setting upload/download limits, restricting IP access and many other tasks. Pure-FTPd is an excellent service that provides a rich set of features and a high level of security as it is regularly audited for security vulnerabilities, Pure-FTPd also provides server messages in multiple languages which helps administrators that don’t natively speak English.

Installing Pure-FTPd

The Pure-FTPd daemon can be installed from the SUSE installation disks. To check that it is not currently installed you can issue the « rpm » command with the following qualifiers « -q pure-ftpd » this will query the RPM database for the pure-ftpd package, as shown in Figure 1.

linux-1reo:~ # rpm -q pure-ftpd
pure-ftpd-1.0.20-24.2

When you query the database for Pure-FTPd and nothing is returned you will need to install the daemon using the YaST utility either issue the command « yast » or « yast2 » depending on your preference of interface.

Once Pure-FTPd has been installed you can start the service by using either the « service » command or the « rcpure-ftpd » as shown in Figure 1.1.

linux-1reo:~ # /sbin/service pure-ftpd start
Starting pure-ftpd                                              done
On a side note, whenever you make changes to the Pure-FTP daemon you are require to restart the daemon for the changes to take effect.

Lire la suite…

Categories: Logiciel Tags:

Allow A Normal User To Run Commands As root Under Linux / UNIX Operating Systems

27/04/2024 Categories: Système Tags: , , Aucun commentaire

Source: nixCRAFT

You need to use the sudo command which is use to execute a command as another user. It allows a permitted user to execute a command as the superuser or another user, as specified in the /etc/sudoers (config file that defines or list of who can run what) file. The sudo command allows users to do tasks on a Linux system as another user.

sudo command

sudo is more more secure than su command. By default it logs sudo usage, command and arguments in /var/log/secure (Red Hat/Fedora / CentOS Linux) or /var/log/auth.log (Ubuntu / Debian Linux).

If the invoking user is root or if the target user is the same as the invoking user, no password is required. Otherwise, sudo requires that users authenticate themselves with a password by default. Once a user has been authenticated, a timestamp is updated and the user may then use sudo without a password for a short period of time (15 minutes unless overridden in sudoers).

/etc/sudoers Syntax

Following is general syntax used by /etc/sudoers file:

USER HOSTNAME=COMMAND

Where,

  • USER: Name of normal user
  • HOSTNAME: Where command is allowed to run. It is the hostname of the system where this rule applies. sudo is designed so you can use one sudoers file on all of your systems. This space allows you to set per-host rules.
  • COMMAND: A simple filename allows the user to run the command with any arguments he/she wishes. However, you may also specify command line arguments (including wildcards). Alternately, you can specify «  » to indicate that the command may only be run without command line arguments.

Lire la suite…

Categories: Système Tags: , ,

mysqldump: Copy Database Using Shell Pipes

26/04/2024 Categories: Bases de données Tags: , Aucun commentaire

Source: nixCraft

How do I use mysqldump command with Unix shell pipes?

The mysqldump client is a backup program which is used to dump a database or a collection of databases for backup or transfer to another SQL server (not necessarily a MySQL server). The dump typically contains SQL statements to create the table, populate it, or both. However, mysqldump can also be used to generate files in CSV, other delimited text, or XML format. The syntax is as follows to dump a database called foo to the remote server called server1.cyberciti.biz:

mysqldump db-name | mysql -h server1.dbsysnet.com db-name
mysqldump foo | mysql -h server1.dbsysnet.com foo

However, I recommend using VPN or ssh client to secure data transfer using the shell pipes as follows:

mysqldump db-name | ssh user@server1.dbsysnet.com mysql db-name
mysqldump -u vivek -p'myPassWord' foo | ssh vivek@server1.dbsysnet.com mysql -u backup -p'myPassword' bar

 

Categories: Bases de données Tags: ,

Check The Number Of MySQL Open Database Connections on Linux Or Unix-like Server

26/04/2024 Categories: Bases de données Tags: , , Aucun commentaire

Source: nixCraft

I‘m a new MySQL server user. My server is running on a CentOS Linux. How can I check the number of active MySQL connections on Linux based system?

You can use the following commands on Linux or Unix-like systems:

  • mysqladmin status command
  • MySQL show status command
  • netstat or ss commands

mysqladmin status command example

Open the terminal App or login to the remote server using ssh:

ssh mandrake@dbsysnet.com

Type the following command to get a short status message from the MySQL server:

mysqladmin status
## OR ##
mysqladmin status -u root -p
## OR ##
mysqladmin status -h db1.dbsysnet.com -u root -p

Sample outputs:

Uptime: 691356  Threads: 5  Questions: 83237956  Slow queries: 102736  Opens: 3585  Flush tables: 1  Open tables: 1019  Queries per second avg: 120.398

MySQL show status command to see open database connections example

First, connect to the your mysql server:

mysql -u root -p

Type the following sql query to see the number of connection attempts to the MySQL serverincludes both failed and successful connection attempts:

mysql> show status like 'Conn%';

Sample outputs:

show-status-like-Conn
You can use the following sql command to see the number of currently open connections at mysql> prompt:

mysql> show status like '%onn%';
+--------------------------+---------+
| Variable_name            | Value   |
+--------------------------+---------+
| Aborted_connects         | 7       |
| Connections              | 6304067 |
| Max_used_connections     | 85      |
| Ssl_client_connects      | 0       |
| Ssl_connect_renegotiates | 0       |
| Ssl_finished_connects    | 0       |
| Threads_connected        | 7       | <---- No of currently open connections
+--------------------------+---------+
7 rows in set (0.00 sec)

Lire la suite…

Categories: Bases de données Tags: , ,