0
votes
2answers
30 views

Why doesn't this second nohup command run?

Everything runs except the last line: #!/bin/bash xinput set-prop 11 "Device Accel Profile" -1 xinput set-prop 11 "Device Accel Velocity Scaling" 1 xinput set-prop 11 "Device Accel Constant ...
2
votes
2answers
105 views

Opening multiple terminal tabs and running command

I need to open multiple terminal tabs, give them titles, go to a directory, and make each tab run a command. I am new to Linux and shell scripting, after searching online and checking some solutions, ...
1
vote
1answer
110 views

text is not appearing at cursor in bash, can I reset it somehow?

This happens sometimes if the VM bumps up against upper limits of memory and has to hit swap heavily for extended periods (a few minutes or more). When this happens and I type asdf at the prompt it ...
30
votes
6answers
2k views

Shortcut to clear command line terminal [duplicate]

Is there a shortcut to clear the command line when typing in it instead of keeping backspace pressed for a few long seconds? I ask because I regularly use the Tab key to automatically fill in file ...
0
votes
2answers
50 views

Why is this command starting endless terminals and how to make it work?

#!/bin/bash gnome-terminal --command='/home/user23/bin/n-youtube-dl "$1"' I want to pass the argument passed to this script to the other script started in the terminal. But this starts endless gnome ...
6
votes
2answers
153 views

Is there a way to shorten(not remove) the path displayed in the terminal by an alias

I want something like this: "vivek@grishma:~/xxx/yyy/zzz/src$" to be shown as "vivek@grishma:datasource$" where I would somehow have predefined "datasource" to be an alias for the long path above. ...
5
votes
3answers
483 views

Bash - executing commands in current shell

I was reading the O'Reilly book "Unix in a nutshell", and I saw there that commands can be grouped and executed in the current shell using the following format: { cmd1 ; cmd2 } I didn't understand ...
9
votes
2answers
464 views

How to display the name of file which I am currently editing with vim on terminal title?

I am editing multiple files located in the same folder, in multiple tabs, on a single terminal. pwd(directory in which I am currently working) is displayed on the top of the heading of the terminal, ...
1
vote
3answers
44 views

Terminating the Terminal process for a particular outcome

for example consider the following situation:: I need to print some numbers randomly one after the other with a time interval of 5 seconds between each, and I need to terminate the terminal process ...
0
votes
2answers
109 views

unable to type commands in terminal

I was install mpi and I have given the path for it in the .bashrc and I closed my terminal and after some time again I opened terminal it's showing following error in the very first line followed by ...
4
votes
2answers
414 views

terminal closes immediately after open

I rebooted recently, and now terminal fails to work. If I click the terminal shortcut or use Guake or ctrl-alt-T, the terminal opens briefly with no prompt, then immediately closes again. I installed ...
0
votes
2answers
46 views

Read file over HTTP in Shell

I want to know if it is possible to read files over HTTP like: $ cat http://example.com/archive/myhouse.txt Is it possible? And is there any extra or better ways to do it? Thanks!
0
votes
1answer
63 views

rvm how turn it on always when we open terminal in ubuntu 13.10

I am new user of 13.10 ubuntu I am facing one problem when want to install rvm, even though it is already install and using it on virtualt box. Problem is that when i start terminal and put to check ...
7
votes
1answer
114 views

How to lists different image-formats recursively in a tree?

