Script is series of instructions written in plain text file. The script interpreter (i.e. shell, Python, Ruby, etc.) can read this file and act on the instructions as if they were typed at the command prompt. The interpreter also provides a variety of useful programming features to make your scripts ...

learn more… | top users | synonyms (1)

3
votes
0answers
2k views

How to transfer an iPhoto Library to a file based structure and how to manage them properly?

I need to export my old iPhoto Library to a file based structure similar to the format of shotwell. There are some possiblities: Just use the iPhoto Master folder Use Shotwell to import the photos ...
2
votes
0answers
11 views

how to make a BASH script to find all php.ini files in dir tree and append text to them

My hosting company advertises a php max upload size that can go up to 60M but, It defaults to 2M and I am not able to make changes to the htaccess file. I can override the default by changing the ...
2
votes
0answers
27 views

How to automatically run a script once, after installing lubuntu from a pen drive?

I've got this usb stick I'll send to my sister, and I couldn't put int Ubuntu in it (just little less than 1 gb and few MB short of fitting in 14.04). So I decided to go with Lubuntu. Then, I've ...
2
votes
0answers
52 views

preseed file and installation script

I am using a preseed file to auto install ubuntu 12.04. I create a normal user account (able to use sudo), I skip the creation of a root account. At the end of the file I have put this (seen it from ...
2
votes
0answers
57 views

error insserv with script

I try to install Unbound with the following website: http://www.unix-tutorials.com/go.php?id=3681 I copied the script : #!/bin/sh # # unbound This shell script takes care of starting and ...
2
votes
0answers
190 views

How do I force nmcli to reconnect to different uuid?

I have a bash script that checks my network environment and mounts shares accordingly. If I'm at work and have a hard-wire connection to the LAN, then I'd like to activate a hotspot connection for ...
2
votes
0answers
57 views

Upstart - unable to read /etc/shadow unless sudo

In the following script in Upstart, I'm unable to read /etc/shadow in pre-script phase, unless I use $(echo mypass | sudo -S cat /etc/shadow | grep myusername) The script works fine if I provide my ...
2
votes
0answers
419 views

Port redirection for a specific (dynamic) IP using iptables script

What I want: Incoming TCP and UDP connections on port 900 from the resolving IP address of myip.dyndns.org (dynamic IP) should redirect to port 5050 on the local machine. All other IP addresses ...
2
votes
0answers
202 views

Activating USB audio with /etc/pm/sleep.d script that runs pacmd commands

Ubuntu annoyingly switches the device for audio input and output from my USB headset to the built-in sound card every time I log out, hibernate, or shut down my computer. This takes place even though ...
1
vote
0answers
22 views

Simple way to delete a file and all its links (simultaneously)

I found a lot of questions on how to delete symlinks only, or delete symlinks based on their contents, but no one has asked how to do what I want to do. Take the following example file-l -> ...
1
vote
0answers
20 views

Testing post-install scripts

I love to experiment with my Ubuntu GNOME 14.04, so there are many mistakes to be made and things to learn. Often I want a clean install, so I made post-install script. Question is: what is the best ...
1
vote
0answers
17 views

Where are the default hardware button (ie. volume increase, screen brightness, play/stop music) scripts

I have installed Ubuntu 15.04 on my Thinkpad x220t and was pleasantly surprised to find that the tablet button for rotating the screen works out of box. However, while it does rotate the screen it ...
1
vote
0answers
23 views

Bash script sends mail from one server but not the other

I have a bash script that is running on two, virtually identical servers. This script sends email essentially like this: ( commands that generate some output ) | /usr/bin/mailx -s 'Some subject line' ...
1
vote
0answers
23 views

Job on Upstart not started

I'm trying to start my application at boot, but I can not ... the script in upstart calls another script, I'm not getting or whether the 2nd script is called, follows the two scripts: 1º Script ...
1
vote
0answers
18 views

Seamless slideshow transition with this script

I am looking to make this script seamlessly change files without flashing to the desktop in the transition process. Whether It be just a blank black screen, or it fades in and out of files, I don't ...
1
vote
0answers
95 views

rc.local doesn't run on startup

I know this question has been asked a lot of times already, and I think I might have tried everything suggested on the internet, but I just can't get it running /etc/rc.local: #!/bin/sh -e while : ...
1
vote
0answers
34 views

Automatically switch to Singstar Microphones when they're plugged in

I am running a media computer for my sharehouse and since singstar has been so popular I want to run Ultrastar for everyone too. The problem is that getting the microphones set up can be finicky and ...
1
vote
0answers
20 views

How to configure ccsm from the command line or a script?

THE GENERAL PROBLEM: I wish to change some settings of ccsm from the command line, or more precisely a script. I imagine there will be some arcane combination of gsettings or gconftool that does what ...
1
vote
0answers
11 views

How to track the Internet connectivity of two PCs simultaneously using a script?

I have two PCs and I want to monitor the Internet connectivity in both of them and make it available in a page (not local, and something like example.com/statuses) as to whether they're currently ...
1
vote
0answers
106 views

Script with xdotool not working properly on a fresh reboot

I want to run streamus (chrome app) to stream youtube from terminal and asked a question relating to that in this same SE. I also got a wonderful answer and a script for my problem. But that script ...
1
vote
0answers
40 views

Error Setting up Minecraft-init Script

I run a Ubunut 14.04 64Bit Server and try to get a vanilla Minecraft server to run as a Service. I found a good script here: http://minecraft.gamepedia.com/Tutorials/Server_startup_script I set it ...
1
vote
0answers
31 views

Screen in crontab

I'm trying to run 9 screens windows by crontab, and then, run some codes (basically the same for all of them), but they don't work. The code runs all of 9 screens, but run code only on the first. Aah, ...
1
vote
0answers
61 views

Why do I need to restart Ubuntu 14.04 LTS for my networking scripts to work?

When I started using 13.04 LTS on my Virtualbox VM (4.3.26), I turned off network manager and wrote some scripts for dynamically updating the static IP of my laptop on any network. I was doing this ...
1
vote
0answers
31 views

/usr/local/bin/apt-get script being completely ignored

I have added a script to /usr/local/bin/apt-get on an Ubuntu Trusty system which does some checking that is required before launching the "official" apt-get. For reasons I simply cannot comprehend ...
1
vote
0answers
214 views

Bash script: command not found

I have an executable script install_packages.sh in /home/etienne/admin folder. The directory's path is added to $PATH variable from /etc/bash.bashrc. When I type #echo $PATH I see that the variable ...
1
vote
0answers
45 views

How do I run as bash script from a WebApp?

I currently am developing a custom Ubuntu dist. that runs a dedicated Kiosk app upon boot. I would like an easy method to shutdown from inside the Kiosk app, but I am currently at a standstill at what ...
1
vote
0answers
45 views

Run a script after every grub-update

I want to run a script automatically after every grub-update. The script itself consists of a single line sed -i 's/[\]"!Windows 2006[\]"/"!Windows 2006"/g' /boot/grub/grub.cfg For this purpose, I ...
1
vote
0answers
131 views

bash script to cd into an USB device

i am creating a simple updater for a program which will be ran on an Odroid C1 with Ubuntu 14.04 Server.. Preamble 1) i want the updater.run downloaded from my server and placed into an USB; then ...
1
vote
0answers
166 views

