Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How do i make a bash (I think) script?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo Chat
View previous topic :: View next topic  
Author Message
newtman12
n00b
n00b


Joined: 10 Apr 2004
Posts: 27

PostPosted: Sun Jun 06, 2004 2:24 am    Post subject: How do i make a bash (I think) script? Reply with quote

Im not really a n00btard but I've just never had to write one. I want to write a script that starts ksmoothdock at KDE startup. I tried making a ~.kde/Autostart/ksmoothdock text file with
Code:
ksmoothdock
in it but it didn't work. Any help or a link to a guide would be appreciated.
Back to top
View user's profile Send private message
PowerFactor
Veteran
Veteran


Joined: 30 Jan 2003
Posts: 1693
Location: out of it

PostPosted: Sun Jun 06, 2004 2:33 am    Post subject: Reply with quote

I believe what you need is a .desktop file not a shell script. Just create a launcher for the app on your desktop and move it to the autostart folder.
Back to top
View user's profile Send private message
newtman12
n00b
n00b


Joined: 10 Apr 2004
Posts: 27

PostPosted: Sun Jun 06, 2004 4:26 am    Post subject: Reply with quote

thanks that worked
Back to top
View user's profile Send private message
Ateo
Advocate
Advocate


Joined: 02 Jun 2003
Posts: 2021
Location: Republic of California

PostPosted: Fri Jul 30, 2004 9:20 pm    Post subject: Reply with quote

PowerFactor wrote:
I believe what you need is a .desktop file not a shell script. Just create a launcher for the app on your desktop and move it to the autostart folder.


Either will work.
Back to top
View user's profile Send private message
Maedhros
Bodhisattva
Bodhisattva


Joined: 14 Apr 2004
Posts: 5511
Location: Durham, UK

PostPosted: Fri Jul 30, 2004 9:23 pm    Post subject: Reply with quote

I think the text file would have to have executable permissions though...
_________________
No-one's more important than the earthworm.
Back to top
View user's profile Send private message
blue.sca
l33t
l33t


Joined: 28 Aug 2003
Posts: 680
Location: Mainz, Germany

PostPosted: Fri Jul 30, 2004 9:37 pm    Post subject: Reply with quote

in general, add at first line
Code:
#!/bin/sh
to your file and make it executable
Code:
chmod +x file
, then you can add misc commands to this file...
_________________
geek by nature, linux by choice
i want my avatar back... thank you
:wq
Back to top
View user's profile Send private message
thechris
Veteran
Veteran


Joined: 12 Oct 2003
Posts: 1203

PostPosted: Sat Jul 31, 2004 7:08 am    Post subject: Reply with quote

see the guides at tldp.org . they have a basic and advanced scripting listed there.
Back to top
View user's profile Send private message
PowerFactor
Veteran
Veteran


Joined: 30 Jan 2003
Posts: 1693
Location: out of it

PostPosted: Sat Jul 31, 2004 7:23 am    Post subject: Reply with quote

Ateo wrote:
PowerFactor wrote:
I believe what you need is a .desktop file not a shell script. Just create a launcher for the app on your desktop and move it to the autostart folder.


Either will work.

Cool, I didn't know that. Score one more for kde. :P
Back to top
View user's profile Send private message
Beau
n00b
n00b


Joined: 23 Aug 2003
Posts: 41
Location: Hasselt/Leuven, Belgium

PostPosted: Sat Aug 07, 2004 5:40 pm    Post subject: Reply with quote

Hi,

I placed the following script in the kde3.2 autostartfolder
Code:


#! /bin/sh

xmodmap -e "pointer = 1 2 3 6 7 4 5"
karamba /usr/share/karamba/themes/ubermon.theme
kooldock



xmodmap and karamba start correct but kooldock doesn't start?!
What's wrong whith the script?

thx,
Beau
Back to top
View user's profile Send private message
Maedhros
Bodhisattva
Bodhisattva


Joined: 14 Apr 2004
Posts: 5511
Location: Durham, UK

PostPosted: Sat Aug 07, 2004 5:46 pm    Post subject: Reply with quote

Try putting an ampersand (&) at the end of the second two lines. The first line just exits as soon as you run it, but the other two don't. Putting & at the end makes them run in the background - so the third doesn't have to wait for the second line to finish. I bet if you close karamba, kooldock will start. :wink:

Try this:
Code:
#! /bin/sh

xmodmap -e "pointer = 1 2 3 6 7 4 5"
karamba /usr/share/karamba/themes/ubermon.theme &
kooldock &

_________________
No-one's more important than the earthworm.
Back to top
View user's profile Send private message
Beau
n00b
n00b


Joined: 23 Aug 2003
Posts: 41
Location: Hasselt/Leuven, Belgium

PostPosted: Sat Aug 07, 2004 6:28 pm    Post subject: Reply with quote

thanks, that fixed it! :)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo Chat All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum