Bash is the shell used in Ubuntu's command-line interface.

learn more… | top users | synonyms (1)

4
votes
0answers
119 views

Upstart and process substitution

So I want to use the following in my script stanza: forever -l >(tee $QW_LOG_DIR/webserver.log | logger -p user.info -t '[QW]') start webserver.js However, that won't work because: That's bash ...
3
votes
0answers
70 views

Redirect 'complete' in bash functions and alias

tl;dr: Is there a way to use an existing auto completion function to also auto complete arguments to an alias or short function. Auto completion in bash is great but does not mix well with aliases ...
3
votes
0answers
125 views

Terminator not opening and giving following error

Recently, I have installed zsh shell. After that I tried to open terminator software then it was crashing and giving following error: Also, after installation of zsh, I have set the default login ...
3
votes
0answers
426 views

msmtp not working?

I was trying to send mail from bash, but it doesn't work and I can't find the reason... So my .msmtprc file is account default host smtp.gmail.com port 587 from account@gmail.com tls on tls_starttls ...
2
votes
0answers
26 views

Facing errors with running shell scripts at startup and poweroff

I am using Ubuntu 14.04 LTS and I want to run 3 scripts at startup. They are named as follows: voe.sh startUp.sh and runDown.sh The script voe.sh is the main file which will in turn call the other 2 ...
2
votes
0answers
42 views

Auto chmod and launch?

Is there a way to have all files chmoded and then launched automatically? Say when I have my pc off, I insert a usb stick with a game on it, a lot of random files need to be chmoded and then I would ...
2
votes
0answers
34 views

How to make a key stroke recorder (for non-malicious purposes)?

When you first look at this question and its title you are going to assume that I want this for malicious purposes, however that is not the case, it is because I type a lot of things, and sometimes ...
2
votes
0answers
41 views

Script crashes when starting from .desktop file

When I execute script from terminal by hand, it runs without problems: gksudo /path/to/module.sh But when I use .desktop file to run script on startup: [Desktop Entry] Type=Application Exec=gksudo ...
2
votes
0answers
118 views

startx not working

I am attempting to install Ubuntu on an ASUS T100. However, when I boot it manually from GRUB, it crashes into an intramfs shell. I am able to mount the filesystem from the intramfs ASH shell and ...
2
votes
0answers
274 views

Why is neither /root/.bashrc nor /root/.profile executed after sudo -i?

