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

learn more… | top users | synonyms (1)

7
votes
0answers
59 views

No tab completion with asterisk *

I am not able to tab complete from the command line in gnome-terminal when I have an asterisk in the command line. Default shell is bash, using gnome-terminal. For example, This works to copy a ...
4
votes
0answers
56 views

How to set a new home directory at every login?

I'm in the process of building a kiosk system and need to give the guest user a new temporary home directory at every login. I wrote a little bash script that takes care of that but when it tries to ...
4
votes
0answers
123 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
44 views

Script on reboot

So, I programmed a simple script to alert on slack whenever the server is rebooted. What I did: In /etc/rc6.d/R99reboot-slack: (I tried with R01reboot-slack) #!/bin/sh /scr/msg.sh "Server restarting.....
3
votes
0answers
38 views

Python virtualenvwrapper problem running the initialization hooks

On a fresh install of 16.04, I am trying to install virtualenvwrapper by following this great answer by Gerhard Burger. after configuring the .bashrc, whenever opening the terminal displays bash: /...
3
votes
0answers
36 views

How to find the last valid information possibly spread over several log files

I have a fleet of busses that send me a monitoring log file every morning regarding the status of the vehicle the previous day. The log updates various information every 5 minutes. Among the data ...
3
votes
0answers
80 views

Bash Script Works On Command Line but not at startup

Let me ask this another way: There are at least (2) ways to have a bash script called automatically when a user connects to OpenVPN: Placing the script in the /etc/network/if-up.d folder Renaming ...
3
votes
0answers
83 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
152 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
432 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
28 views

G++ cannot find cc1plus for some users

I am trying to run a PHP script to compile C code through a bash script for an online code submission server. When I run the bash script as root, it all works. When I run it as www-data, the user ...
2
votes
0answers
35 views

bash.bashrc damaged..ubuntu log in loop and no interactive programs working from terminal

I have accidentally deleted the content of /etc/bash.bashrc and now I cannot log in as it gives me a loop and I cannot run any interactive programs from the terminal. When I try, I get this error: ...
2
votes
0answers
32 views

How to start several applications with one command to open in a specific workspace?

Since Ubuntu has no options to save and restore desktop sessions on shutdown of the computer, I want to write a shell script which helps to setup a customized workspace on a single command. I've found ...
2
votes
0answers
25 views

Scheduling Cron Job for a Specific Hour Range in a Week

I'm looking to run a cron job for specific hours in a week. The reason I'm doing this is due to the timezone being pegged exactly 7 hours ahead of New York time irrespective of daylight savings (this ...
2
votes
0answers
38 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
44 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
139 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
322 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
39 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 /home/...
2
votes
0answers
207 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
109 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
202 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
545 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
274 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
387 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
12 views

Pulse audio error module-echo-cancel.c not found

I am trying to activate echo cancel module . i added the line load-module module-echo-cancel But when i try to restart now the pulseAudio i get the error saying E: [pulseaudio] module-echo-cancel.c:...
1
vote
0answers
28 views

Upstart services work in SSH session, but not in local terminal session

If I open a local terminal, and attempt to start an upstart service I get this error: service rsync status status: Unknown job: rsync But if I SSH in as the same user, it works fine: service rsync ...
1
vote
0answers
45 views

Log in to ssh slow for one user, but not another

I'm running a server at home with Ubuntu 14.04. I have two users on the machine, say user1 and user2, each able to ssh into the box. While user1 logs in very quickly, user2 takes about 20 seconds to ...
1
vote
0answers
33 views

Syntax for sending notification hint using gdbus or python's dbus module

I'm trying to update a previous notification (which displays the screen's brightness after being changed using a progress bar) with gdbus, as notify-send does not support updating. Previously I use ...
1
vote
0answers
10 views

Slideshow of Image Folder whose files increase

I am trying to stream video from my webcam to a series of images, process these images through a bash script that uses convert (imagemagick) and then output them to a folder. I have been successful ...
1
vote
0answers
14 views

passwd : Authentication token manipulation error (Different than other questions)

I'm trying to change password with single command. The command is, echo -e "current_password\nnew_password\nnew_password" | passwd Here's the Output of the command... Changing password for adarsh. (...
1
vote
0answers
67 views

Launch python script fullscreen on startup (Ubuntu 14.04)

I have a python program that I would like to automatically run after logging in. This shouldn't be much of a problem, however, I would like the terminal to be in fullscreen mode while running the ...
1
vote
0answers
64 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
37 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
38 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
29 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
57 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] [dimo414@dimo414:/...
1
vote
0answers
76 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
124 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
31 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
45 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
24 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
13 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

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 192.168....
1
vote
0answers
42 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 die....
1
vote
0answers
25 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
32 views

Upstart Ruby version issue

I am trying to get Upstart to fire up Sidekiq (https://github.com/mperham/sidekiq/wiki/Deploying-to-Ubuntu). I can manually start it but the same command fails in the Upstart script. I have piped ...
1
vote
0answers
39 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 (...