Running Python script in Abaqus in Ubuntu

I am running a python script through the scripting interface in Abaqus. It's a basic script that writes a value from each element from the abaqus simulation into a a text file. The text file is then ...
1
vote
0answers
106 views

Ubuntu 12.04 LTS scripts in /if-up.d not executed

Since this morning have been trying to achieve something: System: Ubuntu 12.04 LTS, Network-Manager is not installed Goal: Every time, the eth0 network interface is started (if-up.d) we want to ...
1
vote
0answers
130 views

Requirements for KDE startup scripts

I'm running Kubuntu 14.10. I want to include the following startup script for KDE: kstart --desktop 1 firefox kstart --desktop 2 kmail kstart --desktop 3 konsole I placed these three commands in a ...
1
vote
0answers
57 views

How to run scripts on screen sleep / wake

I'm wondering how to run a script when the screen times out and when it wakes. I am not talking about hibernate or suspend, but only when the screen turns off. The reason is I have a LED keyboard and ...
1
vote
0answers
123 views

how to encode a shell script so others can run it but they can not read it

I want to encode a script, so others can run that script to get relevant result but when they run command cat it should throw output in encoded format.
1
vote
0answers
64 views

How to autorun a script as root just after the user's encrypted home directory has become mounted on headless server?

There is a problem with ecryptfs that it heavily limits the maximal filename length. To walkaround it I link most home subfolders to the external encrypted partition. The partition gets mounted just ...
1
vote
0answers
160 views

