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

learn more… | top users | synonyms (1)

4
votes
0answers
120 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
77 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
137 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
428 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
35 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
38 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
42 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
132 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
299 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
195 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
104 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
182 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
333 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
505 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
258 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
379 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
1k 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
26 views

Port Ubuntu Touch using Windows 10 ubuntu bash

I'm trying to port Ubuntu Touch to my phone using Windows 10 bash. After many try, i stuck on building the test image for Nexus 4 to check possible it's or not. And every time after starting building: ...
1
vote
0answers
14 views

notify-send not showing popup message

I have a script which executes on certain conditions, whenever I manually execute the script, the popup appears, however if i try to aumotate the script(i.e. run the script right after system is ...
1
vote
0answers
29 views

Terminal has lost its colours

In terminal, the usual user@machineisn't green/blue as usual. Instead is is just white like the rest of the text. If I ssh into my server however, the colours are the same. Perhaps I've accidentally ...
1
vote
0answers
25 views

Why might this “reboot on ping fail” script not be working?

I have an unresolved problem with my vps falling off the network. There's no reply and the webhost have no idea, so I thought this bash script should work #!/bin/sh ping -c5 8.8.8.8 if [ $? -eq 0 ]; ...
1
vote
0answers
44 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
66 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
114 views

how to automatically copy new files from sd reader to disk on connect?

im new with ubuntu and linux, and poor knowleadge of english, sorry if i cant write clarely. I need a script or something to automatically move new photos (.cr2) from my camera's sd when i put it on ...
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
38 views

Bash script to display XKCD comic - crontab not executing

I wrote a bash script to display the current xkcd comic in my web browser (using the RXKCD package in R). I want to schedule this so that the current xkcd comic displays every morning at 8am when I ...
1
vote
0answers
17 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
12 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
37 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
21 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
145 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
32 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
48 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
55 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
223 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
65 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
39 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
83 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
31 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
62 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
65 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
502 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
86 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
694 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, ...