Tag Info

New answers tagged

1

Yes. This is easy. Install the system with the GUI libraries for X (drivers optional) and for the desktop environment you want. Then, run something like the TigerVNC server, and you're done.


2

There is currently no way to do this. See this accepted answer on stackoverflow which suggests changing pane-borders instead. You can set values for pane-active-border-style and pane-border-style in your ~/.tmux.conf. See this answer for more details configuring these values (and some inconsistencies between tmux versions).


1

You may try some values with xset r rate. This command will enable auto-repeat, but you can follow it by 2 numbers. The first one is the number of ms before auto-repeat starts, the second is the number of repeats by seconds. For example: xset r rate 300 20 The auto-repeat will start after 300 ms, then will repeat 20 times/second.


1

It seems that any interactive script launched from rc.local will have similar issues with stdin. I found a workaround on superuser: Just launch your script using openvt -s -w /path/to/script.sh (explanation at the original post)


1

The console is not connected to stdin of the whiptail process. It looks like the same issue as seen in rc.local with read will not echo key strokes. The suggested answer there is to add plymouth quit before attempting console input. Alternatively, it may be possible to arrange for Plymouth itself to display your warning; something like plymouth ...


1

In my distribution, Arch Linux, the default powerline configuration files resides /usr/lib/python3.4/site-packages/powerline/config_files. When a file is not present in your .config/powerline directory, the equally named one found there is used instead. This structure provides a useful way to start tweaking your powerline configuration. Copy all the ...


2

Using screen -x allows you to connect to a session that it currently attached, without forcing it to detach. For example, if you do this in two separate xterms, you will see input and output of both instances simultaneously. This is useful when logging in from several locations; it avoids having to reattach once you go back to the location where you first ...


1

Here's another way to do it: { printf %s\\n "CHR SNP MAF P"; grep -F ALL file1 | sort -k2,2 | \ join -j2 -o 2.1,2.2,2.5,1.9 - <(sort -k2,2 file2); } | column -t output: CHR SNP MAF P 0 AFFX-SNP-000541 NA 1 0 AFFX-SNP-002255 NA 1 1 rs12103 0.2894 0.5596 1 rs12103_1247494 0.2875 0.5581 How it ...


0

Your prompt shows the user, hostname & current dir user@hostname:/current/dir $ When you execute the sudo command as a normal user (baron in your case), you're giving the system an order to make "something" as root or with root privileges. See root definition With the -s option, you're giving the order to become root user with an interactive shell ...


1

After adding comment here I checked askubuntu.com and found the answer there. You need to install CompizConfig Settings Manager. Then go to General -> General Options -> Focus & Raise Behaviour and set Focus Prevention Level from Low to Off.


3

Use W (capital w) to save the top configuration after you made your changes.


1

sshd process (from sshd(8) ) will read ... 6. Reads the file ~/.ssh/environment, if it exists, and users are allowed to change their environment. See the PermitUserEnvironment option in sshd_config(5). and 8. If ~/.ssh/rc exists, runs it; else if /etc/ssh/sshrc exists, runs it; otherwise runs xauth. The “rc” files are given the X11 ...


3

If you have root access to the remote box, install the package ncurses-term. This will provide the rxvt-256color terminfo entry. As a non-root user, you can also copy over the rxvt terminfo entries to $HOME/.terminfo/r/ on the remote machine, and export TERMINFO=$HOME/.terminfo. ssh <host> 'mkdir -p .terminfo/r' scp ...


0

after login you can execute something like: export TERM=vt100


1

In lots of places, depending On virtual terminals and real terminals, the TERM environment variable is set by the program that chains to login, and is inherited all of the way along to the interactive shell that executes once one has logged on. Where, precisely, this happens varies from system to system, and according to the kind of terminal. Real, ...


0

Please see http://askubuntu.com/a/614714/398785 for my detailed answer on why I think TERM=xterm-color is the wrong approach and Ubuntu's .bashrc is obsolete. I recommend that you go with TERM=xterm-256color (which is the default since gnome-terminal 3.16, but also safe to use with older gnome-terminals), and adjust your .bashrc accordingly.


4

You can use unicode, which also outputs some more information than just the name: # unicode – U+2013 EN DASH UTF-8: e2 80 93 UTF-16BE: 2013 Decimal: &#8211; – Category: Pd (Punctuation, Dash) Bidi: ON (Other Neutrals)


25

Try the unicode utility: $ unicode ‽ U+203D INTERROBANG UTF-8: e2 80 bd UTF-16BE: 203d Decimal: &#8253; ‽ Category: Po (Punctuation, Other) Bidi: ON (Other Neutrals) Or the uconv utility from the ICU package: $ printf %s ‽ | uconv -x any-name \N{INTERROBANG} You can also get information via the recode utility: $ printf %s ‽ | recode ..dump UCS2 ...