I sudo'd a bash script, full of sudo apt-get install applicationname commands, and now my programs won't run

I sudo'd a bash script, full of sudo apt-get install applicationname commands, and now my programs won't run, unless they are ran as sudo (BAD IDEA!) How do I fix this issue?
1
vote
0answers
1k views

GRUB2 /etc/grub.d/ 40_custom multi-boot

I am adding GoBoLinux to Windows Vista and Ubuntu 12.04 with GRUB2 on the MBR but I am not clear on the script or how to devise a script to replace 40_Custom. Loading the GoBo GRUB to it's own root ...
1
vote
0answers
254 views

How can I draw selection rectangle on screen for my script?

I am trying to make a simple screencasting bash script. I want to get screen selection coordinates by drawing a red rectangle with mouse. I can use xdotools to get coordinates but how can I draw ...
1
vote
0answers
54 views

suppress all interaction while installing apt-fast

I want to ask whether there is any method to suppress any interaction while installing apt-fast using apt-get. I add the ppa source and then use the next command to install apt-fast: sudo apt-get -y ...
1
vote
0answers
428 views

Can you use gnome keyring in bash script, if yes then how?

I am developing a automated mounting script for Windows shares. I have finished the script and it works just fine, but is it possible to add Gnome Keyring to the bash so once user writes hes/hers ...
1
vote
0answers
136 views

Using a keyboard shortcut to execute a script

Hello I am a linux newbie trying to set up a keyboard shortcut to execute a script I have. The script functions as desired, and is #!/bin/bash livestreamer twitch.tv/arteezy best This opens up ...
1
vote
0answers
77 views

Automatically detecting and outputing to s-video at startup

After combing the Internet I have developed a script that is capable of checking whether I have a monitor connected to my VGA port and switching to my s-video port if not #!/bin/bash # if no vga then ...
1
vote
0answers
22 views

Detect file size decrease

I am saving streams from browser cache into my home folder. I wrote a script that takes the specific data type and saves them into disk, and names them as data.1, data.2 , data.3 and so on, creating ...
1
vote
0answers
112 views

Make right+left click emulate middle click on wireless mouse

Anybody have or know of a sweet little workaround script I can set to running at startup that would allow my dilapidated mouse to keep providing me with middleclick functionality even though the ...
1
vote
0answers
431 views

cannot execute script with sudo no password

I would like to create a batch file that will connect via ssh to my ubuntu server and run a script. My batch file works by using plink, I can see that the call to my script is ran but then I'm asked ...
1
vote
0answers
111 views

acpi-support script missing in rc.d

I've just had a look inside the directories /etc/init.d and /etc/rc.d . I have a 13.10 machine, upgraded from 13.04. Then I saw that this link was missing. S99acpi-support -> ...
1
vote
0answers
167 views

Why won't cron run my sh script?

Used gnome-schedule to create a script to set my headset as the fallback audio device because it keeps unsetting it when the headset gets disconnected or pc goes into sleep mode. Anyway, crontab is ...
1
vote
0answers
122 views

Keyboard shortcut script not working

I finally gave up on getting my Fn+up/down keys to change my screen brightness on my laptop. I took a brightnessup.sh and brightnessdown.sh script and put them in /etc/acpi and then went to keyboard ...
1
vote
0answers
500 views

xfce4 - 'Run Program' dialogue box does not appear when double clicking script

Ubuntu 12.04 > Xfce4 On my previous Ubuntu distro, when I double clicked scripts I got a little dialogue window that asked me if I wanted to run the script as a program or run it in terminal. ...
1
vote
0answers
324 views

Is it possible to use the conditional arguments in a preseed?

I am trying to create a preseed.cfg that is usable for a CD based installation and a network based installation. I figured the easiest way to do this would be to use a bash conditional "if". As part ...
0
votes
0answers
14 views

Setting IP routes using script

My Setup In this setup, the server can see the routers but not see each other causing the clients to not be visible to each other as well. The VPN is set up using PPTP and the routers have DD-WRT ...