command YES

A funny trick discovered today, to automatic answer “yes” or “no” to a package installation using dpkg that require a human interaction during the installation.

Example:

# yes Y | dpkg -i mypersonalpackage.deb

You can also set yes N to always answer “NO”, or just yes if is allowed the lowercase answer into the installation.

Good installation! 😉

save locat GIT on remote server

There are many guides about git on remote server, remote repo and so on.
Here I just want to describe a simple procedure if you don’t have enough time to correctly setup the remote repo BEFORE cloning on your local pc, but you should fast start to develop and after many commit you can take a breath and think about remote backup of your local work.

First step:
on the remote server:
$ cd ~/myrepo
$ git init
$ git config receive.denyCurrentBranch ignore

and, on you local pc:
$ cd ~/myrepo
$ git remote add master ssh://<user>@<remoteIP>:/home/utente/myrepo.git/
$ git push --set-upstream master master


Then, on you remote server you should see your modified files and your commits on git log command.
If not, on the server side, do a
$ git reset --hard
and you’ll find files and commits.

Good versioning!

Skype multiple account

On the last years, the Skype version for Linux seems unchanged, without features or relevant upgrades (and with many bugs…thank you MS..).
For that, a stable procedure to call a secondary instance of your Skype for Linux program is:

$ skype --secondary &

It launch a secondary session, while the first is running.
If you use the notification icons, you can see the two icons of the two instances, and each instance has the status configuration indipendent from the other.

Enjoy!
😀

Linux installation data

Sometimes, it could be useful to remember the data of installation of your Linux system, even just to be proud of the long years of life of your Linux distribution without big problems.

A simple way to know that date is with the command:

$ sudo dumpe2fs /dev/sda1 | grep 'Filesystem created'

that shows the date of creation of filesystem, in the indicated partition.

If you are not sure about your the root partition, check it using the disk free command:

$ df -h

the root partition is the one mounted on “/“.

Enjoy! 😉

2015 in review

The WordPress.com stats helper monkeys prepared a 2015 annual report for this blog.

Here’s an excerpt:

A San Francisco cable car holds 60 people. This blog was viewed about 3,600 times in 2015. If it were a cable car, it would take about 60 trips to carry that many people.

Click here to see the complete report.

Torrentflux

Torrentflux is a very useful web-application to download torrent on Linux, based on php and Apache webserver.

Pratically, the only interface of this program is a website where the user can easily manage the torrent downloads. It’s very useful because it runs in background without use the GUI and the influence on the system is low. Moreover, the web interface permits to enable the access to the Torrentflux by remote, just setting the right ports forwarding on the home router and using the public IP assigned by the ISP provider on the home connection.

This program runs on apache (PHP webserver) and use the mysql engine.
So, for a debian-based linux the installation steps are:


$ sudo apt-get install mysql-client mysql-server mysql-common

and follow the required database configuration (mainly are required passwords for the database users).


$ sudo apt-get install php5 php5-mysql
$ sudo apt-get install apache2

and then the last step

$ sudo apt-get install torrentflux

After these steps, the Apache2 service need to be restarted

$ sudo service apache2 restart

and the link to the application checked under /var/www/html/.
If is not present, it is necessary to create the link to torrentflux on the webserver

$ sudo ln -s /usr/share/torrentflux/www/ /var/www/html/torrentflux

Finally, the Torrentflux web interface should be running at address
http://localhost/torrentflux/
or
http://127.0.0.1/torrentflux/

Have good downloads!
😀

set-up proxy on linux

Hi everyone!

Here a simple guide to set up a connection via proxy.
If you need to use a proxy to connect to any remote host, you can configure your linux system to use it automatically.
In case of an http proxy, you must write the line below into /etc/environment:

export http_proxy="http://<user>:<pwd>@<host>:<port>"

where “user” is your proxy user, “pwd” is your proxy password, “host” and “port” are the proxy IP and PORT defined to use that proxy connection.

If you need to set other proxy types, you can use the following options:
https_proxy=…,
ftp_proxy=..,
socks_proxy=..
or all_proxy=.. if you use the same proxy options on all proxy servers.

Enjoy! 😉