1

Create a bash script with this: #!/bin/bash awk -F ":" '{print $2}' /usr/share/X11/locale/en_US.UTF-8/Compose | grep "$1" | awk -F "#" '{print $2}' Name it as you want, for example, namechar and give it executing permissions. Now, you can call for example: ./namechar @ and the result will be: COMMERCIAL AT


4

The best way I know is through Perl's uniprops. It comes with Perl's Unicode::Tussle module. You can install it with sudo perl -MCPAN -e 'install Unicode::Tussle' You can then run it on any glyph you want to test: $ uniprops ‽ U+203D ‹‽› \N{INTERROBANG} \pP \p{Po} All Any Assigned InPunctuation Punct Is_Punctuation Common Zyyy Po P ...


4

You can use Perl viacode function from charnames module: $ perl -Mcharnames=:full -CLS -nle 'print charnames::viacode(ord)' <<<"‽" INTERROBANG $ perl -Mcharnames=:full -CLS -nle 'print charnames::viacode(ord)' <<<"🐄" COW charnames was first released with perl v5.6.0


1

You recorded the output of the command to a terminal, so it decided to use terminal features. Specifically, apt-get uses carriage return characters to move the cursor back to the beginning of the current line and overwrite the text that was on the line. To emulate the effect of carriage returns, remove all text before one: <transcript sed 's/.*\r//' ...


-1

PS1='\[\e[0;31m\]\u\[\e[m\] \[\e[1;34m\]\w\[\e[m\] \[\e[0;34m\]\$ \[\e[m\]\[\e[1;31m\]' You can fix this by changing the output colour, below is an example for the same. PS1='\[\e[0;31m\]\u\[\e[m\] \[\e[1;34m\]\w\[\e[m\] \[\e[0;34m\]\$ \[\e[m\]\[\e[1;32m\]' The above command displays the below output in green


2

You can use a trap to achieve this: trap 'echo -ne "\e[0m"' DEBUG According to bash's man: a trap on DEBUG executes before every simple command, for command, case command, select command, every arithmetic for command, and before the first command executes in a shell function So every time you execute the command, the shell will insert \e[0m ...


0

