A shell script is a script written for the shell, or command line interpreter, of an operating system.

learn more… | top users | synonyms (1)

2
votes
1answer
43 views

How to run scripts as user (not as root) in lightdm?

I want to run some scripts before login every time my PC is started. I add the scripts in as greeter-setup-script in lightdm.conf. However, all the scripts are running as root! I want to use normal ...
0
votes
0answers
44 views

Bash if password filled save it

I am trying to save a password to gnome keyring via python script. The python script will be runned from bash script if password is filled in zenity GUI. Example: User inserts hes/hers password to ...
2
votes
0answers
64 views

Startup script to unmount and re-mount a USB device

I have a Microsoft wireless mouse and it has a scrolling issue in Ubuntu. The scrolling is too sensitive. I've read in other threads that the solution to this is unplugging the USB receiver of the ...
2
votes
1answer
53 views

How to refresh privileges on a script?

I have an script that modify files and group permissions. But it doesn't bring effects 'till I close the session and open a new one. Instructions where permissions are changed: sudo groupadd ...
0
votes
1answer
177 views

How to debug initramfs scripts?

For my Ubuntu 14.04 setup, I have 4 LUKS partitions that work as backing block devices form my BTRFS root partition. Using the default settings I could not get the 4 encrypted partitions unlocked at ...
0
votes
2answers
51 views

How to list directory contents recursively? [closed]

I need help with a script that displays the subdirectory structure of the current directory, along with the names of files in these subdirectories. I've tried commands tree, ls, and grep but it is ...
3
votes
2answers
3k views

Unable to execute .sh files in Ubuntu 14.04

I am unable to run .sh file in Ubuntu 14.04. The same file was executing in earlier version 12.xx. After upgrading to 14.04, this file stopped running. How to resolve this issue?
0
votes
1answer
94 views

How to launch .sh from third party program?

I have the program Lutris installed on my computer and I am going through adding all my linux games. However some are .sh execs others are .bins and executables which both added fine. the .sh ones are ...
0
votes
3answers
43 views

Append an output of a command to a txt file and place it in non writable directory?

If i try for example : directory A i don't have write permission on it sudo ls -l > /home/A/a.txt bash: /home/A/a.txt: Permission denied Then how can i do this trick , any Suggestion is ...
1
vote
0answers
114 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 ...
2
votes
2answers
277 views

Bash login script with zenity for CIFS mount

I am writing a mount script for Windows share to run after login. I have done it with bash and zenity and it works, but now I need to make it better so if username field and password field are empty ...
0
votes
0answers
197 views

Installing packages (using Synaptic) failing

