Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
Make your voice heard. Take the 2019 Developer Survey now

Questions tagged [automation]

The use of control systems to reduce the need for human work. Related to automatic systems.

1
vote
1answer
35 views

How to automate date in template-generated file with Thunar [xfce4]

In XFCE4 it is possible to install templates in ~/Templates and they will appear under the Create Document entry of the Context and File Menus. Now, let's say I create a Python template there (it can ...
0
votes
1answer
25 views

rsync commands automation [duplicate]

I want to automate multiple rsync commands like below: Execute rsync1 Display output of rsync1 in the terminal Ask confirmation if want to continue rsync2 Execute rsync2 Can someone help?
0
votes
0answers
19 views

Linux system equivalent to MS-DOS .bat file [duplicate]

I would like to write files that when opened open a terminal window and perform a series of commands, the reason for this is I want to eventually schedule them to run hourly, daily etc, and some of ...
2
votes
2answers
315 views

apt install <list of packages from file> [duplicate]

This looks good: for i in package1 package2 package3; do sudo apt-get install -y $i done but with the packages listed in a file: package1 package2 .. each on its own line. Looking for simplest ...
3
votes
1answer
189 views

Protecting WSL-Ubuntu and WSL-OpenSSH (unfiltering port 443 correctly, to use just these)

I use WSL-Ubuntu on Windows 10 home (build 17134.472) basically just for OpenSSH and Ansible and AFAIK both require only port 443 to be unfiltered to work properly. I have both Windows Firewall and ...
2
votes
2answers
123 views

Script for merging files in multiple nested directories by symbolic link

Basically I am looking for a script to automate stuff (See picture below) in Ubuntu. I'm thinking of using a bash script but other solutions (eg. python?) would also be excellent. 1) Suppose I have a ...
0
votes
0answers
38 views

How can I auto-close an urxvt terminal after executing an expect script?

I've written a script to handle quick copying of passwords to the clipboard: #!/usr/bin/expect -f spawn -noecho zsh expect "$ " send "pass show -c " interact exit This script is launched like this: ...
0
votes
0answers
31 views

Skip a package when upgrading with APT [duplicate]

To upgrade all packages on my Ubuntu 18.04 Server, I'm using sudo apt -y upgrade and it works fine as expected. I'd like to automate upgrading using cron, but one specific package, onlyoffice-...
-1
votes
1answer
42 views

Can I automatically turn on my hotspot when ethernet is plugged in?

My router is quite a distance from my work space, but I have an ethernet cable running that distance. When I plug it into my laptop, is there a way to automatically turn on the laptop's hotspot so ...
0
votes
0answers
14 views

How can I define Ubuntu workspace configuration as code?

Is there any more or less suitable tooling for the scenario described below? Imagine the following scenario (upon this question, but here Ubuntu-specific): You have a standard work environment, 4 ...
0
votes
0answers
12 views

Start script after file is placed in folder

Hi so my younger brother was in a bad car crash a while back and has lost all of his motor skills. With that I've been trying to automate encoding Anime and labeling, like he would do prior to the ...
0
votes
0answers
106 views

How can I install IronAHK on Ubuntu LTS 18.04?

I am trying to install Linux equivalent of Autohotkey on Ubuntu LTS 18.04. a) I have followed the following guide: Building IronAHK from source on Ubuntu I have tried these: sudo apt-get -y ...
1
vote
0answers
46 views

Creating Script to Automatically & Periodically Save Open (Focused) Files

I would like a way of saving open files outside of the program in which they're open--a robust and simple way of doubly ensuring that highly important files are locally saved. Would it be possible, ...
1
vote
0answers
37 views

Open Tor from specific Firefox urls

I have Firefox and Tor installed on my Ubuntu 18.04. Day to day I mostly use Firefox, but in some specific cases I want to open a webpage using Tor. For example, say I want to open askubuntu.com in ...
1
vote
1answer
27 views

Start a server using a shell script

Now, I need to start the server like this. $./server.start I have to this every time I start and logged into my machine. It would be so good if there is a script which does the same automatically ...
0
votes
0answers
30 views

Execute a script every day 5:00 [duplicate]

I'm running tf2 server on my ubuntu computer, and I would like to run an auto update in every morning at 5:00. So this script should first close the running tf2 server, then go back to the "steamcmd" ...
2
votes
2answers
93 views

