Some one use Linux?

Talk about and discuss various advancements and achievents in the arts and sciences of invention and modification; computers, sciences, mathematics, and technology for all.
User avatar
shellvpower
Posts: 326
Joined: Sun Nov 27, 2005 10:52 pm
Location: Between sunny's legs

Some one use Linux?

#1

Post by shellvpower »

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
Master of Sex Lol
(It's so clear that I don't have a damn idea about a sig)

BBcode:
Hide post links
Show post links
emanon
Posts: 2122
Joined: Wed Feb 16, 2005 3:46 pm

#2

Post by emanon »

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

BBcode:
Hide post links
Show post links
WAY
Site Admin
Posts: 2411
Joined: Sat Nov 06, 2004 4:43 am
Location: Sydney, Australia
Contact:

#3

Post by WAY »

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

BBcode:
Hide post links
Show post links
User avatar
shellvpower
Posts: 326
Joined: Sun Nov 27, 2005 10:52 pm
Location: Between sunny's legs

#4

Post by shellvpower »

THANKSSSSSSSSS

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)

BBcode:
Hide post links
Show post links
User avatar
shellvpower
Posts: 326
Joined: Sun Nov 27, 2005 10:52 pm
Location: Between sunny's legs

#5

Post by shellvpower »

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
Master of Sex Lol
(It's so clear that I don't have a damn idea about a sig)

BBcode:
Hide post links
Show post links
WAY
Site Admin
Posts: 2411
Joined: Sat Nov 06, 2004 4:43 am
Location: Sydney, Australia
Contact:

#6

Post by WAY »

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" />)

BBcode:
Hide post links
Show post links
User avatar
shellvpower
Posts: 326
Joined: Sun Nov 27, 2005 10:52 pm
Location: Between sunny's legs

#7

Post by shellvpower »

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
Master of Sex Lol
(It's so clear that I don't have a damn idea about a sig)

BBcode:
Hide post links
Show post links
WAY
Site Admin
Posts: 2411
Joined: Sat Nov 06, 2004 4:43 am
Location: Sydney, Australia
Contact:

#8

Post by WAY »

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.

BBcode:
Hide post links
Show post links
User avatar
shellvpower
Posts: 326
Joined: Sun Nov 27, 2005 10:52 pm
Location: Between sunny's legs

#9

Post by shellvpower »

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
Master of Sex Lol
(It's so clear that I don't have a damn idea about a sig)

BBcode:
Hide post links
Show post links
WAY
Site Admin
Posts: 2411
Joined: Sat Nov 06, 2004 4:43 am
Location: Sydney, Australia
Contact:

#10

Post by WAY »

Hmmm..

So, you've extracted the eDonkey Linux download into your home diretory, and your username is 'user'..?

BBcode:
Hide post links
Show post links
Post Reply