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

learn more… | top users | synonyms (1)

3
votes
0answers
42 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
67 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
113 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
410 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
32 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
55 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
44 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 ...
2
votes
0answers
154 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
36 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
44 views

Print the last error message from stderr?

I have a script which deploys a web service, and I found this little helper to exitWithMessageOnError. exitWithMessageOnError () { if [ ! $? -eq 0 ]; then echo "An error has occurred during ...
2
votes
0answers
153 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
91 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
144 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
307 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
221 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
315 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
915 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
15 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
21 views

script to open terminal with multiple tabs and different directories

I find myself opening the same set of terminals every time I startup. I have 3 tabs in a certain directory, all with python venv's activated, and then one extra tab for ssh'ing if I need to. It ...
1
vote
0answers
25 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 ...
1
vote
0answers
71 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
14 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
23 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
34 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
30 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
95 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
35 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
31 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
17 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
36 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
246 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
64 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
89 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
372 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
37 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
32 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
270 views

Why is my shell slow after a while when I use git aware prompt and run git commands?

I am using git-aware-prompt in my .bash_profile on Ubuntu 15.4 like this: export GITAWAREPROMPT=~/.bash/git-aware-prompt source $GITAWAREPROMPT/main.sh When I am in one of my main repository ...
1
vote
0answers
51 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
147 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: ...
1
vote
0answers
50 views

I need help for shell script

I need help for shell script, this script on my pc works ubuntu 14.10 but on samba server machine ubuntu 14.04 is show me error: tar you may not specify more than one -acdtrux' option --delete or ...
1
vote
0answers
50 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
36 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
389 views

installing Anaconda, errno 2 no such file or directory

I've taken a look at some of the other AskUbuntus, and none of them have fixed my problem. I've been running iPython for almost six months now in order to get some extra practice with the Codecademy ...
1
vote
0answers
101 views

Lubuntu: hotkey to toggle displays

I am relatively new to Linux and new to bash scripting. I am trying to set up a Fn-F5 key on my old Asus EEE netbook to toggle between internal and external monitors. Creating a bash script in ...
1
vote
0answers
114 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
2k views

Sorry, user is not allowed to execute X as root on lt

Whenever I try to run a command from the termainal as sudo, I am now getting the error: Sorry, user {user} is not allowed to execute {command} as root on lt. lt is the name of my computer. The only ...
1
vote
0answers
152 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, ...
1
vote
0answers
49 views

keep same inodes metadata with rsync or ignore metadata with du

I'm trying to synchronize two folders from a remote computer. I want to use rsync to send the folder, and du to check if the space used is identical on the remote computer. The problem is even with a ...
1
vote
0answers
25 views

How to ponysay multiline messages?

When I am running phpunit I get a multiline response: $ ./vendor/bin/phpunit -c tests/phpunit_no_code_coverage.xml --filter=Ncl PHPUnit 4.1.6-6-g43914fa by Sebastian Bergmann. Configuration read ...