Are there any commands I can use to ensure that the NTP service is running and is also responsive?

Are there any commands I can use to ensure that the NTP service is running and is also responsive? What I am planning to do it have some monitory & remediation scrip to ensure that a couple of ...
0
votes
0answers
17 views

If active window is file manager then store selected files in variable

I am trying to port a script from AHK script for Windows to Python script for Ubuntu. Desired behavior (1) If user presses F5 when active window is explorer it displays message "explorer is active"....
0
votes
0answers
18 views

Ubuntu 16.04 post_install script automation fails

I am trying to automate post provision script via chef-client to run on Ubuntu 16.04 provisioned Virtual Machine but my script just stops randomly without any error trace. When I manually ssh into the ...
0
votes
0answers
60 views

Is it possible to automate interaction with an application using bash?

We have a graphical application deployed on ubuntu server 16.04. Sometimes certain things on this application seize to work properly. I'm probably stretching for a long shot but is there anyway I ...
0
votes
0answers
23 views

Auto click in a bouton in an HTML page in Ubuntu server

I want login on my youtube channel and inject ad on my livestream, API of google dont be able for inject ad on a live stream, my question is : Is it possible to inject an advertisement through an ...
0
votes
0answers
29 views

Set networking so as to turn Wi-Fi on/off when X process is started/interrupted

my aim is to set (through scripts/daemons/whatever piece of software might help) my laptop networking (Wi-Fi in my case) so as to turn on automatically when I start software X (Firefox in my case), ...
0
votes
1answer
2k views

What am I missing to automate my 18.04 install?

I am trying to automate my install of Ubuntu 18.04. This is how my current boot paramters look like (forgive me but it's long) boot=casper auto-install/enable=true console-setup/ask_detect=false ...
0
votes
1answer
57 views

Background process

I have the below script - #!/bin/bash xset -dpms xset s off openbox-session & start-pulseaudio-x11 xsetroot -cursor_name left_ptr /usr/bin/nm-connection-editor openfortivpn gw.itsecurelink.com:...
3
votes
1answer
51 views

Code capture automated

I am doing a project, where we need a video of the python script being written in the editor. We have 100+ scripts, so we need automation. Is there a program, in which the input is your python script ...
0
votes
0answers
60 views

using Terminal command by clicking on a link in an email?

Can I send someone an email with a link, that opens the Terminal and installs Wine on Ubuntu 16.04? I did it on my own system with the commands below, but I'd like to make it simple for someone... ...
2
votes
0answers
194 views

Why does xdotool seem to fail in Ubuntu with gnome 3?

I'm using gnome 3 with Ubuntu 17.10. I'm trying to open my text-editor of choice and gnome-terminal on startup and have them snap to the right resp. left corner of the screen, as seen in the picture ...
1
vote
1answer
125 views

using “at” to run python script at a specific time not working

I am trying to run this script at 7am PST every morning. The command I am using in testing is: echo "python checker.py" | at 8:40 PM Which fails. When I check the at -clog I get the following ...
1
vote
1answer
250 views

Reconnect VPN after Suspend

I have a VPN configured in Ubuntu and set to autoconnect when the system starts. But when I come back from the suspend state, the VPN is always disconnected and I have to reconnect manually. Is there ...
0
votes
1answer
129 views

Randoop on Ubuntu/Eclipse-oxygen

I need to write unite tests for my project (being developed in Java 8) using Randoop, how can I configure Randoop on Ubuntu system? I am using Ubuntu 16.04, and Eclipse Oxygen.
0
votes
1answer
51 views

Shell scripting automation

I just wanted to know that is there any process by which we can automate the process of fetching the server logs periodically by running some cron-jobs and saving the logs directly as a zipped file/...
0
votes
0answers
12 views

How can i run a script when i get a notification [duplicate]

I have a script that makes my keyboard flash and i would like if it was run every time i get a notification. So that my keyboard is flashes every time i get a notification the command I am trying to ...
-1
votes
1answer
954 views

How-to: An unattended installation of Ubuntu 16.04 on a disk with existing OS

I had a task of deploying Ubuntu Desktop 16.04 on multiple machines with Windows 10 on them. Of course, to accomplish the task efficiently, I needed to find a way to install automatically. I asked ...
-1
votes
1answer
2k views

/etc/ansible/ansible.cfg has all configurations commented out. How is ansible working?

for background and context: I'm a network engineer by trade, and I did not come up through the traditional "systems" or "IT" path in my career, but now I'm working on learning network automation and ...
0
votes
1answer
80 views

OOB configuration management software for Nginx and PHP-FPM?

I have a question regarding configuration management (automation) of Nginx and PHP-FPM: 1) To allow full gzip functionality on Nginx I execute: sed -i "s/# gzip_/gzip_/g" /etc/nginx/nginx.conf 2) ...
0
votes
1answer
87 views