Gnome-terminal supports this feature beginning with version 3.12 (actually it's the underlying library vte >= 0.36 that matters).


2

You said you wanted to grant read and write permissions to all subdirectories and files under: /home/user/workspace/MinimalDbaseExample ... right? Octal 0777 permissions grant rwxrwxrwx symbolically. Octal 0755 permissions grant rwxr-xr-x symbolically. Octal 0666 permissions grant rw-rw-rw- symbolically. To set read/write/execute permissions to the ...


2

This is nothing to do with the echo command. You'd see this same behaviour if you wrote the output using cat, printf, or some other program. This is an aspect of your terminal. And terminals can differ amongst themselves in this regard. The terminfo database will or won't have, for your terminal, an auto_left_margin capability, known as bw in termcap. ...


2

echo can't move back past the position it started at. No matter how many backspaces you use, once you've erased everything you've output it stays at the initial position. That's why you always see the 'c' character, however many times you backspace.


0

The exact answer depends on which terminal emulator you are running, as they have different flags to stop them closing once the command finishes executing. However, you'd want something like this: /usr/bin/xterm -e "sh /home/user/echo.sh" -hold or xfce4-terminal -H -x "/home/user/echo.sh" This executes xterm, telling it to 'execute' the sh .... .sh ...


1

You can achieve the required result in wget (or curl) by specifying an output document. With wget: wget https://raw.git...etc.../README.md -O ./temp/README.md With curl: curl https://raw.git...etc.../master/README.md > ./temp/README.md


1

I'm not aware of any terminal emulator supporting anything along these lines. The very basic concept of a terminal (or graphical terminal emulator) is to work with a text grid. The screen is divided into a matrix of cells of equal size and each cell contains a letter. You can print a simple text flow, but you can also position the cursor arbitrarily within ...


0

Some times the multiple screens are running in the background. They can be resumed by: screen -r [pid] To get the screen, first run screen -R, then you will see all the running PIDs of screen, after that resume by screen -r [pid].


0

Put the following into a file: command1() { if [ "$BASH_COMMAND" != command2 ] then command_flag=1 fi return 0 } trap command1 debug command2() { if [ "$command_flag" ] then echo "" fi command_flag= } PROMPT_COMMAND=command2 I advise you to change the names command1, command2, and command_flag to values that ...


1

I'm not familiar to picocom, so I can't give you an answer, but can give you an explanation for the behavior which you might find useful. When working with terminals, the input (keyboard) and the output (stuff sent to the terminal to be printed) have to clearly be distinguished from each other. As for the input, the keyboard's backspace key sends either ^H ...


1

It's not a general shell issue. A program you fire up (such as screen) reads its .rc-file when you start it—it doesn't try to determine if that file was created before or after you logged in. (And it couldn't; Linux has no reasonable way to check a file's creation time.) So that's not what's going on. Instead, it's something about that login session. It ...


1

Many possibilities. At login time, usually, 3 steps are done: 1) At login time, the shell specified in /etc/passwd is launched. So I'd first have a look at /etc/passwd (using GUI as gedit, since you can't use terminal...) and check the shell (it's the last field). You may have a line like this for your user: user:x:500:500::/home/user:/bin/bash (You may ...


3

This is more a "terminal application" feature/configuration option than a bash option. Bash is not aware of fonts or spaces, that's something related to the terminal. For example: Mac Os X's terminal program allows to setup more space between the lines: http://osxdaily.com/2015/01/05/increase-line-spacing-terminal-mac-os-x/ If that's what you're looking ...


1

Actually, on CentOS 7, /bin/sh is a symbolic link to /bin/bash, which is the shell available by default on most Linux distros. $ ls -l /bin/sh lrwxrwxrwx 1 root root 4 9 febr. 08:21 /bin/sh -> bash (If the above command returns No such file or directory, then you are right, you'd have a problem. You could then run which sh to know the correct path) ...


1

You can have it call whatever interpreter you wish (bash, csh, zsh, sh, perl, or anything). #!/bin/sh is POSIXly-correct and it should run. What is the output from ls /bin | grep s? Also, you may want to check your file permissions. That killed me when I was writing my first scripts (chmod +x ./myscript.sh).


1

Inside tmux, you need to set TERM=screen-256color. It may be something like here that this only works from inside tmux, but not in tmux.conf. Check that you don't unconditionally overwrite the TERM value, e.g. in your .bashrc, or anything that gets sourced when you open a shell inside tmux.


1

There are previous answers that suggest you to use $_ and !$. While this works, I find it quite dangerous as they are not expanded and you cannot see their value before pressing enter and executing the command. Imagine using rm $_ without being sure what you're going to delete! If you're using bash (probably with readlines's emacs mode, which is the ...


0

Zsh needs to know how wide the prompt is in order to get the cursor position right. If it assumes an incorrect value for the width of the prompt, it will write text at the wrong place when redrawing the command line. That's what's happening after zsh moves to the next line to display possible completions: it redraws the command to be completed at the ...


2

When working interactively, you can use history expansion for this: mkdir /Some/really/long/path/to/a/directory/ cd !$ There are loads of variants to this which allow you to access other parameters from the previous command or any other command in your history. See Bash, insert last used argument of current command for details...


2

In bash (and some other shells, like zsh), you can use $_, which contains the last argument to the previous command: mkdir /path/to/file cd "$_"


1

You've completely banjanxed zsh's idea of what's been printed and what it has to erase/rewrite as it displays menu completion and lets you edit the command line. This is because you've overcomplexified that prompt. Don't use printf to just put a string literal inside a word. Don't use hardwired CSI control sequences to change colour. As I said at ...


0

partial answer: What you need is an image-viewer program that can display an image without grabbing the keyboard focus. Then you can either kill it and re-run it. (start it in the background, and $! will be the PID). Or it can read a list of files to display from a pipe, or better, commands like "display this file now" from a pipe, you could have a ...


5

If you issue the command stty size it returns the size of the current terminal in rows and columns. Example: $ stty size 24 80 You can read the rows and columns into variables like this (thanks to Janis' comment): $ read myrows mycols < <(stty size) Obtaining the size in pixels requires knowledge of your screen's resolution and I don't think ...


0

You can use the ability to run in background. To do it just put & at the end of your command. for example: $ gedit example.txt & [1] 12642 To list all processes in the background use the job command. $ jobs [1]+ Running gedit example.txt & To bring the process to foreground again use the fg command: $ fg %1 gedit ...


2

It means that mouse clicks will be reported to whatever is reading the terminal as standard input, the position and click will be encoded in an escape code similar to a special function key. Text mode mouse-aware applications (e.g. aptitude) can then use that to perform functions like any "real" graphical use interface (GUI) programs use a mouse. Such ...


2

If you call the binary in /etc/rc.local, notice that rc.local is called as /bin/sh -e. -e means that the script immediately exits if any untested command fails in it. You call the binary in the background and another command in the script may exit with an exit code that is not 0. That has the effect that your binary is sighup-ed. An untested command ...



Top 50 recent answers are included