I am trying to (re)install sfcb using the Synaptic Package Manager. When I do so I get: (synaptic:3969): GLib-CRITICAL **: g_child_watch_add_full: assertion 'pid > 0' failed (Reading database ... ...
1
vote
2answers
111 views

Autorun windows share mount script after login as root

I have looked everywhere for a solution that lets me run CIFS automount script after login with around 20 second delay. What I have tried. Added the script to visudo: rait ALL=(ALL) NOPASSWD: ...
1
vote
2answers
162 views

How to install RevKit

I’m trying to install a software called RevKit on Ubuntu 12.10 and the following instructions1 need to be followed: RevKit can be downloaded from the www.revkit.org website. Opening a Bash ...
0
votes
1answer
268 views

.sh installation error, this script is to be run as resolve user

Ubuntu 14.04 64 bit. I downloaded a .sh file that is supposed to install Davinci resolve but when i run it it says uncompressing installation package, and then says this script is supposed to be run ...
23
votes
3answers
1k views

Where should I put my script so that I can run it by a direct command?

Where can (should) I put my (bash) script so that it can be used (forever) by terminal or by a direct command: Alt+F2? I know there is /usr/bin and /sbin & /bindirectories but when should I use ...
1
vote
0answers
51 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 ...
0
votes
0answers
102 views

init service script is running twice

I have a init script under /etc/init/ to start up an application server. The problem is that it seems to be running twice. here is the command: exec su - deployer -c 'cd /home/deployer/app/current; ...
0
votes
0answers
17 views

Why is inserted media loaded under user directory? [duplicate]

case in point: I insert an SD card named TESTSD into my computer, It loads to /media/user/TESTSD instead of /media/TESTSD So far this only happened on two installs on different machines with Xubuntu ...
1
vote
0answers
27 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 ...
0
votes
1answer
68 views

How to add percent and remained time of download by aria2c via Sysmonitor Indicator?

Is it possible to add download progress bar aria2c/wget to panel, especially the percent and remained time of download by this appindicator or sth else?! I mean when you run aria2c to download a file ...
1
vote
1answer
259 views

Startup script can be run multiple times despite pid file

The reason I'm doing this script is because I want to daemonize supervisord: right now I'm in a cloud host in which I don't have access to the /etc or the sudo command; this script is my best attempt ...
1
vote
1answer
26 views

Turn off colour while using script(1)

Is there a way to turn off colour while using script(1)? My script file is being filled with unnecessary information regarding colours from commands such as ls. This information is only visible when ...
1
vote
1answer
154 views

Startup & shutdown scripts for Java servers

I am trying to design a graceful startup/shutdown script (Bash) for a Java app (JAR) that I will be deploying to my Ubuntu 14.04 server. I'm looking for a clean, Linux- and Ubuntu-friendly way of ...
1
vote
2answers
59 views

lubuntu how to execute 2 commands in .desktop file?

I have created a .desktop file in /etc/xdg/autostart which runs the command Exec= disper -d LVDS,VGA-0 -r auto -e -t right Now I want to add a second command to run after the first command. How do ...
0
votes
2answers
30 views

Keep backing up (copying) the same file to a new folder

I am saving a stream in my HDD. I'd like to copy the file periodically into a subfolder backup such that the older versions of the the file are not deleted. Simply put Assume the original file is ...
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 ...
0
votes
1answer
34 views

Shell script backup routers

Below is a script I've wrote to backup my routers and adsl modem, Any ideas to compact this script in less lines? Each router have a different kind of structure as you can see. #!/bin/sh ...
2
votes
1answer
560 views

Open BASH Shell Script files without terminal

How do you run shell script files without using the terminal in Ubuntu? Like just double clicking it. I know in Xubuntu it does it like that but not regular Ubuntu.
5
votes
4answers
2k views

How to know if the running platform is Ubuntu or CentOS with help of a Bash script?

I know the commands to check the name of the Linux machine running on my machine. For example: Ubuntu cat /etc/version CentOS cat /etc/issue How do I get the output from the terminal and ...
-4
votes
2answers
4k views

Whatsapp Help for Ubuntu 14.04! [duplicate]

Hey i have found a way to use Whatsapp on ubuntu using Pidgin! But i don't understand everything on the site... Can someone help me? I have completed the pidgin installation and whatsapp plugin. Now ...
1
vote
1answer
92 views

Copy a file from ubuntu server to a nas drive

I would like to use a script to copy a sql file to a nas drive location. for example it would copy backup.sql to //10.1.1.124/backup/Backups.
0
votes
1answer
54 views

/etc/rc0.d script not allowed to finish

I have a script that I've written that needs to run during shutdown which brings down my vagrant instance. The script runs without issue, and I echo output to stdout (and to a file) of the process. ...
4
votes
2answers
60 views

How can I run a sh script targeting X11-settings on login?

The gui-based controls for mouse acceleration do not suffice to tame my mouse, so I am correcting this by running: xinput set-prop 10 "Device Accel Constant Deceleration" 2.9 This script has the ...
5
votes
1answer
1k views

How to create Excel xlsx files from a script?

I'm looking for packages available in Ubuntu main/universe repositories (14.04) able to create Excel 2007+ xlsx files from a script (python3 or perl) My requirements: 100% compatible Excel XLSX ...
1
vote
1answer
353 views

Bash script doesn't execute command from PATH

I have this simple script: #!/bin/bash echo ${HADOOP_HOME} $(hadoop fs -ls) The output is: /opt/hadoop-0.20.2-cdh3u2 ./hello.sh: line 3: Found: command not found So bash definitely sees ...
3
votes
1answer
241 views

How do I pass complicated shell commands over SSH to be executed remotely? Mine throw syntax errors or get interpreted locally!

I have a command like this which tells me if a system has a disk that's getting full (>=70% full): if [[ -n df -PTh|column -t|awk '{print $6 $7}'|awk -F"%" '{printf "%-9s %-5s\n",$1,$2}'|grep -v -e ...
1
vote
1answer
231 views

GUI toggle key for wifi hotspot(on/off)

I want to create a GUI widget like on/off toggle for running a set of commands. For example, to turn wifi hotspot on and off using ap-hotspot start/stop. Anybody help me...
1
vote
2answers
55 views

Intermittent crontab problem

My crontab entry intermittently fails to find scripts in my user's home directory. The crontab entries run exactly on schedule as specified, and occasionally the script runs correctly, but mostly it ...
0
votes
1answer
55 views

shell script to function on subfolders

I want to write a simple shell script that will go into all the sub-folders in a directory, and organise the files in the sub-folders into new directories. Basically in terminal it would look like: ...
3
votes
1answer
83 views

Bash script callable from home but not scripts directory

I'm having a very weird error when trying to make a script callable. I have a scripts directory in /srv/projectname/scripts where I store you know scripts to be called as cron jobs for different ...
4
votes
3answers
130 views

How to check the number of fields given to the `read` command?

I have a quick question relating to $# in the shell scripts. So, I can use $# at the command line to check the number of a shell script arguments given by the user. Example: # ./shellScript varONE ...
1
vote
1answer
342 views

autogen.sh not found for webkit

I'm trying to install Webkit in ubuntu 12.04 following this instructions: https://help.ubuntu.com/community/WebKit When I get to this instruction: ./autogen.sh --prefix=/usr I got an error ...
1
vote
1answer
92 views

Upstart script doesn't work

I'm trying to create my own script that gets executed on startup and stopped on shutdown (referring to the classic System-V init style), but it won't work! I've created this script ...
0
votes
0answers
38 views

Start a PHP Script from Startmenu (Lubuntu)

I try to start a PHP script directly from the start menu of Lubuntu. But it doesn't work the only thing who's happening is that it starts a Terminal. I setted the permissions with chmod a+x. Hers my ...
1
vote
1answer
38 views

Disabling touchpad when desktop starts

I would like to turn my touchpad off when my desktop starts. How can I do that? I already found that the following script outputs 14: xinput list | grep -Eo 'TouchPad\s*id\=[0-9]{1,2}' | grep -Eo ...
0
votes
0answers
14 views

how to write a shell script which gets notified when an avi file is played from terminal?

For my project purpose I want to write a shell script program which runs in the background and acts as a listener to a specified avi file. When that avi file is played from terminal my script file ...
0
votes
1answer
812 views

autogen.sh script failing with autoreconf2.50: automake failed with exit status: 1

I recently heard about the Maynard desktop, a replacement for LXDE on the Raspberry Pi, and I really liked it. I was just planning on installing it on my Pi, until I found out I could compile it for ...
0
votes
2answers
112 views

How to make a python script a command?

I'm trying to make a python script into a command, eg: google's ipaddr.py (http://code.google.com/p/ipaddr-py/). I want to be able to type ipaddr and it puts out what I want. Is this possible? I've ...
1
vote
2answers
224 views

Move images from sub-folders into new sub-folders

I have a folder composed of M several sub-folders, each of them containing some text files and N images (*.png) This is what the tree looks like: /parent/ /sub-folder1/ /data1.dat /data2.dat ...