I have export PATH="$PATH:/opt/local/bin" in /root/.bashrc and /root/.profile (nothing else in /root/.profile) and /bin/bash is the login shell for root in /etc/passwd. Yet invoking sudo -i (which ...
2
votes
0answers
38 views

Using Screen inside /etc/init

I am trying to launch a .jar inside a screen session at boot using /etc/init Here is my script (pretty standard:) start on runlevel [2345] stop on runlevel [^2345] console log chdir ...
2
votes
0answers
185 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
102 views

cron.daily gives apt error. “not found”

I recently upgrade to Ubuntu 15.04 and after that I get these strange errors in my cron e-mail. Sadly I didn't remember what version of ubuntu I was upgrading from but I think it was the latest before ...
2
votes
0answers
174 views

Different results of 'ps aux | grep x' if entered manually and done via script

It was probably a bad method, but I was running ps aux | grep x | wc -l as part of the if statement in a script. When I ran this from the command line as a regular user, the result would be 1 if the ...
2
votes
0answers
281 views

How to set environment variables for GUI program?

I am using texstudio, a latex editor, on Ubuntu 14.04. When I start it from bash $ texstudio, and click the compile button, it works fine. However, if I start it by clicking the icon in the launcher, ...
2
votes
0answers
465 views

System freezes during Bash auto-completion with Tab or Ctrl+R

It started about a week ago, don't know why. Now, when I type something like cd somedir and click Tab, my system completely freezes for about 10 seconds. I can move the cursor but can't switch between ...
2
votes
0answers
255 views

How to get bluetooth serial port tx/rx buffers status?

The problem comes from that I have to send data via bluetooth serial port from a tiny robot to my laptop at baudrate 115200, robot sends 32-bytes packet every 10ms (100 times per second). Transmission ...
2
votes
0answers
366 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
1k views

How can I create an X server that has a backing store?

So I am completely new to Ubuntu (I am running 12.04 on a Toshiba Satellite). I am trying to remotely access my work computer but I keep getting an error reading: "xevas: requires a X server that ...
2
votes
0answers
990 views

Why doesn't duply work when set as a cron job?

I have a problem with a cron job which starts but doesn't complete. Running the command manually works fine. I already read the page about cron issues and solutions here on AskUbuntu, tried the ...
1
vote
0answers
27 views

Non-printing characters showing up in terminal prompt

Without color my prompt looks like this: [0] [dimo414@dimo414:/tmp] $ echo $PS1 | sed 's/\x1b/\\e/g' \n[0] [dimo414@dimo414:/tmp]\n\$ I add some color and \[...\] delimit it: [0] ...
1
vote
0answers
48 views

16.04 - MenuBar Clock Missing

Ok, so the clock in the top right corner of the menubar is going missing. Here's what I know: I'm on the 4/12/16 build of 16.04. The clock is present when I first install the OS. Even when it's gone ...
1
vote
0answers
39 views

Command after apt-get install is not executing in script

I wrote a question on serverfault, but I guess it's more applicable for this commnity. I'm writing a script which is meant to initially set up my Droplet. In the script, I'm opening ssh connection ...
1
vote
0answers
30 views

script command failing

I am trying to use script command in my script to record my session. But whenever I start it, it gets terminated at the same instant. home@ubuntu-box:~$ script /tmp/myfile.txt Script started, file ...
1
vote
0answers
16 views

How to Show History of Port State/Activity?

Let's say I have an open port on my PC like 6789. I use this port for a special purpose. But, suddenly I found the port 6789 is not listed in netstat -ntlp (port closed). How can I see the history of ...
1
vote
0answers
10 views

Start a GUI in NetworkManager if-up.d script

I was wondering if it was possible to start a graphical application from a bash script when my openvpn is up. I was trying with command like this: gksudo -u username "sh -c '(/usr/bin/firefox &) ...
1
vote
0answers
22 views

Using checklist in Bash file

I want to create a bash script that do the following: Create a project folder based on Project -- Name this is OK. Create some folders based on user choices --This is the main question Here is my ...
1
vote
0answers
22 views

Error log for executing command in multiple terminal tab

My script for executing command in multiple terminal tab: #!/bin/bash tab=" --tab-with-profile=Default" options=(--tab --title=Terminal) cmd[1]="ping 192.168.9.1" title[1]="1" cmd[2]="ping ...
1
vote
0answers
31 views

Cheese wont die

Im trying to figure out a problem Im having with a motion server, and a given CCD camera, on /dev/video0 So, I had been viewing the camera stream using cheese. But now cheese has hung up, and wont ...
1
vote
0answers
20 views

Unable to locate package pnp4nagios

I'm having problems trying to find the pnp4nagios package. I don't know what to do. apt-get install pnp4nagios -y
1
vote
0answers
128 views

Bash shell doesn't display Python output

I started using vim + tmux for my programming and suddenly after accidentally smashing couple of keys [Forgive me I am a klutz] the bash shell started acting weirdly. When I run my unittest written ...
1
vote
0answers
16 views

Update apache/admin password in multpile folder

This is great work very well done. I have a problem too it is requested that you inform me how can do this. Let say i have folders named Folder1/apache/users/admin Folder2/apache/users/admin ...
1
vote
0answers
31 views

Inputting a text to an executable file the moment it's executed

i am bad at choosing titles but my problem is that I have an executable file that returns a value when i type the word password in it using the terminal, but the problem is the file require you to ...
1
vote
0answers
43 views

crontab run sequentially

I have to run crontab in xvfb display mode forever when the system restarts...below is crontab code.... @reboot nohup Xvfb :1 -screen 0 1024x768x24 & export DISPLAY=":1" @reboot /usr/bin/forever ...
1
vote
0answers
44 views

How to create a log of an rsync transfer on the remote server?

I have a lovely functional bash script, which uses rsync to create a backup on a remote server, utilising key-based authentication. It uses a standalone rsync command, rather than having to set up ...
1
vote
0answers
204 views

fswatch | while read | xargs running command twice

Thanks in advance for any advice I'm working on an fswatch command to launch a script when files hit the Downloads folder. fswatch --event Created Downloads/ | (while read x; do echo $x | xargs -0 ...
1
vote
0answers
61 views

How to run a tail -f log monitor script as a systemd service

I have a shell script which monitors the auth log to alert on new system logins, and it works fine when I start it manually, but when I try to load it as a service using systemd service is fails to ...
1
vote
0answers
38 views

bash script: gnome-terminal does not parse arguments

Using 14.04. I read several posts here and changed the command; however gnome-terminal comes with an error: Failed to parse arguments: Cannot open display: I have a bash script in which several ...
1
vote
0answers
74 views

Cannot run make - Bash vs Dash

I am on Ubuntu 14.04. 64 bit. I have a C++ source code with a makefile. As per the provider of the code, all I am supposed to do is to go to root directory for the code and type make, which is ...
1
vote
0answers
27 views

Hide `cd something` when shopt autocd is enabled

When shopt -s autocd and I navigate to any folder (for example the ~/Projects folder), I get cd ~/Projects in the terminal output and then move to the ~/Projects. How can I hide the output of what ...
1
vote
0answers
52 views

Bash auto-completion won't work for java command

I have a folder that has one java source (.java) and one java (.class) class file. I try to get the autocomplete functionality of bash by pressing <tab> after the java or java MyCl in order ...
1
vote
0answers
60 views

Ubuntu 14.04 Trying to Set Login Screen and Gsettings Fails with Error

Following instructions in other posts that involve dconf-editor or using su lightdm -s /bin/bash, I hit a big hurdle with the following error: olefoxx@Don-L355n2:~$ sudo -i [sudo] password for ...
1
vote
0answers
435 views

batch conversion with avidemux

I managed to convert avi files to mp4 using avidemux and the result is fully satisfactory. Since I have many files to convert, I would like to batch convert them using the terminal. I found the script ...
1
vote
0answers
81 views

Terminal command or script for audio to headphones

Is there any terminal command (or possibly a script) to make this GUI feature happen? I want to assign it to a keyboard shortcut. Even better (if possible,) I would like the system to always do ...
1
vote
0answers
91 views

How to filter audio files according to tacts per minute (speed)?

I have some music collection and I want to sort/filter them easily according to their speed (in tacts per minute). I want to find a simple solution to filter the whole collection using e.g bash, ...
1
vote
0answers
639 views

shell file to open multiple terminal tabs, change locations, run commands

I've never written a shell script before, but I have a web app that needs a whole bunch of things running at once, and it's irritating to have to open each tab, change directories, start my processes, ...
1
vote
0answers
47 views

Managing Running Scripts in the Background after logging out and logging in

I know how I can use CTRL-Z and bg to run a script in the background, and then fg <number> to bring it back by its number in jobs. However, after logging out and logging back in, jobs does not ...
1
vote
0answers
45 views

incrontab IN_CREATE event fires four times

I was looking into incrontab and tried it out as follows: /tmp/incron.sh : echo "$1 Content: `cat /tmp/test/a`" >> /tmp/incron.log incrontab -l: /tmp/test/a IN_CLOSE_WRITE /tmp/incron.sh ...
1
vote
0answers
70 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
188 views

When I manually start my own service it runs in the foreground, is this correct?

I have created my own service by: copying my binary to /usr/bin/mcp Create a daemon copying the skeleton: /etc/init.d/skeleton Modify the skeleton bash script top: ...