Tagged Questions

A terminal is an environment for text input/output. Inside the terminal, one runs command-line and text mode programs (including shells).

learn more… | top users | synonyms

1
vote
0answers
16 views

How can I get red letters with tput when I seem to get yellow?

I was using #!/bin/sh if [ $TERM=screen ] then pass_color=' \033[01;32m' fail_color=' \033[01;31m' fi echo "$pass_color green $fail_color red" as in but I was advised to use tput instead, so ...
-2
votes
0answers
31 views

Names of the terminal have changed [on hold]

We are at school at this moment. We are using MacBooks. To some of our classmates, the name present as prompt in the terminal has changed, what could be the problem?
3
votes
1answer
41 views

Run vsim from dmenu — it only works when directly invoked in the terminal

Works: vsim, sh -c vsim Doesn't work: echo "vsim" | sh, echo "vsim" | xargs -I {} sh -c "{}" I want to run ModelSim (vsim) with dmenu, which is triggered using xbindkeys. Details vsim is a ...
2
votes
1answer
43 views

How is the display updated when the erase character is typed in a terminal emulator?

As I understand it, when typing characters in a terminal emulator they appear because they are "echoed". We imagine that the terminal is a separate device communicating with the computer via a two-way ...
2
votes
3answers
41 views

How to open terminal, split to 9 terminals and switch between them using one script?

I would like to open a terminal, split it to lets say 9 parts (3x3) and execute some bash script. But for each terminal part different script. Can this be done using perl, python or even bash? How ...
1
vote
1answer
17 views

Edit/Remove CLI System Notice

I'm wondering how I can change the default system message that shows when on the CLI from Ctrl+Alt+F1. By default it shows the message Welcome to <name> * Documentation: <url> I was ...
2
votes
1answer
42 views

Printing filled shapes in terminal

I'd like to print some shapes filled with the current color or a selected one (e.g. \e[31m) My aim is to print a filled circle (letter o) on the screen but the background will stay as it is. finally ...
2
votes
1answer
33 views

Terminator custom colors overriden by KDE

I've been working on Solarized theme in Terminator (http://gnometerminator.blogspot.fr/p/introduction.html) for about a year on Gnome and have been very satisfied. Yesterday I switched to KDE and the ...
0
votes
0answers
9 views

acoc: availability, similar projects and problems?

I am trying to work on a Linux project out of Linux From Scratch. The outcome is a Linux with dull command line and console. I tried to bring color to terminal and I hit some bits and pieces like ...
1
vote
1answer
40 views

sftp command to get/download .tar.gz file

I thought I was familiar with sftp commands in unix and upto my knowledge the command to used to download a compressed file from the server is sftp get filename.tar.gz But when I tried this ...
2
votes
1answer
43 views

PS1 prompt showing different on local and remote console

This is my PS1 prompt: export PS1="\[\e]0;\u@\h: \w\a\]${debian_chroot:+($debian_chroot)}\[\033[01;35m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ " That shows perfect in remote (SSH) ...
1
vote
2answers
22 views

Is there a shortcut (missing?) to move tab in xfce4 terminal app?

Using xfce4 in a Debian/Linux Jessie/Sid distribution, I am unable to find or set shortcut to move tab position in xfce4 terminal, like Ctrl-Shift-DgDown/PgUp in gnome terminal. This is really ...
3
votes
1answer
22 views

SSH session chain

Suppose I do a SSH session chain within one single unique terminal window (RHEL6) open terminal on localMachine, SSH remote login to server1 from server1, SSH remote login to server2 from server2, ...
0
votes
2answers
27 views

How to launch «gdbserver» in background?

I am communicating with a device via a serial port, and for I am launched «gdbserver» (like gdbserver :2345 myapp) it completely blocks the terminal. Neither an ampersand & symbol, nor ^z ...
0
votes
2answers
42 views

How to get the ~/.bashrc to work in the native terminal application in Centos? [closed]

The problem I had was to get the .bashrc and .bash_profile and/or .profile scripts to execute by default when using the native Gnome terminal application. I found a number of references which told me ...
0
votes
0answers
15 views

