Some one use Linux?
- shellvpower
- Posts: 326
- Joined: Sun Nov 27, 2005 10:52 pm
- Location: Between sunny's legs
Some one use Linux?
I have two PC, one with windows and the other with linux....
I'm not a linux expert but I can use it a bit...
But...
I'd like to create shortcut to desktop for a file that I have to executo through the command line...
Example:
CODE
cd /home/user/folder *I press Enter key*
./program.sh *Press enter key and the program starts*
I'd like that I can go in the terminal and write only the word "program" and than the program starts....like I do for mozilla for example...
Thanks in advance
I'm not a linux expert but I can use it a bit...
But...
I'd like to create shortcut to desktop for a file that I have to executo through the command line...
Example:
CODE
cd /home/user/folder *I press Enter key*
./program.sh *Press enter key and the program starts*
I'd like that I can go in the terminal and write only the word "program" and than the program starts....like I do for mozilla for example...
Thanks in advance
Master of Sex Lol
(It's so clear that I don't have a damn idea about a sig)
(It's so clear that I don't have a damn idea about a sig)
BBcode: | |
Hide post links |
-
- Posts: 2122
- Joined: Wed Feb 16, 2005 3:46 pm
who.am.i is the inhouse linux d00d
I have a second pc that has linux on it that I tinker with...so I know a little.
can you right click on the desktop and choose New-> shortcut to application, then enter the path to your shell script. for the properties of the shortcut there should be an option for "run in terminal"
at least there is in the distro I am using (Vector Linux SOHO 5.1) with KDE environment
I have a second pc that has linux on it that I tinker with...so I know a little.
can you right click on the desktop and choose New-> shortcut to application, then enter the path to your shell script. for the properties of the shortcut there should be an option for "run in terminal"
at least there is in the distro I am using (Vector Linux SOHO 5.1) with KDE environment
BBcode: | |
Hide post links |
-
- Site Admin
- Posts: 2411
- Joined: Sat Nov 06, 2004 4:43 am
- Location: Sydney, Australia
- Contact:
Wait, so do you want a shortcut on
a) your desktop like you have for Home, CD Drive
/cool.gif" style="vertical-align:middle" emoid="B)" border="0" alt="cool.gif" /> your panel bar where you have your web browser, email app, and 'start' menu
or
c) a 'shortcut' in a terminal so that when you type the command, it will launch the program..?
a) and /cool.gif" style="vertical-align:middle" emoid="B)" border="0" alt="cool.gif" /> can be accomplished by right-clicking and selecting create new -> shortcut
c) can be accomplished by opening Terminal and typing:
(replace <shortcutname> with the command you wish to type to execute the commands)
CODEcd /usr/bin
gedit <shortcutname>
Now type in the window that appears:
CODE#!/bin/bash
# Here are the commands I wish to run (replace with your own):
cp /home/whoami /usr/backups -R
Save and close.
You should now be able to type <shortcut name> at any time in a Terminal session.
You can add a custom path to your system PATH variable instead, and place the bash script there.
-tech,
who.am.i
a) your desktop like you have for Home, CD Drive
/cool.gif" style="vertical-align:middle" emoid="B)" border="0" alt="cool.gif" /> your panel bar where you have your web browser, email app, and 'start' menu
or
c) a 'shortcut' in a terminal so that when you type the command, it will launch the program..?
a) and /cool.gif" style="vertical-align:middle" emoid="B)" border="0" alt="cool.gif" /> can be accomplished by right-clicking and selecting create new -> shortcut
c) can be accomplished by opening Terminal and typing:
(replace <shortcutname> with the command you wish to type to execute the commands)
CODEcd /usr/bin
gedit <shortcutname>
Now type in the window that appears:
CODE#!/bin/bash
# Here are the commands I wish to run (replace with your own):
cp /home/whoami /usr/backups -R
Save and close.
You should now be able to type <shortcut name> at any time in a Terminal session.
You can add a custom path to your system PATH variable instead, and place the bash script there.
-tech,
who.am.i
BBcode: | |
Hide post links |
- shellvpower
- Posts: 326
- Joined: Sun Nov 27, 2005 10:52 pm
- Location: Between sunny's legs
THANKSSSSSSSSS
GRAZIE
Finally someone that tell me exactly how do that.....I was interest in in c) option...
GRAZIE
Finally someone that tell me exactly how do that.....I was interest in in c) option...
Master of Sex Lol
(It's so clear that I don't have a damn idea about a sig)
(It's so clear that I don't have a damn idea about a sig)
BBcode: | |
Hide post links |
- shellvpower
- Posts: 326
- Joined: Sun Nov 27, 2005 10:52 pm
- Location: Between sunny's legs
emh....little problem....
here's whai I did:
cd /usr/bin/
sudo gedit edonkey
then in gedit I've done this:
#!/bin/bash
/home/<user>/eDonkey2000/
./rundonkey.sh
when I try to execute
edonkey in the terminal or I have a message that I don't have the right permission...if I try sudo edonkey say another error that I don't remember now....
PS
I use ubuntu
here's whai I did:
cd /usr/bin/
sudo gedit edonkey
then in gedit I've done this:
#!/bin/bash
/home/<user>/eDonkey2000/
./rundonkey.sh
when I try to execute
edonkey in the terminal or I have a message that I don't have the right permission...if I try sudo edonkey say another error that I don't remember now....
PS
I use ubuntu
Master of Sex Lol
(It's so clear that I don't have a damn idea about a sig)
(It's so clear that I don't have a damn idea about a sig)
BBcode: | |
Hide post links |
-
- Site Admin
- Posts: 2411
- Joined: Sat Nov 06, 2004 4:43 am
- Location: Sydney, Australia
- Contact:
You'll need to set the permissions on rundonkey.sh
Use the following commands (as su or by using sudo) - replace <username> with your current username:
CODEcd /usr/bin
sudo chown <username> edonkey
and, to fix something I forgot to include in my original post, type (you shouldn't need su/sudo anymore) in the same window:
CODEchmod +x edonkey
which makes the script executable!
Have fun!
-tech,
who.am.i
(oh, and I use Ubuntu when I can too, lol /:D" style="vertical-align:middle" emoid=":D" border="0" alt=":D" />)
Use the following commands (as su or by using sudo) - replace <username> with your current username:
CODEcd /usr/bin
sudo chown <username> edonkey
and, to fix something I forgot to include in my original post, type (you shouldn't need su/sudo anymore) in the same window:
CODEchmod +x edonkey
which makes the script executable!
Have fun!
-tech,
who.am.i
(oh, and I use Ubuntu when I can too, lol /:D" style="vertical-align:middle" emoid=":D" border="0" alt=":D" />)
BBcode: | |
Hide post links |
- shellvpower
- Posts: 326
- Joined: Sun Nov 27, 2005 10:52 pm
- Location: Between sunny's legs
Nothing to do...I've done exactly what you've write...but I have this error:
CODE
/usr/bin/edonkey: line 3: /home/user/eDonkey2000/: is a directory
/usr/bin/edonkey: line 4: ./runDonkey.sh: No such file or directory
I don't understand....all the path are right! mmm
the scrip I've crated is:
CODE
#!/bin/bash
/home/user/eDonkey2000/
./runDonkey.sh
CODE
/usr/bin/edonkey: line 3: /home/user/eDonkey2000/: is a directory
/usr/bin/edonkey: line 4: ./runDonkey.sh: No such file or directory
I don't understand....all the path are right! mmm
the scrip I've crated is:
CODE
#!/bin/bash
/home/user/eDonkey2000/
./runDonkey.sh
Master of Sex Lol
(It's so clear that I don't have a damn idea about a sig)
(It's so clear that I don't have a damn idea about a sig)
BBcode: | |
Hide post links |
-
- Site Admin
- Posts: 2411
- Joined: Sat Nov 06, 2004 4:43 am
- Location: Sydney, Australia
- Contact:
change your script to
CODE#!/bin/bash
# Starts eDonkey2000 via runDonkey.sh script
./home/user/eDonkey2000/runDonkey.sh
That should run correctly.
If you need to open the file to edit, type
CODEsudo gedit /usr/bin/edonkey
in a console terminal.
CODE#!/bin/bash
# Starts eDonkey2000 via runDonkey.sh script
./home/user/eDonkey2000/runDonkey.sh
That should run correctly.
If you need to open the file to edit, type
CODEsudo gedit /usr/bin/edonkey
in a console terminal.
BBcode: | |
Hide post links |
- shellvpower
- Posts: 326
- Joined: Sun Nov 27, 2005 10:52 pm
- Location: Between sunny's legs
I've done what you write....
but I have the same error....
./home/user/eDonkey2000/runDonkey.sh no such file or directory...
and the path is right.....
thanks anyway
but I have the same error....
./home/user/eDonkey2000/runDonkey.sh no such file or directory...
and the path is right.....
thanks anyway
Master of Sex Lol
(It's so clear that I don't have a damn idea about a sig)
(It's so clear that I don't have a damn idea about a sig)
BBcode: | |
Hide post links |
-
- Site Admin
- Posts: 2411
- Joined: Sat Nov 06, 2004 4:43 am
- Location: Sydney, Australia
- Contact:
Hmmm..
So, you've extracted the eDonkey Linux download into your home diretory, and your username is 'user'..?
So, you've extracted the eDonkey Linux download into your home diretory, and your username is 'user'..?
BBcode: | |
Hide post links |