I purchased a book "Practical PHP and MySQL" by Jono Bacon --- cool stuff that I would like to get under my belt. Through this book, there's a program called XAMPP that I downloaded and installed.
There's a 'xampp-control-panel' that gets started by running this script...
$ cd /opt/lampp/share/xampp-control-panel
then...
$ sudo ./xampp-control-panel
I would like to be able to start this "control-panel" from the 'Menu'
right click 'Menu' >> "Edit menu' >> Administration >> 'New Item" button >> WHAT DO I PLACE IN THE COMMAND WINDOW?
Thank You
adding a script to the menu - how do I?
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
-
- Level 2
- Posts: 69
- Joined: Mon Aug 20, 2007 11:32 pm
- Location: On the coast of Southern California USA
adding a script to the menu - how do I?
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Re: adding a script to the menu - how do I?
goldstar1,
There a number of ways to go about this depending on what you needs and desires are. I would probably do the below.
Set the file permissions with:
sudo chmod 755 /opt/lampp/share/xampp-control-panel
Copy to /usr/local/bin with:
sudo cp -a /opt/lampp/share/xampp-control-panel /usr/local/bin
Use "xampp-control-panel" without the quotes as the command to start.
Fred
There a number of ways to go about this depending on what you needs and desires are. I would probably do the below.
Set the file permissions with:
sudo chmod 755 /opt/lampp/share/xampp-control-panel
Copy to /usr/local/bin with:
sudo cp -a /opt/lampp/share/xampp-control-panel /usr/local/bin
Use "xampp-control-panel" without the quotes as the command to start.
Fred
-
- Level 2
- Posts: 69
- Joined: Mon Aug 20, 2007 11:32 pm
- Location: On the coast of Southern California USA
Re: adding a script to the menu - how do I?
Thanks for your quick reply.
I did this just now and that didn't work. Nothing happens when I click on the menu item.
Here in California it's like my bed time. I'll continue with this tomarrow.
I did this just now and that didn't work. Nothing happens when I click on the menu item.
Here in California it's like my bed time. I'll continue with this tomarrow.
Re: adding a script to the menu - how do I?
goldstar1,
Try putting it in /usr/bin instead of /usr/local/bin
I don't know what has been done with the paths on the new release.
sudo cp -a /opt/lampp/share/xampp-control-panel /usr/bin
Fred
Try putting it in /usr/bin instead of /usr/local/bin
I don't know what has been done with the paths on the new release.
sudo cp -a /opt/lampp/share/xampp-control-panel /usr/bin
Fred
-
- Level 2
- Posts: 69
- Joined: Mon Aug 20, 2007 11:32 pm
- Location: On the coast of Southern California USA
Re: adding a script to the menu - how do I?
That didn't work either
I tried...
Desktop $ sudo cp -a /opt/lampp/share/xampp-control-panel/xampp-control-panel /usr/local/bin /usr/bin
then from command window
/usr/local/bin and sh /usr/local/bin
then
/usr/bin and sh /usr/bin
then
/usr/local/bin/xampp-control-panel and sh /usr/local/bin/xampp-control-panel
then
both /usr/local/bin and /usr/bin /xampp-control-panel
I got that 'sh' part from an Ubuntu forum from google --- I even tried a script which didn't work
Yes from a console I can type
Desktop $ cd /opt/lampp/share/xampp-control-panel
then...
/opt/lampp/share/xampp-control-panel $ sudo ./xampp-control-panel
and there it is with all its Glory!
I tried...
Desktop $ sudo cp -a /opt/lampp/share/xampp-control-panel/xampp-control-panel /usr/local/bin /usr/bin
then from command window
/usr/local/bin and sh /usr/local/bin
then
/usr/bin and sh /usr/bin
then
/usr/local/bin/xampp-control-panel and sh /usr/local/bin/xampp-control-panel
then
both /usr/local/bin and /usr/bin /xampp-control-panel
I got that 'sh' part from an Ubuntu forum from google --- I even tried a script which didn't work
Yes from a console I can type
Desktop $ cd /opt/lampp/share/xampp-control-panel
then...
/opt/lampp/share/xampp-control-panel $ sudo ./xampp-control-panel
and there it is with all its Glory!
Re: adding a script to the menu - how do I?
goldstar1,
ok... let's start over here. I think I see the problem. Do you have a folder called "xampp-control-panel" and in that folder you have a file called "xampp-control-panel"? If you do, that is where I went wrong.
If that is what you have then open a terminal and:
sudo chmod 755 /opt/lampp/share/xampp-control-panel/xampp-control-panel
Then in a terminal:
sudo cp -a /opt/lampp/share/xampp-control-panel/xampp-control-panel /usr/bin
Now... type in a terminal:
xampp-control-panel
and it should run. That should also be the command to put in the launcher.
Fred
ok... let's start over here. I think I see the problem. Do you have a folder called "xampp-control-panel" and in that folder you have a file called "xampp-control-panel"? If you do, that is where I went wrong.
If that is what you have then open a terminal and:
sudo chmod 755 /opt/lampp/share/xampp-control-panel/xampp-control-panel
Then in a terminal:
sudo cp -a /opt/lampp/share/xampp-control-panel/xampp-control-panel /usr/bin
Now... type in a terminal:
xampp-control-panel
and it should run. That should also be the command to put in the launcher.
Fred
-
- Level 2
- Posts: 69
- Joined: Mon Aug 20, 2007 11:32 pm
- Location: On the coast of Southern California USA
Re: adding a script to the menu - how do I?
The response I get from the console is 'You must be root to launch xampp-control-panel'
The permissions set are 777
The permissions set are 777
-
- Level 2
- Posts: 69
- Joined: Mon Aug 20, 2007 11:32 pm
- Location: On the coast of Southern California USA
<SOLVED> adding a script to the menu - how do I?
Here I finally found my answer and it works
http://ubuntuforums.org/showthread.php?t=223410
Maybe this should be a sticky
anyway..thanks so much for your help Fred...you did lead me on the right direction
http://ubuntuforums.org/showthread.php?t=223410
Maybe this should be a sticky
anyway..thanks so much for your help Fred...you did lead me on the right direction
Re: adding a script to the menu - how do I?
goldstar1,
Just as a matter of information. It is always a bad idea to run a GUI program as root. A well behaved program should run in a user account. Be wary of a program that requires root privileges to operate correctly. This is the kind of thing that causes Windows to be so insecure.
Fred
Just as a matter of information. It is always a bad idea to run a GUI program as root. A well behaved program should run in a user account. Be wary of a program that requires root privileges to operate correctly. This is the kind of thing that causes Windows to be so insecure.
Fred
-
- Level 2
- Posts: 69
- Joined: Mon Aug 20, 2007 11:32 pm
- Location: On the coast of Southern California USA
Re: adding a script to the menu - how do I?
Good point...Excellent point actually...Thank you again!