Where to put a bash script

Add functionality to your desktop
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
gibbs1984
Level 5
Level 5
Posts: 825
Joined: Mon Oct 27, 2008 2:40 pm
Location: Hemel Hempstead, England

Where to put a bash script

Post by gibbs1984 »

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
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.
Linux Mint 20.3 (Cinnamon) 64bit.
lagagnon

Re: Where to put a bash script

Post by lagagnon »

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.
gibbs1984
Level 5
Level 5
Posts: 825
Joined: Mon Oct 27, 2008 2:40 pm
Location: Hemel Hempstead, England

Re: Where to put a bash script

Post by gibbs1984 »

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 20.3 (Cinnamon) 64bit.
lagagnon

Re: Where to put a bash script

Post by lagagnon »

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.
gibbs1984
Level 5
Level 5
Posts: 825
Joined: Mon Oct 27, 2008 2:40 pm
Location: Hemel Hempstead, England

Re: Where to put a bash script

Post by gibbs1984 »

Ok, I trust you ;)

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

Re: Where to put a bash script

Post by gibbs1984 »

Sorry, I might be being thick here but do you chmod my .conky_start.sh file?
Linux Mint 20.3 (Cinnamon) 64bit.
Kaye

Re: Where to put a bash script

Post by Kaye »

Yes, that is the file you chmod. chmod gives the script the ability to be executed.
optimize me

Re: Where to put a bash script

Post by optimize me »

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/
gibbs1984
Level 5
Level 5
Posts: 825
Joined: Mon Oct 27, 2008 2:40 pm
Location: Hemel Hempstead, England

Re: Where to put a bash script

Post by gibbs1984 »

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 20.3 (Cinnamon) 64bit.
Locked

Return to “Compiz, Conky, Docks & Widgets”