Screenshot from 2015-09-28 17:41:53

Creating localhost in Linux systems is very easy, you can install apache2, php, mysql separately and then integrate them or you can use ready packages for this(such as LAMP).

What if you have already one localhost under 127.0.0.1 IP and you want to create second one? In this case you don’t need to install additional software. You just need to dublicate some files and configure them. Let’s get started how to do it. Continue reading →

create-wifi-hotspot (1)

In 14.04 and 14.10 versions there is such problem in some devices. The solution can be different. But in 99% cases the problem appears due to one of these two reasons: wpa_suplicant bug, wifi sleep bug. Let’s go: 1. Try to restart network manager via terminal:

sudo restart network-manager

If it helps and after this command wifi started working, then add this command to autorun file. Run this command: Continue reading →

In latest 11.10 Ubuntu there is a bug about system printscreen feature. When you click on it, it is generated black blank screen. I found kind alternative app for this feature. It is called Shutter. Let’s install it. Open your terminal(by default it can be opened by alt+ctrl+T)

apt-get install shutter

Then let’s create shortkey for it. 1. Open System Settings->Keyboard->Shortcuts->Custom shortcuts. Click + button. 2. Then small window with 2 fields will appear. Type any name for Name: field, type shutter for command field. Click to enter. 3. Then in custom shortcut list you will see your given name to shutter. In right side there is New shortcut. Click on it then press to alt+prtscr on your keyboard. Then click to OK. That’s all. For printing any screen just press alt+prtscr.

Today i decided to install Python in Ubuntu OS and to use PHP and Python both together. If i hadn’t installed php and wanted to have python as only localhost in my OS, so it was easy, there are plenty of examples which show how to do it(for example). But if you have already installed php and you want to have python, then let’s go on. In this sample we will need two different ports if we want to do so. And i could easily install and test it. So i am sharing how i did it:

You have installed apache2-php in your Ubuntu(or other Linux based OS) and you want to install python for having python localhost. If python has not installed in your OS, do it. Let’s open Terminal:

sudo apt-get install python

Now you have python installed. Now we need apache mod for python. Let’s install it :

sudo apt-get install libapache2-mod-python

Then we must make some apache operations in terminal:

cd /etc/apache2/sites-available/ sudo gedit default

(default is the name of default apache conf file. )

You must see <virtualhost:*.80> …. </virtualhost> there.

Copy all block and paste it at the bottom. Then you will have two <virtualhost:*.80> …. </virtualhost> blockes. Then find in pasted block(second one) this:

Options Indexes FollowSymLinks MultiViews AllowOverride AuthConfig Order allow,deny allow from all

Add these lines to new line after “allow from all” :

AddHandler mod_python .py PythonHandler mod_python.publisher PythonDebug On

Then go to first line of pasted part and edit

<virtualhost:*.80>

to

Listen 81 <virtualhost:*.81>

Save and close the file. Restart apache:

sudo /etc/init.d/apache2 restart

It is ready. Both PHP and Python work together in your OS. PHP has 80, Python has 81 port.

PHP – http://127.0.0.1 or http://127.0.0.1:80

Python – http://127.0.0.1:81

You can test python with simple test file which contains these 2 strings:

def index(req): return "Python works!";

In default apache virtualhost root localhost folder is /var/www. It is better to use different folders for Php and Python. For clear undersanding i am sharing my apache default conf file:

<virtualhost:*.80> ServerAdmin webmaster@localhost DocumentRoot /home/user/public_html/ Options FollowSymLinks AllowOverride All Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny allow from all ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ AllowOverride None Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch Order allow,deny Allow from all ErrorLog /var/log/apache2/error.log # Possible values include: debug, info, notice, warn, error, crit, # alert, emerg. LogLevel warn CustomLog /var/log/apache2/access.log combined Alias /doc/ "/usr/share/doc/" Options Indexes MultiViews FollowSymLinks AllowOverride None Order deny,allow Deny from all Allow from 127.0.0.0/255.0.0.0 ::1/128 </virtualhost> Listen 81 <virtualhost:*.81> ServerAdmin webmaster@localhost DocumentRoot /var/www/ Options FollowSymLinks AllowOverride All Options Indexes FollowSymLinks MultiViews AllowOverride AuthConfig Order allow,deny allow from all AddHandler mod_python .py PythonHandler mod_python.publisher PythonDebug On # Uncomment this directive is you want to see apache2′s # default start page (in /apache2-eh) when you go to / #RedirectMatch ^/$ /apache2-eh/ ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ AllowOverride None Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch Order allow,deny Allow from all ErrorLog /var/log/apache2/error.log # Possible values include: debug, info, notice, warn, error, crit, # alert, emerg. LogLevel warn CustomLog /var/log/apache2/access.log combined Alias /doc/ "/usr/share/doc/" Options Indexes MultiViews FollowSymLinks AllowOverride None Order deny,allow Deny from all Allow from 127.0.0.0/255.0.0.0 ::1/128 </virtualhost>

You can see from last sample that i use /home/user/public_html folder for PHP, and /var/www folder for Python.

That’s all. If any question, you can add it to comments.

ffmpeg app helps us to convert videos through terminal in Ubuntu. It contains multimedia player, streaming server and audio&video converter. But in this post we are interested just about video converting.

Installing ffmpeg is ordinary:

sudo apt-get install ffmpeg

So, let’s write simple example: You have some big-sized mpg video, and we must convert it to flv. Open terminal and type this:

ffmpeg -i video.mpg  -ab 56 -ar 22050 -s 320×240 video.flv

After it we get video.flv. Resized and in flv type.

Let’s describe what command parameters mean:

-ab: bit rate of audio;

-ar: Rate(Hz);

-s – result file dimension;

That’s all. Good luck.

Few days ago Skype stopped working normally in my laptop. Each time after starting the window opened, then signing in… then crash. It was not solven even after remove-install. I investigated the problem and quickly found a simple solution. And this simple solution is also available for other OS-es. So if your Skype craches during signing process, you can solve it easily with removing shared.xml file. Location of shared.xml: Ubuntu: ~/.Skype folder. Windows XP: C:\Documents and Settings\_username_\Application Data\Skype folder Mac OS: ~/Library/Application\ Support/Skype/ folder Windows 7: C:\Users\_username_\AppData\Roaming\Skype folder

That’s all. Good luck.

Question: Skype has been disappeared from GNOME top panel. So after closing it, it stays running, but invisible. Reopening it from application menu gives crash, because it is running. Answer: It has very simple solution. Look at top panel, there must be a little gray icon of Notification area. If it exists, remove it from panel, thenr restore it with right click->add to panel->Notification area. If it doesn’t exist, then do same thing, add it to panel. Then quit from Skype, and then reopen. Everything must be ok.