Thứ Hai, 2 tháng 2, 2015

Fix Fn Key not working on Toshiba Laptop

1) Edit /etc/default/grub and change this variable:
GRUB_CMDLINE_LINUX="pcie_aspm=force acpi_osi=Linux acpi_backlight=legacy"
2) Edit /etc/modprobe.d/blacklist.conf and add this line at the end of the file:
blacklist toshiba_acpi
3) Update the grub config file:
sudo update-grub

4.) Reboot.


Source:  

Chủ Nhật, 26 tháng 10, 2014

Reinstall / Recover GRUB from Ubuntu live CD / USB

This is the common problem which is faced, when you try for dual boot. Easily Recover / Re-Install Grub in Ubuntu using Boot-Repair from live cd / usb. Boot Repair is the simple graphical tool used to repair, restore or reinstall the grub bootloader on Ubuntu. Now this tools has been updated with some new features in advanced option, using boot- repair you can also restore the MBR on Windows.
On dual boot once you update your Ubuntu OS, Windows / Fedora will not be listed on your grub. After installing Windows / Fedora your Ubuntu will not boot anymore and its grub may be wiped out. To restore it follow the steps below

To Reinstall Grub

You need to have Ubuntu Live CD or Live USB. Normal session can be used to repair the grub. Boot using your Ubuntu Live CD or Live USB, while booting choose Try Ubuntu.
Once booted then open a terminal, and run the following command one by one to install the boot repair.
To add boot-repair to the repository
sudo add-apt-repository ppa:yannubuntu/boot-repair
To Update your repository
sudo apt-get update
To install boot-repair
sudo apt-get install -y boot-repair
Once Installation complete run boot-repair on terminal by typing the following command or select it by System->Aministration->Boot Repair.
boot-repair
NOTE: Update the Boot Repair if its newer version is available.
It will scan the System for few seconds and will show you the options Recommended repair and Create a BootInfo summary. By clicking the Recommended Repair it will start repair the grub. Check the screen shots below.
Once done click ok and restart your system, your grub should work now. If not run the boot-repair again using live cd / usb. Then follow the steps below.
Select the Advanced options, In Main options tab check whether the following options are selected or not. If not select it, the options are Reinstall Grub and unhide boot menu for 10 seconds. Check the screen shot below
Then select the GRUB locations tab and check the following options are selected or not. The options are OS to boot by default and place grub into, In “OS to boot by default” option choose the OS which you want to be default on boot. Then select the drive where you need to reinstall the grub in “place grub into” option and click apply. Check the screen shots below
Click ok and restart your System. To restore MBR Click Here.
Hope this will be helpful for you!!!


Source:  http://www.howopensource.com/2012/05/reinstall-recover-grub-from-ubuntu-12-04-live-cd-usb/

Fix FN Key not working in Ubuntu for Laptop Toshiba

1) Edit /etc/default/grub and change this variable:
GRUB_CMDLINE_LINUX="pcie_aspm=force acpi_osi=Linux acpi_backlight=legacy"
2) Edit /etc/modprobe.d/blacklist.conf and add this line at the end of the file:
blacklist toshiba_acpi
3) Update the grub config file:
sudo update-grub
4.) Reboot.

Thứ Tư, 13 tháng 8, 2014

ClassicMenu Indicator

Category: Application starter
Provides a simple way to get a classic GNOME-style application menu for those who prefer this over the Unity dash menu. Like the classic GNOME menu, it includes Wine games and applications if you have those installed.
enter image description here
Get the most recent version from its web page (PPA available for Ubuntu 11.04, 11.10 and 12.04).


Source:  http://askubuntu.com/

Weather Indicator

