1
vote
2answers
170 views

Script that will reboot PC on specific GPU temp

Recently I've started mining litecoins. My miner consists of 3 Radeon R9 290x GPUs. From time to time one of them (not a specific one, it happens randomly) stops mining. Usually restarting cgminer ...
0
votes
1answer
327 views

Restart then shutdown using bash scripting?

I want to restart and then shutdown from terminal. Means that we want to startup terminal after restart and then shutdown automatically. What I am doing with explanation: Manually start my pc Run ...
2
votes
2answers
109 views

How to create scripts that create another scripts

I am writing an script that needs to generate another script that will be used to shutdown an appserver... This is how my code looks like: echo "STEP 8: CREATE STOP SCRIPT" stopScriptContent="echo ...
0
votes
1answer
77 views

Use grabc in python script

I want to work with the return value of grabc. If it returns #000000 then I want to take it to a=#000000. But this outputs the value in terminal. So How can I do this? [N.B: grabc is a tool for ...
0
votes
1answer
79 views

Unrar: Resulting files vanishing

Ok, so I have a directory which contains a whole load of folders containing RAR files, which I'd like to use a script to recursively unrar. The script I have seems to work (extracting the resulting ...
7
votes
2answers
2k views

Autorun a script after I plugged or unplugged a USB device

What can I do to run automatically a script after I mount/plugin or unmount/unplug a USB device?
0
votes
1answer
123 views

add entries to Startup Applications using a post-install script

I'm gathering commands to build a post-installation script, and I want to have the script automagically add certain apps to the Startup Applications list as if I had added them manually, such as the ...
2
votes
1answer
2k views

Auto confirm when running bash scripts?

I am working on a simple bash script that configures new servers how I want them. It's nothing special but it will hopefully save me quite a lot of time in the future. How do I prevent prompts like ...
1
vote
1answer
424 views

Run tasks after requesting a shut down

I have a small internet cafe with 7-9 Ubuntu 12.04 workstations. Unfortunately, I can't be there every week. I've seen a Java solution to upgrade the system, after a normal (non-sudo/admin) user ...
0
votes
1answer
100 views

How to script a reinstall (apt repo's and installed packages)

I need to wipe my hard drive and reinstall Ubuntu. /home is on a separate partition, so I can back that up to a backup drive, then copy it back to the wiped drive, install ubuntu, and point it at the ...
1
vote
1answer
2k views

automate transfer of tar files over FTP

Every day I have a script making .tar files of aparticualr directory. Once every day, I would like to transfere the new tar file made that day to a remote server over FTP. I would like to make this ...
2
votes
2answers
696 views

How can I programmatically get the PID of the active GNOME Terminal instance?

How can I get the PID of the GNOME Terminal instance I'm using from within a Bash script? I can run xprop _NET_WM_PID and then manually click the terminal window, but I'd like to completely automate ...
7
votes
2answers
3k views

How do I run a script when a Bluetooth device connects?

I'd like to start my music player (Clementine) when my bluetooth headset connects to my computer. How do I detect the bluetooth device connecting so I can run a script to start the player?
3
votes
1answer
179 views

Scripting Language That Sends GUI Events To Any GUI App

I would like to run scripts that will allow me to interact with the gui by sending windows events such as: button presses text insertion window closing, minimizing utilize an apps quick key ...
1
vote
1answer
193 views

Scripting question (youtube-dl and xclip)

I have youtube-dl and xclip installed. Is there a way I could write a script that can run commands from both? For example: youtube-dl -l --extract-audio (url) but instead of pasting a url could I ...
6
votes
1answer
642 views

How can I make a script to place files older than each day before into their own folder?

I'm running an unnecessarily complex script which looks similar to this command: find /home/user/videos/*.avi -mtime +0 -exec mv -f {} "/home/nb/videos/1 day old" \; And then I run the same ...
13
votes
1answer
10k views

Add lines to cron from script

Is there a way to add lines to a user's cron via script? I usually do it using crontab -e, but I would like to automate this task with a shell script.
2
votes
1answer
411 views

A simple email autoresponder

I have a POP3 email account, that I do not use anymore. It is on a server out of my control. Several of my contacts keep on sending email to that address, though I told them. So I decided to set an ...
9
votes
2answers
1k views

What is the least insecure way to store a password that is used by a script?

I have a Bash script that automatically authenticates with a service using my username and password. The credentials are currently stored as plain text within the script. What precautions should I ...
2
votes
1answer
3k views

How do I run BleachBit from the terminal?

On their website, they say to simply enter bleachbit --(argument here) but all that does is open the program. Am I doing something wrong?
3
votes
2answers
238 views

Automatic desktop/work environment setup

I have this strange thing I am trying to do, so before I jump into it I was curious if someone knows about existing solution or maybe have an advice as far as implementation. I run a small software ...
2
votes
1answer
224 views

How do I run a script automatically when I start an app?

I want to run a script automatically when an application start. How would I do this without making the script run at start-up? My current approach is writing a script with an infinite loop and made ...
1
vote
2answers
7k views

Script / App to unRAR files, and only delete the archives which were sucessfully expanded

I have a cron job which runs a script to unrar all files in a certain directory (/rared for argument's sake) and place the expanded files in /unrared. I would like to change this script so that it ...
9
votes
5answers
6k views

Alternative for Mac OS X Automator?

I once tested Mac OS X and something that called my atention was Automator, a software to visually create scripts to automatize tasks on the desktop. Is there any Linux alternative for this software?