This is exactly what do you want:
open terminal using ctrl +alt +T
Change the root permission for that folder permanently :
sudo chown -R $LOGNAME /opt/lampp
Now you don't have to give permissions repeatedly for lampp directory.
Move the xampp folder to your desired directory then create a symbolic link to that folder
sudo mv /opt/lampp yourDirectory
sudo ln -s yourDirectory /opt/lampp
Its all done.
But This doesn't seem anything natural to me. You can use the following instruction if you want to keep stick with Xampp. My suggesion is using bitnami lampp you can choose here location of your installation. so in this way you can install lamp in anywhere and doesn't need permissions everytime.
https://bitnami.com/stack/lamp
To make bitnami lamp behave like Xampp do the following changes:
Track every changes instantly:
To disable PageSpeed, uncomment by removing '#' the following lines in your
httpd.conf (installdir/apache2/conf/httpd.conf)
#Include conf/pagespeed.conf
#Include conf/pagespeed_libraries.conf
To disable OPCache, change opcache.enable in your php.ini file and set
it to 0 (installdir/php/etc/php.ini
Do some other changes (such as showing error in php):
open installdir/php/etc/php.ini and change all values to devolopment values
to do this read the comments in that file.
Default phpmyadmin username for bitnami lamp: root