Category: Weather Forecasting
Warning. This indicator is not being updated anymore and will probably not work in current versions of Ubuntu.
UPDATE ! Development continues! https://launchpad.net/weather-indicator/+announcement/11516
Displays the current/extended weather, multiple locations and notifications support.
Weather Indicator
indicator-weatherInstall indicator-weather in Ubuntu Software Centre
or project's PPA: ppa:weather-indicator-team/ppa
Please note! The latest builds of Weather Indicator require updated versions of pywapi, Python Weather API: ppa:pywapi-devel/ppa


Source:  http://askubuntu.com/

System Load Indicator

Category: System Information
Network, memory and cpu usage indicator; this is a port of the original System Monitor GNOME Panel applet (gnome-system-monitor applet).
enter image description here
In Preferences you can customize the output to fit it to your desktop theme:
preferences dialog

To install:

You can install it through the Ubuntu Software Centre by clicking this button:
Install via the software center
or through the command line:
sudo apt-get install indicator-multiload
If you want the latest updates, you can install it from the PPA with these commands:
sudo add-apt-repository ppa:indicator-multiload/stable-daily
sudo apt-get update
sudo apt-get install indicator-multiload


Source:  http://askubuntu.com/

StackApplet

Category: Other
StackApplet is a GNOME panel applet that monitors your activity on any StackExchange site.
stackapplet
stackapplet Install stackapplet in Ubuntu Software Center

Update:

As indicated in comments, the version of StackApplet in the Ubuntu Software Center is old and broken. To install it, use instead this ppa.
The first time the application is used, run
python /usr/share/stackapplet/stackapplet.py &
from a terminal.

For Ubuntu 14.04:

1.5.1 is available on universe repositories
So after enabling universe repositories, It can be installed by following command:
sudo apt-get update
sudo apt-get install stackapplet
But it has bug with adding account so upgrade to 1.5.2 as follows:
sudo add-apt-repository ppa:stackapplet-dev/stackapplet
sudo apt-get update
sudo apt-get install stackapplet


Source: http://askubuntu.com/ 

Hardware Sensors Indicator

Category: System Information

Application Indicator showing hardware sensors.
sensors
First add the repository:
sudo apt-add-repository ppa:alexmurray/indicator-sensors 
Update:
sudo apt-get update  
And then install the package:
sudo apt-get install indicator-sensors
Then launch Hardware Sensors Indicator from Unity or run indicator-sensors from a terminal.




Source:  http://askubuntu.com/

Thứ Hai, 4 tháng 8, 2014

OpenSSH Server


Introduction

This section of the Ubuntu Server Guide introduces a powerful collection of tools for the remote control of networked computers and transfer of data between networked computers, called OpenSSH. You will also learn about some of the configuration settings possible with the OpenSSH server application and how to change them on your Ubuntu system.
OpenSSH is a freely available version of the Secure Shell (SSH) protocol family of tools for remotely controlling a computer or transferring files between computers. Traditional tools used to accomplish these functions, such as telnet or rcp, are insecure and transmit the user's password in cleartext when used. OpenSSH provides a server daemon and client tools to facilitate secure, encrypted remote control and file transfer operations, effectively replacing the legacy tools.
The OpenSSH server component, sshd, listens continuously for client connections from any of the client tools. When a connection request occurs, sshd sets up the correct connection depending on the type of client tool connecting. For example, if the remote computer is connecting with the ssh client application, the OpenSSH server sets up a remote control session after authentication. If a remote user connects to an OpenSSH server with scp, the OpenSSH server daemon initiates a secure copy of files between the server and client after authentication. OpenSSH can use many authentication methods, including plain password, public key, and Kerberos tickets.

Installation

Installation of the OpenSSH client and server applications is simple. To install the OpenSSH client applications on your Ubuntu system, use this command at a terminal prompt:
sudo apt-get install openssh-client
To install the OpenSSH server application, and related support files, use this command at a terminal prompt:
sudo apt-get install openssh-server
The openssh-server package can also be selected to install during the Server Edition installation process.

Configuration

