0
votes
2answers
16 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
36 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
73 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
15 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 ...
0
votes
1answer
30 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
39 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
72 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
137 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
99 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
76 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 ...
17
votes
3answers
333 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
197 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
87 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 ...
1
vote
0answers
109 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
92 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: ...
0
votes
0answers
205 views

How to Get Output of sh Script run by gnome-scheduler [closed]

Currently i'm scheduling some tasks using a sh script and crontab (obviously) It seems like i can only get the script to execute if i choose it to run as an X Application. I've checked up a little on ...
2
votes
2answers
292 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
134 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 ...
1
vote
2answers
1k 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
364 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
61 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 ...
4
votes
2answers
227 views

How do I cut and paste terminal I/O without using the mouse?

I want to search and cut text from command output in a terminal so I can use it in subsequent command line invocations or just in an editor session. Is there any way to easily run a regular ...
4
votes
1answer
276 views

Difference between launching an application from a keyboard shortcut vs the terminal?

What I have observed: When I type emacs in gnome-terminal, it launches in the same environment, with variables set in .bashrc. If I use a keyboard shortcut to the command emacs, it opens in an ...
6
votes
1answer
5k views

Configure gnome-terminal to start bash as a login shell, doesn't read .bashrc

I'm trying to integrate RVM with gnome-terminal. Per default, gnome-terminal does not start bash as a login shell. I enabled run command as a login shell as suggested in this answer about the same ...
1
vote
1answer
799 views

Why we can't run commands with gnome shortcuts?

When I make a custom shortcut with gnome (gnome-control-center keyboard) I can't set it to a command. Why? Example: I can't set a shortcut for sudo apt-get update. Instead I must first invoke a ...
4
votes
1answer
421 views

Cancel Process with Ctrl + C will not work in Terminal

I have just got myself a Ubuntu server and for some reason the Ctrl + C will not kill the process I am running. I have run this command on two terminals Cygwin and putty and logged in using ssh. I ...
0
votes
1answer
56 views

Command who question [duplicate]

Possible Duplicate: What is tty7 in the commandline? Why when I type the command who does it show my_username tty7 my_username pts/0 Shouldn't it just show one? Why am I logged in ...
10
votes
2answers
375 views

Can I create a separate bash history file for each terminal profile?

I use a bash script to start gnome-terminal with multiple tabs, each tab using a different profile, working directory, and in some cases executing a command within the tab. In this situation, I'd ...
11
votes
6answers
543 views

How can I grep through tab completion possibilities?

When I press tab in a console I get this output Display all 2957 possibilities? (y or n) Is there any way to use grep on these 2957 possibilities? I would like to search for all commands with ...
1
vote
1answer
1k views

how to completely reformat a usb using fdisk?

I have a usb drive which I would like to put a linux distribution on but it already has some files on it on /dev/sdc1. Using fdisk, I deleted the first partition and wrote the changes. When I ...
2
votes
3answers
805 views

Is it preferred to avoid use of “exit” in bash scripts as much as possible?

I've been told in php it's preferred to avoid the use of the exit command as much as possible. Is the same true for bash? For example is the following #!/bin/bash if [ -z $1 ]; then echo ...
2
votes
2answers
3k views

How to change directory using script

I have this script #!/bin/bash cd /home/user/somedir pwd it works as expected, but I would like this script to transport me to /home/user/somedir, but I stay in the same dir. How to write script ...
2
votes
2answers
853 views

gnome-terminal and logging

Is there any way to log every that was displayed in gnome-terminal? for example I have a complex command doSomethingThatPrintoutsAlot ; doSomethingThatPrintoutsAlot2 ; doSomethingThatPrintoutsAlot3 ...
9
votes
2answers
4k views

Bash history handling with multiple terminals

I use mainly Terminator, and it's usually opened with 3 split terminal windows. I also use Gnome terminal for various reasons. I'm wondering how is bash history handled in this case as I sometimes ...
4
votes
2answers
395 views

How do I disable global gnome shortcuts in gnome-terminal?

Bash has a myriad of useful shortcuts. For instance Alt+B, which moves the cursor back one word. Only I have assigned this particular combination and a few other shortcuts to do things in gnome. The ...
3
votes
1answer
1k views

Changing shell to zsh broke my terminal

I ran sudo chsh -s /bin/zsh to change my default shell to zsh. I then restarted my computer. When I turned it back on I get just $ as the prompt, so it doesn't look like I even get bash any more. ...
5
votes
2answers
1k views

How to open a file or folder from Terminal with mouse

I'd like to know if there is a way to open a file or a folder from terminal using the mouse? When I wrote a URL LINK in terminal, it's allows me to open that link on my default browser. So I'd like ...
4
votes
2answers
291 views

Combine Two Commands In a Script

I want to put two commands together I need the script to login: ssh root@192.168.0.188 Then I need to the script to run (while logged in to root@192.168.0.188 via ssh ): find ...
2
votes
1answer
1k views

Terminal error messages: bash: /dev/cgroup/cpu/user/2823/tasks: No such file or directory

This is what I get when I start up the terminal: bash: /dev/cgroup/cpu/user/2823/tasks: No such file or directory bash: /dev/cgroup/cpu/user/2823/notify_on_release: No such file or directory bash: ...
2
votes
1answer
3k views

Run simple bash script to start applications at login

I want to run a simple bash script automatically when I log in. For example #!/bin/bash echo "start spotify" gnome-terminal -e spotify --title spotify When I run this command, one gnome-terminal ...
0
votes
4answers
2k views

Pipe results of locate into rm

I tried running locate *.orig | xargs rm but it said No such file or directory I've seen ways to do it with find but locate returns the full path to the object so it should be possible
2
votes
3answers
667 views

Gnome-terminal does not remember commands

It's well known that if you push «up» and «down» keys in gnome-terminal, you can move on used commands. It only works for the commands wich are introduced before closing the window. When I close it, ...
10
votes
5answers
8k views

How to start a terminal with certain text already input on the command-line?

Rather than rephrasing my question, let me describe to you the desired user-case: I create a short shell-script to run command "gnome-terminal --someoptionflagname 'my text to be posted'", and ...