New answers tagged

1

If you don't want to change the directory permanently, you can try something like this $ sh -c "cd '$mydir' && makepkg -fsri" This will create a new shell process to do the work and changes to the shell environment, including the working directory will happen for that process only. Be careful of correctly nesting quotes to handle spaces in bash ...


-1

It's not that UNIX formats everything the same. Any command you run can also write formatted output. When you run for instance ./gradlew appRun, just redirect the output (both the error stream and the standard output stream to a file) ./gradlew appRun &> mylogfile.log


1

You can no longer access those lines in mate-terminal. Increasing the number of scrollback lines doesn't help either: The terminal doesn't remember all the lines and reveals only the configured amount; it remembers only the configured amount. That being said, if the given terminal tab is still open, there's still some chance that the data wasn't actually ...


0

It works if you disable the menu in the settings or by pressing Ctrl+Shift+M.


4

Either export the variable so the subshell that runs the script sees its new value export PS3='>' ./select.sh or set it only for the script PS3='>' ./select.sh


2

Since you’re using Debian, your ps supports combined so-called “BSD-style” and “Unix-style” options, you can use the n option which uses numbers for WCHAN and USER: ps n -Af


1

I’m using this patch: --- a/src/vteseq.cc 2020-01-25 21:39:47.737317745 +0100 +++ b/src/vteseq.cc 2020-01-25 21:40:12.811424242 +0100 @@ -462,18 +462,7 @@ void Terminal::update_mouse_protocol() noexcept { - if (m_modes_private.XTERM_MOUSE_ANY_EVENT()) - m_mouse_tracking_mode = MOUSE_TRACKING_ALL_MOTION_TRACKING; - else if (...


2

With GNU findutils, and a shell with support for process substitution (ksh, zsh, bash), you can do: xargs -r0a <(locate -0 php.ini) vi The idea being to pass the file list via a -a filename rather than stdin. Using -0 makes sure it works regardless of what characters or non-characters the file names may contain. With zsh, you could do: vi ${(0)"$(...


0

Save it in a variable. red='\e[31m' reset='\033[0m' printf '%b %b' "$red"123 "$reset"456


1

Let's clear up some basic errors: The signal is not queued. Queueing is a specific thing when it comes to signals, and does not happen with this particular signal. The signal is masked. This particular signal is not SIGSTOP. The susp character causes the line discipline to send a SIGTSTP. As with so many things that contradict the 1980s view of the ...


0

@Patrick's IFS hack is only necessary for dumb shells like bash and zsh. fish splits the string on newlines by default. $ vim (locate php.ini) And God help us all if a single one of us actually has a file with a newline in its name. After 17 years using Linux, I haven't seen it even once. I'd only bother supporting filenames with newlines in them for ...


1

What you describe sounds a bit like a notebook, recently popular for interactive programming e.g. in Python. Jupyter Notebook supports quite a number of different kernels, and there are even two for bash, calysto_bash and bash_kernel. The development of Jupyter Notebook started with IPython, an enhanced Python shell that runs in a standard terminal, but in ...


2

As mentioned in the comments it must be under /media directory but it isn't, cause it's not mounted. It's possible to mount USB drive in the following way: sudo mkdir /media/usb-drive sudo mount /dev/sdb1 /media/usb-drive/


1

To launch a specific website like google.com : firefox google.com To manage your favorites from the terminal, you need an additional CLI tools, e,g: buku buku - Bookmark manager like a text-based mini-web buku is a command-line utility to store, tag, search and organize bookmarks. You can import your bookmarks through: buku -i bookmarks.html To ...


4

As mentionned in toe documentation (man 1 toe), it will list you the terminfo entries on the toe(1) General Commands Manual toe(1) NAME toe - table of (terminfo) entries SYNOPSIS toe [-v[n]] [-ahsuUV] file... DESCRIPTION With no options, toe lists all available terminal types by primary name ...


5

toe lists the terminal descriptions known to Terminfo on the system; by default it only lists descriptions stored in its default directory, rather than all the locations it knows about (e.g. /etc/terminfo on Debian-based systems), so toe often produces no output. To see something useful, run toe -ha This will list all the Terminfo database entries, with ...


0

I have solved with: if [ -f /etc/skel/.bashrc ]; then . /etc/skel/.bashrc; fi at the first line.


2

man bash explains it: Aliases are not expanded when the shell is not interactive, unless the expand_aliases shell option is set using shopt Enabling the option in a script is not common, though. Declare a function instead.


1

The .bashrc file is really intended to be sourced in interactive shells - to allow it to be source in a non-interactive environment such as bash -c or su -c without error, it's not uncommon to add an "interactivity test" somewhere near the top of the file. For example, the start of the Ubuntu default .bashrc file (copied from /etc/skel on account creation) ...


0

Perhaps you meant the MS-DOS command prompt; in that case the following might be what you're looking for: Stack Overflow: which font is used in MS-DOS?


1

Well, I managed to fix the issue by asking the developers of Windows New Terminal about why I'm unable to paste Unicode over SSH connection. And i got the following response: The version of OpenSSH-Win32 that’s available today doesn’t support receiving Unicode. That has been fixed pending release! So I've just wrote it to online editor and downloaded it ...


0

I have just tired this in konsole( the KDE terminal). It showed the flames as a box (indicating no character in the font). I then went to the font configuration for the terminal, almost all fonts show a box, a space, or a hexcode character. One font (that had the name emoji in the name) showed the flames.


-1

I tried it with printf and it worked: Try: printf 🔥 >> file.txt You could also do an alias: # $1 = File, $2 = Emoji alias addEmoji="printf $2 >> $1" Mind I switched the arguments around because I had some issues displaying after I pasted the Emoji. If you want to play around with Unicode some more, I recommend this: https://stackoverflow....


1

Assuming that you are not using a real hardware terminal, as mentioned in the answer(s) to your linked question, there is probably no need to worry about it. Note that rather than being an alias, typically the reset command starts out as a symlink to the desired utility; then that utility's executable detects which name you ran it with and changes its ...


1

This is probably a baud rate error. You don't say whether this happens while you're logged in, or if the console is waiting in the login prompt. By default agetty is started with option 115200,38400,9600 (see /lib/systemd/system/serial-getty@.service). When agetty receives a break on the serial line, it will switch to the next baudrate circularly. When you ...


0

I found this terminal which is based on mintty, and escape sequence for changing window title works correctly. wsl-terminal


0

I access a container via an Ubuntu 16.04 LTS terminal, from a Windows machine. I needed to use space (when inside a bash session on a Docker container running Linux Ubuntu).


1

The command I had seen was tput. One could use it ± as in my question: echo -n "$(tput home)" But of course that particular example is redundant; it's wasteful to run the stdout of tput into an argument that echo will write to its own stdout. It might make a little more sense if you needed to generate a string of echo -n "$(tput thing1)some text$(tput ...


0

If the remote server is Debian, put the below code at end of ~/.bashrc PROMPT_COMMAND='echo -ne "\033]0;${USER}: ${PWD}\007"'


0

So, if anyone is still interested in finding a fix; for those who still have the same problem: I was able to get it working nicely without doing much. I had forgotten about this matter and stopped using tmux for a long time until I decided to ask about it on a Linux group on Telegram and a cool lad helped me with the issue. We've come up to this, on the ...


7

Check "script". From "man script": script makes a typescript of everything printed on your terminal. It is useful for students who need a hardcopy record of an interactive session as proof of an assignment, as the typescript file can be printed out later with lpr(1). If the argument file is given, script saves all dialogue in file. If no file ...


2

That's the terminal sending xterm's focus-in/focus-out escapes. vim's set the terminal into a mode that lets it know when the cursor leaves the window (which it does when alt-tabbing). You would prevent that by changing the mode used in vim for handling the mouse. Checking xterm's documentation, vim would have to send a particular escape sequence with ...


2

Ctrl-Y isn't doing anything under Linux. DSUSP is not supported on Linux. See the man 3 termios (emphasis mine): VDSUSP (not in POSIX; not supported under Linux; 031, EM, Ctrl-Y) Delayed suspend character (DSUSP): send SIGTSTP signal when the character is read by the user program. Recognized when IEXTEN and ISIG are set, and the ...


1

o isn't a filter on BSD top, it's a sort. o Change the order in which the display is sorted. The sort key names include cpu, res, size, time. The default is cpu. I'm not sure if there is a way to filter it the way you want. So you could press o then type COMMAND but COMMAND=iTerm2 is invalid. Alternatively you could run top with the -...


1

Consider using screen like that: #!/bin/sh terminator -T "terminal1" -e 'screen -S session-name1' & terminator -T "terminal2" -e 'screen -S session-name2' & # wait for terminators screen to show up and screen sessions to start sleep 1 printf "Run command in terminal1\n" screen -S session-name1 -X stuff "echo bye\n" sleep 2 printf "Run command in ...


2

No, it's not possible at all. The terminal (console) is a rectangular grid of characters. Also, the "input" vs. "output" separation doesn't go as you think it goes. When you press the letter l (the first one of the command you type) then it goes through the kernel to your shell, which happens to decide to print an l (but it could just as well print anything ...


2

Emacs is capable of sending escape sequences to change the color palette, and restoring the palette. If it is paying attention to the xterm-256color terminal entry, it can (still) choose different colors within that palette which are not necessarily available to the GNU ls program since that depends on the configuration used for LS_COLORS. The eterm-color ...


3

You must configure your terminal type as putty, putty-256color, or putty-sco when using PuTTY, or things based upon it such as MobaXTerm. They are the only terminal types whose entries in the terminfo database correctly describe PuTTY. It is a widespread incorrect assumption that terminal emulators are all compatible with XTerm, and that the xterm and ...


0

It's the terminal's capability that doesn't support the colors besides the 8 basic ones. I found this piece of code to test all available color (source: tput setaf color table? How to determine color codes?): # Connector fifos directory read TMPDIR < <(mktemp -d /dev/shm/bc_shell_XXXXXXX) fd=3 # find next free fd nextFd() { while [ -e /dev/fd/$fd ];...


2

These codes should work : magenta=$(tput setaf 5) blue=$(tput setaf 4) cyan=$(tput setaf 6) green="$(tput setaf 2)" purple=$(tput setaf 5) red=$(tput setaf 1) white=$(tput setaf 7) yellow=$(tput setaf 3)


0

If you use bash for your script instead of sh, you can use an array to hold the arguments to find -- arbitrary whitespace is allowed in an array literal. find_args=( . -iname "*.mp4" -exec sh -c ' ffmpeg \ -i "$1" \ -c:a "$2" \ -c:v "$3" \ -vf "subtitles=${1%.*}.$4:'\''force_style=fontsize=$...


0

Did you consider ending the line with a single quote immediately followed by the backslash, and starting the next line with the single quote (no spaces!), like ...'\ '...


0

I use URxvt terminal emulator. There's a useful key binding for showing such codes: Ctrl+V. After pressing it enter key sequence you want and it will print its code. For example, my Ctrl+↑ has code ^[Oa.


0

To be sure, a terminal session is not quite the same as a shell. A shell is a command interpreter, a terminal session opens a new virtual terminal that runs a shell [command interpreter]. You could also view a terminal window is an optional wrapper around a shell that allows you to see output and potentially interact with the shell. The window normally ...


0

This is what's required : mate-terminal -e "bash -c \"ffmpeg -i $name -acodec copy output.mp4;read -p'Press Enter to quit'\"" Explain: What we want is to run two commands (maybe others as well) ffmpeg -i $name -acodec copy output.mp4 read -p'Press Enter to quit' By chaining them together with bash -c bash -c "ffmpeg -i $name -acodec copy output.mp4;read ...


1

I also encountered this issue and observed the following instructions after installing node: curl -sL https://dl.yarnpkg.com/rpm/yarn.repo | sudo tee /etc/yum.repos.d/yarn.repo sudo dnf install yarn Check installation with yarn -v


1

What you do is should stop trying to write MS/PC-DOS programs. You are using a completely different operating system. conio.h is one of the headers that comprises the C language bindings to the DOS API. Programs that employ it are MS/PC-DOS programs. People will tell you that curses "does the same thing". It actually really does not, as the DOS console ...


3

This header file is from old MS-DOS dev interface. You can replace it (almost) with curses.h. For more details you can check this answer. conio.h is a C header file used in old MS-DOS compilers to create text user interfaces. Compilers that targeted non-DOS operating systems, such as Linux, Win32 and OS/2, provided different implementations of these ...


0

Its doubtful will work for your bluetooth multimedia controller, but to find out keys with needed for terminal try cat -et and pressing and copy the printable character shown in screen and modify samples given below. bash-shell using /etc/inputrc file or local ~/.inputrc, input rc will look something like # don't forget to input default $include /etc/...


0

I had a similar problem today, and I found my solution, so I thought I would share my experience with you. I needed to update to r 3.6 and I'm on ubuntu 18. I started by removing R. I used sudo apt remove r-base. R 3.4 was removed from my machine, but old dependencies were left behind. When I added the new repository per the instructions on digitalocean ...


Top 50 recent answers are included