You may configure the default behavior of the OpenSSH server application, sshd, by editing the file /etc/ssh/sshd_config. For information about the configuration directives used in this file, you may view the appropriate manual page with the following command, issued at a terminal prompt:
man sshd_config
There are many directives in the sshd configuration file controlling such things as communication settings and authentication modes. The following are examples of configuration directives that can be changed by editing the /etc/ssh/sshd_config file.
[Tip]
Prior to editing the configuration file, you should make a copy of the original file and protect it from writing so you will have the original settings as a reference and to reuse as necessary.
Copy the /etc/ssh/sshd_config file and protect it from writing with the following commands, issued at a terminal prompt:
sudo cp /etc/ssh/sshd_config /etc/ssh/sshd_config.original
sudo chmod a-w /etc/ssh/sshd_config.original
The following are examples of configuration directives you may change:
  • To set your OpenSSH to listen on TCP port 2222 instead of the default TCP port 22, change the Port directive as such:
    Port 2222
  • To have sshd allow public key-based login credentials, simply add or modify the line:
    PubkeyAuthentication yes
    In the /etc/ssh/sshd_config file, or if already present, ensure the line is not commented out.
  • To make your OpenSSH server display the contents of the /etc/issue.net file as a pre-login banner, simply add or modify the line:
    Banner /etc/issue.net
    In the /etc/ssh/sshd_config file.
After making changes to the /etc/ssh/sshd_config file, save the file, and restart the sshd server application to effect the changes using the following command at a terminal prompt:
sudo /etc/init.d/ssh restart
[Warning]
Many other configuration directives for sshd are available for changing the server application's behavior to fit your needs. Be advised, however, if your only method of access to a server is ssh, and you make a mistake in configuring sshd via the /etc/ssh/sshd_config file, you may find you are locked out of the server upon restarting it, or that the sshd server refuses to start due to an incorrect configuration directive, so be extra careful when editing this file on a remote server.

SSH Keys

SSH keys allow authentication between two hosts without the need of a password. SSH key authentication uses two keys aprivate key and a public key.
To generate the keys, from a terminal prompt enter:
ssh-keygen -t dsa
This will generate the keys using a DSA authentication identity of the user. During the process you will be prompted for a password. Simply hit Enter when prompted to create the key.
By default the public key is saved in the file ~/.ssh/id_dsa.pub, while ~/.ssh/id_dsa is the private key. Now copy theid_dsa.pub file to the remote host and append it to ~/.ssh/authorized_keys by entering:
ssh-copy-id username@remotehost
Finally, double check the permissions on the authorized_keys file, only the authenticated user should have read and write permissions. If the permissions are not correct change them by:
chmod 600 .ssh/authorized_keys
You should now be able to SSH to the host without being prompted for a password.

References



Source: https://help.ubuntu.com/10.04/serverguide/openssh-server.html

Thứ Bảy, 29 tháng 3, 2014

Sử dụng Mod Rewrite trong Apache 2.4.6 trên Ubuntu 13.10

Chúng ta thiết lập trên 2 file:
/etc/apache2/apache2.conf
/etc/apache2/sites-available/000-default.conf
/etc/apache2/sites-enabled/000-default.conf chuyển sang /etc/apache2/sites-available/000-default.conf
Sửa apache2.conf và thêm
<Directory /home/my_site/public_html/>
    #YOUR SETTINGS
</Directory>
Sửa sites-available/000-default.conf và thay thế <VirtualHost *:80> thành <VirtualHost localhost:80>
Thêm vào file sites-available/000-default.conf nội dung sau
<VirtualHost mysite.localhost:80> 
    ServerName mysite.localhost

    ServerAdmin webmaster@mysite.localhost

    DocumentRoot /home/my_new_site_public_html

    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
Sửa /etc/hosts/ 
 IP của mysite.localhost từ127.0.1.1 thành 127.0.0.1
Truy cập http://mysite.localhost & http://localhost/


Source: http://stackoverflow.com/