Why does xfreerdp say “connected” three times every time?

Every time I use xfreerdp on Mint 17 to connect to a Windows Server 2003 box, it gives the successful "connected" line identically three times before launching the window: $ xfreerdp ...
0
votes
2answers
21 views

One SSH session one script multiple terminals no X [closed]

I have read other posts asking the same question in the answer was, run your script and have it like this: #!/bin/bash xterm -e command The problem is that I don't have X installed on that server, ...
0
votes
0answers
34 views

midnight commander disintegrates after opening video/graphics file

When I press enter in mc on a video file, it will open in mplayer and play. This is configured in /etc/mc/mc.ext: regex/\.([mM][pP]4|[mM]4[vV]|[mM][pP][eE]?[gG])$ Include=video Similarly, it ...
1
vote
0answers
25 views

New terminal with command and continue using it [duplicate]

I would like to open a new terminal and run a command from another terminal. I would like to be able to re-use that terminal after. I've tried: xfce4-terminal --hold -x echo "Hello" & But ...
1
vote
0answers
15 views

Giving a user SFTP access only with access to subdirectory outside of home?

I have user [USER A] account which contains scripts and a downloads folder. I would like to create a new account [USER B] so that the user has read/write (SFTP and not full SSH) access to their home ...
1
vote
2answers
52 views

What can I do if bash stops echoing?

One of the applications I use at work sometimes screws with my bash and so I don't see my own input anymore. I.e. $ echo foo foo $ becomes $ foo $ I incorrectly tried to run stty -echo which ...
0
votes
1answer
33 views

Open a new bash with sudo powers without reentering the password [duplicate]

I find very useful to have more terminal tabs in different current working directories. But if I need sudo privileges I need to reenter the password for every shell. Is there not a way to extend the ...
-2
votes
2answers
185 views

Corresponding 7zip command for unzip -p -a

I have a question regarding unzip command in Unix. As of now my Unix command unzip -p -a is able to zip the file which are lesser in size. But if the file size is larger then the command is not able ...
0
votes
2answers
104 views

What are the meanings of different Unix commands? [closed]

I am running Ubuntu 14.04 on my machine. I am new to Linux and feeling lost when I see different command line commands (or what exactly are they called?) like sudo, apt-get, mkdir, -R, -n etc. while ...
1
vote
1answer
22 views

Shutting down X via terminal

I found that the whole X won't react to anything but I was able to log to terminal by ctrl+alt+F1. Can I reboot X from the command line without rebooting the whole computer?
2
votes
1answer
33 views

Can I add mouse support in less?

I've just discovered that I can add the following lines to ~/.vimrc. set mouse=a :vmap <C-C> "+y This has the effect of being able to select text with the mouse (i.e. in visual mode), and ...
3
votes
1answer
26 views

How do I stop screen from clobbering my titles?

I am using bash and GNU screen on centos7. I notice that if I ssh to another server, change the title (via ctrl+a+A), and log out of the server that my new title gets overwritten by USER@HOST:~. How ...
1
vote
0answers
23 views

Echoing Backspace Characters in the Terminal

I'm working with picocom running inside gnome-terminal. I have local echo switched on inside picocom using the -e option, and when I backspace I can see that caret moves backwards, however the ...
1
vote
1answer
11 views

Locating the terminal currently in use

I need to write a script to test if im using the correct terminal and then print a message This is what i have so far if(???? == dev/pts/1) echo Access Granted. Welcome. endif I dont know how to ...
8
votes
3answers
340 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
1answer
9 views

:bnext not cycling through all buffers in vim

For some reason :bnext is not cycling though all the buffers shown by :buffers I have 5 buffers open but only 3 buffers are visited when I used :bnext repeatedly. How can I cycle through all the ...
0
votes
1answer
90 views

How to update CodeBlocks in Kali Linux?

I installed CodeBlocks on Kali Linux but I got 10.05 version and I want to update it to 13.12, preferably via terminal. Also I would like to know how to update any application this way.
2
votes
1answer
27 views

Replay a screen log file incrementally