Further automating Ubuntu-Nginx-WordPress server environment establishment script?

With the following script I create a Ubuntu-Nginx-WordPress based environment. How could I further automate (hence shorten) the amount of code in that script? add-apt-repository ppa:certbot/certbot -...
1
vote
1answer
26 views

Log if process is active or not

I'm trying to make a web page which shows if a process is active or not, but how can I automate the process check and write that to a .txt or .html file so I can show it on my site?
-2
votes
2answers
340 views

Unattended-upgrade — update everything out of everytihng silently without any barriers

I installed unattended-upgrade via apt-get installl unattended-upgrade, then came to configure it with dpkg-reconfigure unattended-upgrade. I then came into the following screen with the saying: ...
1
vote
1answer
94 views

script to log idle time of xserver

The following is a script to calculate the idle time of a machine. The script is supposed to check xserver idle time at a time interval of 1 minutes and log the result to a location via cronjob. But ...
-2
votes
1answer
377 views

How to use ssh to remotely signal a Ubuntu 16.04 system to speak out audible alerts without using incron

Brief: The question is about whether I should modify my Ubuntu 16.04 system to accomplish a task, or is there an easier way. This is a complex system of computers, involving a mix of languages and ...
0
votes
1answer
129 views

Ubuntu terminal automation

Is there a way to run a script by opening a new window and sending inputs to it, so that is looks like someone is typing into the window?
-1
votes
1answer
153 views

How to execute a program when a specific string is entered in a specific window?

I want to write a shell script to automate screenshots using the screenshot program Shutter when some key words are written in a certain app,such as a internet chat room or text messenger service or ...
0
votes
1answer
290 views

How do I autorestart an exited process with exit status 0 in supervisord?

I am executing some PHP script with supervisord. Sometimes one of my processes is stopping with error log: INFO exited: worker_push_notif (exit status 0; expected). I already set in config ...
0
votes
0answers
65 views

How to update Ubuntu server automatically when server is powered on?

I have scenario when Ubuntu 16.04 LTS server is powered on every day for 1 hour. How to setup it in the way, that when started it updates itself automatically with an automatic reboot if needed? ...
8
votes
1answer
440 views

Text Expansion on Ubuntu 17.10 Wayland

Because Autokey, Snippy, and Texpander all rely on the X11 windowing system (or indirectly on xdotool), they do not fully function on Artful's default Wayland session. Is there any alternative ...
1
vote
1answer
474 views

How to start a scan with a hotkey and automatically save the result into a directory?

I have a Canon Lide 120 scanner connected to my Ubuntu computer via standard USB. To scan a document I have to open the scanner app, hit the scan, and then select a directory to save the image into. ...
0
votes
3answers
537 views

Script to move files to new directory periodically

I'm new to Linux, and looking for help with a script. I'm using Resilio to back up photos from our iPhones. They go to '/media/data/phones/myiphone/resilio' unfortunately resilio imports the photos ...
1
vote
0answers
160 views

Automatic Ubuntu 16.04 installation preserving existing partitions

I have seen quite old questions and answers about this subject but the answers were really complicated. So I am hoping that today, we have an easier way to achieve that behavior. I want to create an ...
1
vote
0answers
92 views

Detect media play / pause events

I want to pause playback after headphones have been unplugged, then resume after they were plugged back in. My current solution uses ACPI to detect plug / unplug, as shown here. To play / pause the ...
0
votes
0answers
84 views

Automate Memtest86

I've looked around and haven't seen anything like this so here we go. I want to put Memtest86 on a bootable USB and then have it automatically run through tests 0 and 1. (Preferably I would like to ...