XAMPP in Ubuntu: Desktop Shortcut, Launcher Entry & Home Folder Shortcut Inside HTDOCS

XAMPP is an independent server platform, which consists mainly of the MySQL database (now MariaDB), the Apache web server and interpreters for scripting languages: PHP and Perl. The name comes from the abbreviation of X (for any of the different operating systems), Apache, MySQL, PHP, Perl. The program is released under the GNU license and acts as a free web server, it easy to use and able to interpret dynamic pages. Currently, XAMPP is available for all the major operating system (GNU/Linux Distributions, Microsoft Windows, Solaris, and MacOS X).

 

Here I am discussing some tips after installing the XAMPP in Ubuntu (or any version of GNU/Linux).

XAMPP Desktop Shortcut

Steps
  1. Type the following command in terminal.
    gedit ~/Desktop/xampp-control-panel.desktop
    
  2. In the now opened text editor paste the following lines.
    [Desktop Entry]
    Encoding=UTF-8
    Name=XAMPP Control Panel
    Comment=Start and Stop XAMPP
    Exec=gksudo /opt/lampp/manager-linux-x64.run
    Icon=/opt/lampp/htdocs/favicon.ico
    Categories=Application
    Type=Application
    
  3. Make this desktop shortcut executable.
    chmod +x ~/Desktop/xampp-control-panel.desktop
    

XAMPP Launcher Entry

Steps
  1. Type the following command in terminal.
    sudo gedit /usr/share/applications/xampp-control-panel.desktop
    
  2. In the now opened text editor paste the following lines.
    [Desktop Entry]
    Encoding=UTF-8
    Name=XAMPP Control Panel
    Comment=Start and Stop XAMPP
    Exec=gksudo /opt/lampp/manager-linux-x64.run
    Icon=/opt/lampp/htdocs/favicon.ico
    Categories=Application
    Type=Application
    

Home Folder Shortcut Inside HTDOCS

Steps
  1. Create an arbitrary folder in your home via the following command (for example ‘website’).
    mkdir ~/website
    
  2. Create a link from the htdocs folder to the newly made folder ‘website’.
    sudo ln -s ~/website/ /opt/lampp/htdocs/website
    
  3. Type the following command to create the PHP version file.
    echo "<?php phpinfo(); ?>" > ~/website/index.php
    
  4. Now the folder can be accessed via web browser via pointing to http://localhost/website/
    If this shows your PHP version as shown below, everything is working fine.
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s