I have run some commands in gnu screen and used the C-a H command to record the output to a screenlog.0 file. However now I want to view it. There are loads of terminal escape sequences, so just ...
4
votes
2answers
143 views

Why can't Emacs running in a terminal distinguish Ctrl+; from “;”?

This question arose from my previous question on emacs beta. In short I want to bind C-; to an Emacs functions in a terminal, but it seems that something captures this key before it reaches Emacs: ...
3
votes
1answer
27 views

Check for missing files in two directories and their respective subdirectories

Folder alpha has one subfolder, and files in both root and in subfolder. Folder beta has 25 subfolders with files in them. How would I compare the file contents of alpha and beta, checking for ...
0
votes
1answer
61 views

What is the string “xxx@xxx:~$” in terminal called? [closed]

I don't know or I just forget what is xxx@xxx:~$ called in a terminal terminal? Is there name for it?
3
votes
1answer
209 views

Waching YouTube videos in bash sessions, in ASCII mode

I already found how to watch YouTube videos in terminal, in ASCII mode, but my goal is to watch them in a bash session, without opening a different window. So, supposing I already have a tmux ...
3
votes
0answers
55 views

How to change background color of a pane in tmux?

I would like to change the background color of the inactive panes in tmux to better distinguish between the active pane and inactive panes. Something just a few shades different than the default. How ...
66
votes
3answers
5k views

Watch YouTube videos in terminal

Like the title says it, I'm looking for a way to watch YouTube videos in terminal (not in a browser or another window, but right there, in any bash session). Is there a simple way to do this? I ...
0
votes
1answer
47 views

ANSI escapes in Pash prompt are displayed as garbage in Gnome terminal

I would like to use Pash, a PowerShell implementation for mono on my CentOS box. After compilation I started it and got $ mono Source/PashConsole/bin/Debug/Pash.exe ...
0
votes
1answer
50 views

xfce4 terminal: disable individual shortcut

I would like to disable the Ctrl+Shift+W shortcut which closes the current terminal tab. I am using Vim where Ctrl+R Ctrl+W moves between windows of the vim instance. Sometimes it may happen that the ...
0
votes
0answers
66 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 ...
5
votes
1answer
238 views

combining find with other commands: when to use -exec and when to use pipe? [duplicate]

I've learned to use the find command by itself to find files and directories however when it comes to doing something with the files/folders I'm confused. Given the following command: find . -type f ...
1
vote
0answers
48 views

How can you (programatically) detect the ANSI escape code supported by terminal?

I am playing around with shell scripts that use ANSI codes and found that for one reason or another different escape codes are supported depending on your terminal/os.. In some cases I get a dump of ...
2
votes
1answer
79 views

How to remove specific lines from a file?

I have a file (ip.txt) that contains ip rules /sbin/iptables -A INPUT -p tcp -s 140.237.4.252 -j DROP /sbin/iptables -A INPUT -p tcp -s 143.227.5.22 -j DROP /sbin/iptables -A INPUT -p udp -s ...
3
votes
2answers
39 views

Modular $TERM for different terminal emulators

Is there a way to set different $TERM for different terminal emulators. For example if I am in xterm the $TERM will read xterm-256color, in urxvt urxvt-256color, in sakura xterm-256color and in tmux ...
2
votes
1answer
98 views

To write this Pseudocode with Regex

I am doing a Makefile which I run regularly by Crontab every day at 0230 crontab -e; 30 2 * * * /bin/thePseudocode Python-like Pseudocode directories = ["Cardiology", "Rheumatology", "Surgery"] ...
4
votes
2answers
31 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 { ...
2
votes
1answer
75 views

Why doesn't Ctrl+R do anything in Ubuntu's terminal? [closed]

The keystroke Ctrl+R is important to me because it's the redo command in vim. However, it seems to do nothing at all in Ubuntu's terminal. When I press Ctrl+V and then Ctrl+R, nothing is registered at ...
3
votes
1answer
83 views

Bind Ctrl+Down in Joe on a Linux console

When I want to select a line in joe editor, I can go to the beginning and simply pres CTRL-Down and this will select the line. I can move somewhere ales and copy the line with CTRL-k-c. The key code ...