-1
votes
0answers
33 views

Practical usage of pushd, popd, man, less, and cat in bash [on hold]

So i am learning more advanced usages of bash/cmdline due to work teaching me some programming and im trying to wrap my head around some of the following bash cmd's and their purposes. I have been ...
7
votes
3answers
239 views

How can a Bash script tell how it was run?

I have a Bash script I was trying to make to help me run a rather complex command with small changes that it would ask me about through echo and read. I have found solutions to force it to run a ...
0
votes
0answers
49 views

Can call login command from terminal

I want to create a user using useradd from root in my terminal window, after it I call passwd to set user's password. So I cant call login username because when I call it from terminal it closes ...
4
votes
2answers
28 views

Long start time of MC due to bash function

I have next bash function to ensure new-lines after commands: user at terra in ~ $ echo "m" m user at terra in ~ $ echo -n "m" m↵ And the function itself in a .bashrc: function prompt_command { ...
16
votes
2answers
879 views

Are the terminal color escape sequences defined anywhere for bash?

I've used every so often colors in Bash scripting (mostly on CentOS), but to make their usage more convinient I end up redefining variables to color values: local GRAY="\[\033[1;30m\]" local ...
2
votes
2answers
38 views

Non-printing escape sequence: when?

Recently, I have been playing around a lot with color in the terminal and, therefore, with escape sequences, too. I've read the relevant parts of the Bash manpage along with numerous helpful pages on ...
0
votes
1answer
50 views

How do I switch from bash to zsh? [duplicate]

I can start zsh with zsh. How can I make it be the default for new terminal windows? Will it be ok to copy my .bashrc to .zshrc to get things like my customized PS1 prompt.
1
vote
2answers
470 views

Command not found problem in Linux-Ubuntu terminal

My friend is having problem in trying to call make to compile an application which both me and a second friend have previously successfully compiled. The file uses a "linux-devkit" pack that possess ...
10
votes
1answer
275 views

How to start XTerm with prompt at the bottom?

When starting XTerm the prompt starts at the first line of the terminal. When running commands the prompt moves down until it reaches the bottom, and from then on it stays there (not even Shift-Page ...
1
vote
0answers
124 views

Load a background image or set the background color if Konsole/Shell is running SSH

I want to set my laptop to load an image in the shell's background or set the background color to red if I'm connected via SSH. How can this be done? With a bash function in .bashrc? I have: Set the ...
0
votes
0answers
56 views

Terminal freezes after using tar or gz

On Linux within bash the Pseudo Terminal window (terminator) as well as the Terminal itself "freezes" when trying to use autocomplete (TAB) as well as after getting an error message using gzip and ...
0
votes
0answers
13 views

Determin if the currnet terminal has a dark or light theme [duplicate]

I have several (Bash) scripts that uses ASCII color codes. They look good on my dark themed terminal, however on my colleagues light themed terminal the colors I selected don't look that good. Is ...
0
votes
1answer
120 views

Download yad with bash script

i'm building a simple deb package (single binary) for a little project i've been working on. Now I want to build a nice interface around it and used zenity for a couple of times, but this time I ...
0
votes
0answers
49 views

X11 Path Issues and Confusion for Installed Packages

I am using GMT (generic mapping tools) and SAC (Seismic Analysis Code), and each use X11 (or XQuartz on 10.9.4 Mavericks) to display graphics. When I want to display postscript using ghostview, I get ...
1
vote
0answers
40 views

Using X11 Displays through Terminal.app commands : generic mapping tools

I am trying to figure out why I can't use ghostscript or ghostview (or any other X11 applications) when I try to call them in the Terminal. I am using bash, and I also used Fink to get the packages I ...
1
vote
1answer
60 views

Control + L not clearing screen

When I try to clear my terminal screen on OSX: computer@ ~ () $ ^L And when I hit Enter after that it just shows: -bash: : command not found Any ideas on how this happens? My .bash_profile, ...
2
votes
0answers
19 views

Running Custom commands in a Terminal Application [duplicate]

I'm running a terminal application in /dev/pts/X terminal that has its own console as:         What I need is to run commands specific to this application but from ...
14
votes
3answers
656 views

Using variables to store terminal color codes for PS1?

In my .bashrc, I use ANSI terminal color codes to colorize various bits. It looks like this: PS1='\u@\h:\w\[\033[33m\]$(virtual_env)\[\033[32m\]$(git_branch)\[\033[0m\]$ ' where virtual_env and ...
15
votes
2answers
493 views

How do I start all shell sessions in a directory other than $HOME?

When I open my non-login shell in Ubuntu, my present working directory is /home/user_name (my $HOME environment variable), but I want to change this such that when I start my terminal I am in some ...
0
votes
2answers
64 views

Why do I have to execute bash programs with ./? [duplicate]

Why is it that some bash programs will only run on my system when I type ./ before their name? An example: In my [...]/android/sdk folders I have to execute adb like this: ./adb devices Why not ...
8
votes
2answers
516 views

disable CTRL-D window close in terminator (terminal emulator)

I am often logged in through multiple SSH sessions. To logout from my sessions, I press CTRL+d, until I am back on my local machine. However, sometimes I press once too many, and my terminal exits. ...
6
votes
2answers
245 views

if statement in .bashrc not working correctly

I set up .bashrc to show a long prompt if the terminal is at least 80 characters wide. Otherwise it shows a degraded, smaller prompt. I use an if statement to achieve this: dp_smaller_than=80 if [ ...
2
votes
1answer
4k views

set gnome terminal background/text color from bash script

I would like to setup my gnome terminal's background(#002b36) and foreground color in ubuntu 13, using bash script. I tried gconftool but couldn't succeed. GCONFTOOL-2(1) User ...
1
vote
1answer
216 views

Why CTRL+L in Terminal won't clear screen like cls in Powershell

I compared the CTRL+L in the Linux Debian terminal and the cls in Powershell. When I pressed CTRL+L, it doesn't really clear the screen, it just prints newlines a few times. But when I type cls in ...
2
votes
2answers
67 views

What is bitwise.c~? [duplicate]

I am new to Linux Debian and I am trying to made a program to experiment bitwise operators. The name of the program is bitwise.c Before compiling the program, I decided to look at the directory just ...
1
vote
4answers
120 views

How to set the process won't be terminated when the terminal stops

[Edit] Make it simple. I invoked java xxx... on Machine A using putty to connect from Machine B. However I cannot reach Machine B. How can I connect Machine A from Machine C to set the running ...
2
votes
1answer
149 views

bash not reading $TERMINFO on login (over SSH)

I have a OpenVZ Fedora 20 VPS that when I SSH into, my termcap file stored in $XDG_DATA_HOME/terminfo/x/xterm-termite, isn't being read, despite having TERMINFO=$XDG_DATA_HOME/terminfo set. If I ...
0
votes
1answer
151 views

Search for pattern across multiple files and replace a sub-part in all occurences

I am helping a friend with her thesis written in LaTeX and I need a quick solution for a "search and replace". Using a terminal in Linux, how can I find the following pattern: \caption{*\cite{*}} ...
1
vote
1answer
369 views

Terminal, Prompt changed to “-Bash-4.2” and colors lost

Usually my terminal prompt was username place$ now it only shows bash-4.2$ and all the color settings have been lost (on the terminal profile I have the same color scheme, but it just don't show ...
6
votes
2answers
1k views

what will ¬ do in bash?

While wanting to start gitg as backgrounded through writing gitg & I accidentally typed gitg ¬. This did not cause an error, instead I got with a later command in the same terminal (translated): ...
0
votes
0answers
27 views

Convert rgba color value to a Terminal supported color

Randomly I will take the following example: rgba(122, 143, 186, 0.54) How can I convert this color to the closest Terminal supported color?
7
votes
1answer
398 views

Suse 11 vs. Suse 10 difference impacting terminal colors?

I have my dotfiles versioned on github (shameless fork of other people's fine work). At work, I have them on a central linux server (SuSE Enterprise Linux 10). I rsync them from a central management ...
1
vote
1answer
113 views

Window title in X shows wrong application name

I am using LXDE environment in Debian, but I think my question is general. When I have a window opened (i.e. terminal emulator running bash) the window has a window title with the text /bin/bash. When ...
2
votes
4answers
178 views

How Can I Change the Default arguments to gcc When I run Make “filename”

Forgive me if I posted this in the wrong Stack. Every time I run make for a file without any Makefiles in the directory, make still works and compiles the source code but only with the arguments: gcc ...
-2
votes
2answers
298 views

Run command automatically after login?

Another quick question. I have installed f.lux on Ubuntu 12.04, however the program refuses to work unless I run a command xflux -l [longitude] -g [latitute] -k [temperature] So I've created an ...
11
votes
4answers
2k views

What does a bash sequence '\033[999D' mean and where is it explained?

I have come across bash sequences such as \033[999D and \033[2K\r which are used to do some manipulation on a printout on a terminal. But what do these sequences mean? Where can I find a list/summary ...
8
votes
3answers
1k views

Why 'echo $0' gives different result for two different terminals?

I opened a terminal on Ubuntu using Ctrl+Alt+T and a different terminal by going to a directory and then right clicking and choosing "Open in Terminal". I did an echo $0 in both cases. In the ...
0
votes
1answer
121 views

Bash script for copying text currently entered to prompt

I'm trying to minimize using of mouse. Copying text in terminal is the mostly inconvenient activity for mouse avoiding. Now, tmux helping me to obtain this purpose. However, I regularly needs to copy ...
0
votes
1answer
65 views

Zenity refuses to work in background

I'm trying to create a background bash script which creates a popup in certain circumstances, however, my code only works when run manually in a terminal (e.g. not in the background). I've tried ...
2
votes
1answer
192 views

arrow keys are not working with terminal server telnet (termnetd) session

I am using terminal server package termnetd 3.2, which reads serial port and gives output on telnet port. I logged into terminal server port, every thing works fine except the arrow keys, Home and End ...
1
vote
2answers
417 views

Keeping xterm terminal alive on crunchbang linux debian wheezy

I like to keep a number of terminals open at different locations on my development VM. For this I use terminator because I got a big screen and I can divide the terminals anyway I want. But after ...
0
votes
1answer
54 views

Different representation of bash in 'ps -f' command [duplicate]

I have two bash running; one is Terminal application that runs bash, the other one is xterm application that runs bash. With ps -f, I have -bash one, and bash at the other. What makes this ...
0
votes
3answers
463 views

Shell script testing through terminal simulation

I am developing a generic bash script which could be executed in different distro. I have only a CentOS virtual machine and I would be interested to test my script on a virtual terminal (online or ...
9
votes
2answers
692 views

Alt-Left to skip words does not work in terminal emulators

On a Debian Wheezy machine at previous job, I got used to Alt+Left and Alt+Right to skip between words on active command-line (in bash). However, since at home I have upgraded to Jessie (Debian 8.0, ...
11
votes
1answer
436 views

Clear old prompt lines in bash to save scroll space

My terminal theme used to be like this, But I thought the prompt wasted so much space. And later I got an idea that I could clean the prompt every time I ran a command. I was using bash, one of ...
1
vote
1answer
99 views

Simulating READLINE_LINE in Bash < 4.0

I am trying to make some of my code bash 3.X compatible and I have a key-binding that utilizes READLINE_LINE inside its callback function. 3.0 versions of Bash don't supply the READLINE_LINE, so I ...
3
votes
1answer
227 views

Using a variable inside a sequence of commands in bash to supplement an existing string - syntax error or flawed design?

I'm using the following sequence of commands in my .bashrc file to alter the appearance of my linux terminal. It fills the screen line by line with a pattern made out of characters. There is no ...
6
votes
2answers
445 views

issue with terminal/prompt

I have an issue where if I type in very long commands in bash the terminal will not render what I'm typing correctly. I'd expect that if I had a command like the following: username@someserver ...
6
votes
4answers
246 views

Prevent terminal from displaying previously executed command

I have a script that allows me to log random thoughts while working on a project. In the terminal I would add a new log entry by running $ @ "some random thought" where @ is just an alias for my ...
13
votes
2answers
629 views

Can the empty spaces/background in a terminal be replaced with a random(but pretty) pattern of ASCII characters?

Context and Question There are many ways to colorize the terminal and shell environment. The output of individual commands, such as ls and grep, can also be colorized. Not directly related but ...