How would I efficiently go about searching for .png | .svg | .xpm image-files in a complex and recursively structured hierarchy in one query, using terminal (and if possible | (pipe) tree in the same ...
1
vote
1answer
125 views

bash_profile colors

I have found these settings in many bash profile files and I don't know what they mean or do. Can anybody explain them? Thanks! # Terminal colors NM="\[\033[0;38m\]" #means no background and white ...
0
votes
1answer
41 views

Terminal does not return when typing

I know this is weird but out of the blue, today I copied a long command into the terminal and instead of word wrapping as its supposed to, it started overwriting the same line. The command executed ...
3
votes
2answers
103 views

Terminal closes after entering a non-existing command

This seems to be a bug, but i'm not sure which package to report it on. Try this: Open gnome-terminal shift-ctrl-t (open a new tab) type: foo foo & The tab is closed Correct behavior would be ...
0
votes
3answers
117 views

How can I change my command line (bash) prompt?

i'm new to ubuntu .presently i'm using ubuntu 12.04 version.I want to know how to change terminal's displaying text. currently my terminal displaying the text.. narasimha@narasimha:~$ how can i ...
2
votes
5answers
462 views

How to run application from terminal forever? [duplicate]

I start jenkins web server using command java -jar jenkins.war. It works great. When I close terminal the application stops. How to make it run even if I close terminal session ?
2
votes
3answers
571 views

Bash History not containing all history and blank after reboot, how to resolve?

I've recently upgraded from 13.04 to 13.10 and realized my terminal bash history is not surviving reboots. cat ~/.bash_history gave me a permissions denied error. I, possibly unnecessarily or ...
1
vote
1answer
1k views

Error when I open the terminal: `bash: /opt/ros/hydro/setup.bash: No such file or directory`

I've uninstalled ROS with: sudo apt-get purge ros-* Then when I open terminal I get this message. I have no idea how to solve it. P.S. Because of the error I can't install ROS again.
2
votes
2answers
1k views

How to configure up arrow to search the history? [duplicate]

How can I configure the ↑ key to get commands from history? Example: If I type p and press ↑ then it should only show commands in the history starting with "p" like python, php, perl, etc. ...
12
votes
1answer
519 views

Opening a file from terminal only by typing its name

I know that xdg-open will open from terminal a file in the user's preferred application like this: xdg-open filename But I wonder how can I open a file from the current directory in its default ...
2
votes
2answers
994 views

How to launch a terminal from script and another script to run in terminal

I run a script when I log in that basically looks like this: chromium-browser & xchat & cd ~/randomdir && gnome-terminal & qbittorrent & On the third line (cd ~/randomdir ...
0
votes
2answers
166 views

Can I use source test1.sh with gnome-terminal -x?

I am executing 2 shell scripts from the main using source. main.sh: #/bin/sh a=1 b=2 c=3 gnome-terminal -x sh -c ". ./test1.sh|less" (note the source ".") gnome-terminal -x sh -c ". ...
3
votes
1answer
4k views

The fastest way to create a file from a terminal

What is the simplest way to create a file using a command-line? Usually I use: touch filename But is this the simplest/fastest way?
0
votes
2answers
272 views

How to move between 2 very different directories in the terminal?

When I move files with a GUI file manager, I navigate to the source and destination directory in 2 different windows, and then drag and drop. Is there a way to do this in BASH (move a file to a ...
1
vote
1answer
133 views

Bring all open terminal windows forward using a script

I am trying to use a script suggested for an answer I asked earlier, however I am having trouble getting it to work. The script should bring all instances of a program (whose name is passed as an ...
2
votes
1answer
851 views

Quit all instances of `gnome-terminal` via a command

This is half "this'd be useful for me" and half "hobby project" - I was wondering if it's possible to send a command via a gnome-terminal that will quit all instances of a program without using ...
5
votes
1answer
248 views

Bind byobu window to Ctrl+Shift+T shortcut

Ctrl+Shift+T shortcut runs the gnome-terminal by default. I have installed byobu, and I want this shortcut to open the latest used byobu session. When pressed multiple times, I should still have just ...
2
votes
1answer
116 views

Function to change title doesn't work when run in script

I've got a simple command that sets the term title: # Allow the user to set the title. function title { PROMPT_COMMAND="echo -ne \"\033]0;$1 ($PWD)\007\"" } export -f title I'd like to access ...
3
votes
1answer
427 views

Arrow keys in Terminal shortcut don't work

I am new to Linux and am using Ubuntu 13.04. I have a C++ program named "dictionary" (full path: /home/anmol/Desktop/c++/dictionary), which I compiled with Code::Blocks IDE (and GCC version 4.7.3). ...
3
votes
2answers
683 views

How can I make a list with most used commands in terminal?

How can I make a list with most used commands in terminal? I know that this question may be unuseful for any future proposals for some of us, but even like this, the list can be useful when we don't ...
2
votes
1answer
64 views

cd to target folder after copying?

This could be quite a simple one, but I can't find any answer for it. If I am in a terminal and use the cp command, is there a way of instantly cding to the target directory? For example, is there ...
0
votes
2answers
586 views

open bash terminal in a specific directory

How can I config bash - I'm using Gnome Terminal - to open the shell into a specific directory? I know I can insert a cd /directory into .bashrc, but that isn't good enough because if I use Open ...
2
votes
1answer
417 views

How do I open screen with many tabs to execute some commands within each one

How to open screen with many tabs? How can I execute some commands within each tab, plus giving the main screen window a name to call it again later to execute other commands? For example, I have a ...
1
vote
3answers
209 views

How to execute some commands while background task of bash script is about to be killed

In case i run a script in terminal and it contains a background job , in case the user close the terminal as i guess the script with his all back ground tasks will be dead , i want something like an ...
0
votes
1answer
194 views

Automatically load cdc-acm at boot

Hi I am trying to figure out how I can load the cdc-acm module at boot. I tried this command: sudo bash -c echo hoi >> /etc/modules but I get this: bash: /etc/modules: Permission denied ...
1
vote
1answer
232 views

special character and parsing BUG - Bashscript

Failed to parse arguments: Argument to "--command/-e" is not a valid command: Text ended before matching quote was found for ". (The text was '"cpulimit') this is what i get when i run the following ...
0
votes
1answer
240 views

How to open many-tabbed Gnome terminal as one windown instead of many independent windows

aa=$( ps -e | grep "chrome" | awk '{print $1;}') for i in $aa do gnome-terminal --tab -e" sudo cpulimit -p $i -l 35 " done i want to open one gnome window before the execution of the ...
0
votes
1answer
333 views

Bash - How to execute a Terminal command without opening the Terminal GUI

I am trying to execute a Terminal command in bash, but I don't want the Terminal GUI to open. Here is my code: #!/bin/bash gnome-terminal -e "java ABC" Any suggestions? Thanks!
2
votes
1answer
1k views

running gnome-terminal with no window border on startup in xubuntu 12.10

I created a script to launch a session of gnome-terminal when I log into xubuntu. I specifically wanted it in a specific position on the window, and with no window borders (surprisingly, there's no ...
0
votes
1answer
2k views

Open file with terminal and close terminal afterwards

I want to open a file using the terminal on ubuntu. To have it independent from the terminal, I use gnome-open: gnome-open text.pdf And since I'm lazy, I also have this alias in my .bashrc: alias ...
1
vote
1answer
111 views

How to use ' and " (quotes) as an argument

Intro In a script I want to run a command in a separate window so that output of the command will show in a new window (which is an output stream like top) and they do not interfere each other. For ...
19
votes
3answers
5k views

Switch terminal output language from native language to english

How can I switch the terminal output language from my native language to English, so I can post my Ask Ubuntu question with English terminal output (error messages)?
4
votes
2answers
4k views

How to save terminal history manually?

It's my understanding that the history file is updated when the terminal exits. But sometimes my computer crashes out, and the terminal doesn't exit cleanly, and then I lose those commands from my ...
1
vote
1answer
287 views

Unable to login to bash after editing .bash_profile

I've fiddled around with my .profile and .bash_profile to speed up some stuff: PATH=$PATH:/home/yoshi/android-sdk-linux/platform-tools First I appended the line to my .profile and perfect. Then I've ...
2
votes
1answer
223 views

How can I test if a variable matches another value and move to another function?

I am writing a script where I store a predetermined line of text into a string (we will call abc). I am storing the results from grep -iqs $USER file (we will call def) into another string. How can ...
1
vote
1answer
241 views

how to remove environment variables set for QSTK?

I am new to Ubuntu, and I'm having trouble with the terminal application. Every time I open it this message appears: "bash: /home/xxxxx/.bashrc: line 1: syntax error near unexpected token `(' bash: ...
2
votes
2answers
512 views

How to reset bash keyboard shortcuts?

How can I reset the bash shell's Ctrl + C keyboard shortcut? I changed it a few months ago and can't seem to recover it.