Where to put a bash script

Forum rules
Before you post please read how to get help

Where to put a bash script

Postby gibbs1984 on Wed Jul 15, 2009 2:18 pm

Hi,

I've had problems with Conky and the latest problem is that when it first starts it overlaps other windows, when restarting Conky it works fine, I believe I've found the fix to the problem, as I understand it, Conky starts too quickly and before Compiz and this is where the problem comes from, so apparently I need to create a startup script for Conky which will delay it starting for a number of seconds and allow Compiz to start.

I've found the code for the script but I've got no idea where to save the file and how to activate it, I'm sure someone here will know :)

Code: Select all
#!/bin/bash
sleep 15 && conky ;


and add this somewhere:

Code: Select all
chmod +x .conky-startup.sh


Am I right and how do I do it?

Steve
Linux Mint 17 (Cinnamon) 32bit.
User avatar
gibbs1984
Level 5
Level 5
 
Posts: 671
Joined: Mon Oct 27, 2008 2:40 pm
Location: Hemel Hempstead, England

Linux Mint is funded by ads and donations.
 

Re: Where to put a bash script

Postby lagagnon on Wed Jul 15, 2009 2:45 pm

Use Menu, Accessories, Text Editor to create and save the file. Do not save your file to the Desktop - that is very bad newbie Windows user practise. You should create a separate directory in your Home directory called "Scripts" or whatever. Save it there. Then do the chmod thing to it. Then Menu, Control Center, Personal, Startup Applications and add the script file name in there.
User avatar
lagagnon
Level 7
Level 7
 
Posts: 1888
Joined: Wed Jun 17, 2009 7:38 pm
Location: an island in the Pacific...

Re: Where to put a bash script

Postby gibbs1984 on Wed Jul 22, 2009 4:14 pm

Hi,

I've done this but it still doesn't seem to make any difference at all, I really like Conky but I can have it where I have to kill it and reload it at start up each time, it's getting annoying now.

Has anyone got anymore ideas?

PS. Sorry for the late response, I've been really busy at work lately, which I need to get back to now actually :D
Linux Mint 17 (Cinnamon) 32bit.
User avatar
gibbs1984
Level 5
Level 5
 
Posts: 671
Joined: Mon Oct 27, 2008 2:40 pm
Location: Hemel Hempstead, England

Re: Where to put a bash script

Postby lagagnon on Wed Jul 22, 2009 6:59 pm

My method above works perfectly. To reiterate:

Here is a typical bash script:

#!/bin/bash
sleep 20 &&
exec conky -d -c ~/.conkyrc &
exit

Save it, then "chmod u+x nameofscript" to make it executable.
Then:

Control Center, Personal, Startup Applications, Startup Programs, Add, give it a name, give the command line /home/yourlogin/scripts/conky.sh - you're done.
User avatar
lagagnon
Level 7
Level 7
 
Posts: 1888
Joined: Wed Jun 17, 2009 7:38 pm
Location: an island in the Pacific...

Re: Where to put a bash script

Postby gibbs1984 on Thu Jul 23, 2009 12:46 pm

Ok, I trust you ;)

I'll give it another go in a minute.
Linux Mint 17 (Cinnamon) 32bit.
User avatar
gibbs1984
Level 5
Level 5
 
Posts: 671
Joined: Mon Oct 27, 2008 2:40 pm
Location: Hemel Hempstead, England

Re: Where to put a bash script

Postby gibbs1984 on Thu Jul 23, 2009 2:35 pm

Sorry, I might be being thick here but do you chmod my .conky_start.sh file?
Linux Mint 17 (Cinnamon) 32bit.
User avatar
gibbs1984
Level 5
Level 5
 
Posts: 671
Joined: Mon Oct 27, 2008 2:40 pm
Location: Hemel Hempstead, England

Re: Where to put a bash script

Postby Kaye on Thu Jul 23, 2009 3:03 pm

Yes, that is the file you chmod. chmod gives the script the ability to be executed.
"In somnis veritas"
Antivirus or defragging?
Image
User avatar
Kaye
Level 5
Level 5
 
Posts: 942
Joined: Fri Feb 06, 2009 5:05 pm
Location: Boston College

Re: Where to put a bash script

Postby optimize me on Thu Jul 23, 2009 5:46 pm

You might want to go have a look at the Conky Hardcore blog. There's a number of tutorials and quite a bit of information over there, along with links to forum threads dedicated to conky where you will find tons of information.

http://conky.linux-hardcore.com/
AMD Phenom II X6 1045T 2.8GHz 8GB DDR3 RAM ATI Radeon HD6970
User avatar
optimize me
Level 5
Level 5
 
Posts: 639
Joined: Wed Jun 03, 2009 5:25 pm

Re: Where to put a bash script

Postby gibbs1984 on Mon Aug 17, 2009 5:01 pm

Hi,

Me again, sorry I been really busy so haven't had much time to play with my Conky problems, I've managed to get it to work perfectly now though with all your help, so thanks very much, much appreciated :D

Steve
Linux Mint 17 (Cinnamon) 32bit.
User avatar
gibbs1984
Level 5
Level 5
 
Posts: 671
Joined: Mon Oct 27, 2008 2:40 pm
Location: Hemel Hempstead, England

Linux Mint is funded by ads and donations.
 

Return to Compiz, Conky, Docks, & Widgets

Who is online

Users browsing this forum: No registered users and 1 guest