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

learn more… | top users | synonyms (1)

9
votes
0answers
102 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 ...
5
votes
0answers
58 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
53 views

How to catch the command failure events in ubuntu?

I am trying to execute the script whenever the command fails. We all know that if the command is failed $? value will not be equal to 0.It gives the value 127 if command fails. The script is ...
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
22 views

How do I make the bash terminal use my “home” custom Palette color scheme over an ssh connection?

There are colors when I ls when connected to the remote system using xterm-256color, but they are not the palette colors I have selected in my profile. I had this working before, but recently had to ...
3
votes
0answers
47 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
55 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
38 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
85 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
86 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
161 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
435 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

scroll lock modifier for arrow keys

Most laptops these days have the pgup/pgdn/home/end keys as fn overlays of the arrow keys. It has always been a minor annoyance that the fn key is on the other side of the keyboard, making one-handed ...
2
votes
0answers
36 views

How to use CTRL+HOME in the terminal?

When I use emacs in graphic mode, I can go to the beginning of the buffer with Ctrl+Home. When in bash, emacs won't recognize the combination and only sees the Home. I checked like here and, in ...
2
votes
0answers
33 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
40 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
35 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
28 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
40 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
45 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
146 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
345 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
40 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
212 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
112 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
208 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
572 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
279 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
398 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
25 views

How to prevent command execution edited with fc

I have FCEDIT set to vim. If I call fc command it will open vim with temporary file and contents of that file will be the last executed command from history. The problem is that even if I exit ...
1
vote
0answers
41 views

Error Trying to install Teamspeak 3 client in Ubuntu 16.04: No such file or directory

Ok for starters: I'm running Ubuntu 16.04 LTS 64 bit. I downloaded TeamSpeak3-Client-linux_amd64-3.0.19.3.run Used the GUI to allow for executing the file as a program (I first tried changing it in ...
1
vote
0answers
25 views

NoMachine script to automatically lock the screensaver when disconnecting not working

NoMachine provides this resource for adding a script to lock the system following a disconnect. However, this doesn't seem to work under any circumstances using any of the methods provided for any ...
1
vote
0answers
22 views

Autocomplete SSH bash: export: `-a': not a valid identifier

When I try to autocomplete using double TAB, I get this error: bash: export: `-a': not a valid identifier This mainly happens when trying to autocomplete ssh routes. However sometimes it fails to ...
1
vote
0answers
18 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
31 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
53 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
53 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
13 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
15 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
90 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
67 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
44 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
45 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
30 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
61 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
86 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 ...