0
votes
2answers
35 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
127 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
317 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 ...
8
votes
2answers
336 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
35 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
48 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
1answer
102 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
33 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
38 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 ...
1
vote
1answer
62 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
33 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
85 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
86 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
250 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
314 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
725 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.
1
vote
2answers
437 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. ...
11
votes
1answer
482 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
462 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
107 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 ". ...
2
votes
1answer
775 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
240 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
122 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
612 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 ...
0
votes
0answers
288 views

zsh crashed with rvm and bash_completion

I have installed zsh to my gnome terminal(Ubuntu 12.04). And they crashed on: /home/xdsemx/.rvmrc:13: command not found: shopt /home/xdsemx/.rvmrc:21: command not found: shopt ...
5
votes
1answer
202 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
98 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
365 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
463 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
54 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
480 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
311 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
185 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
159 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
167 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
207 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
292 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
106 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 ...
18
votes
3answers
3k 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)?
3
votes
1answer
3k 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
253 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
201 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
199 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
456 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.
4
votes
1answer
208 views

Adding new commands

I have added some new commands to ~/.bash_profile but every time I start a new terminal session, it seems to forget these commands and I have to do . ~/.bash_profile again. Is there a way to avoid ...
4
votes
2answers
5k views

How to write Bash script What is the command to open a terminal with two different tabed terminals and execute some commands separately tabs?

How to write Bash script to open a terminal with two tabs, and execute commands in both tabs? for instance: tab 1 opens skype tab 2 opens chromium-browser In the end, I want one more thing: write a ...
8
votes
6answers
724 views

How to save GNOME Terminal contents with ANSI escape codes?

VT100 terminals have a relatively simple way to save terminal contents with escape codes to a file using Meta-p: XTerm.VT100.printAttributes: 2 XTerm.VT100.printerCommand: cat - > file ...
1
vote
1answer
74 views

Graphical terminal misinterpreting input

I've been having this weird problem with typing commands into gnome-terminal. If the command takes up multiple screen lines and I use any backspaces and the stars are in proper alignment the command ...