Tag Info

New answers tagged

0

What error did /etc/init.d/sshd reload give? This is a correct method to make sshd pick-up config changes.


2

The command line option -o (o standing for "Override-sort-field") also works on my Xubuntu machine and according to the Mac man page of top it shoult work on a Macintosh too. If I want to short by memory usage I usually use top -o %MEM which shorts by the column %MEM. But I can use VIRT, RES or SHR too. On a Macintosh I would probably use mem or vsize. I ...


0

I just fought with this issue for an hour. It turned out that my problem was that LC_COLLATE was set to C (it had an extra space) instead of C in /etc/locale.conf.


3

echo is a setting of the terminal device (the discipline part in the tty kernel driver), termcap is about controlling the terminal (real or emulator) via escape sequences, it's two separate things. Here you want to prevent the application to do a specific ioctl. One way could be by detaching it from the terminal. socat - exec:okular,pty,raw Would run ...


1

Detach from currently attached session Session Ctrl+ b d or Ctrl+ b :detach Screen Ctrl+ a Ctrl+ d or Ctrl+ a :detach


-1

In emacs the term hollow box is used to describe that style. You can review the cursor display implementation for X/Xterm -- (called from here) -- or for OSX. In vim there is a help entry for +cursorshape which leads to termcap-cursor-shape, but alas, it does not discuss the hollow-box style and mentions that the directives it (vim) supports are "not ...


1

There is a split command: ~$ split --help Usage: split [OPTION]... [INPUT [PREFIX]] Output fixed-size pieces of INPUT to PREFIXaa, PREFIXab, ...; default size is 1000 lines, and default PREFIX is `x'. With no INPUT, or when INPUT is -, read standard input. ... -n, --number=CHUNKS generate CHUNKS output files. ... CHUNKS may be: N split into N ...


1

Jobs are a shell concept. A job is a subprocess¹ of a shell that the shell tracks. A shell instance running on one terminal doesn't know anything about the jobs of another shell instance. When you run jobs in the shell running in the second tab of your terminal emulator, this lists the jobs in that shell. The shell running in the second tab doesn't know ...


0

If you set up a control file, you can reuse the existing connection authentication. From man ssh_config: ControlMaster Enables the sharing of multiple sessions over a single network connection. When set to “yes”, ssh(1) will listen for connections on a control socket specified using the ControlPath argument. Additional ...


1

As pointed out in this Ask Ubuntu answer, you may use zssh instead of ssh. When using zssh, you'll be able to switch to file transfer mode using Ctrl + @. This should allow you to transfer files back and forth between the local and remote ends of your active connection. Another trick pointed out in that answer is to send ssh to the background while you call ...


1

A Linux machine (running with SystemV) defines a special file, /etc/inittab that declares (but not only) how many *getty processes will run and their corresponding terminals. E.g. this is an excerpt of inittab on my Gentoo Linux machine: # TERMINALS c1:12345:respawn:/sbin/agetty --noclear 38400 tty1 linux c2:2345:respawn:/sbin/agetty 38400 tty2 linux ...


0

The Message of the Day file (/etc/motd) had the strange text in there. I wonder what put that there. I deleted the MOTD file and now my sessions no longer begin with the strange text.


1

I had the same issue after a fresh install of arch. I checked, double checked and triple checked the locale.gen and even removed every locale except en_US.UTF-8. I was just about to give up when I checked under settings, Regions & Language and discovered the language was not set even though I had run the command to set it. After picking english and ...


4

Ony my Linux systems, man 1 man mentions the MANWIDTH environment variable, which, now that I look it up, is also specified in the FreeBSD man(1) manpage: MANWIDTH If set to a numeric value, used as the width manpages should be displayed. Otherwise, if set to a special value ``tty'', and output is to a terminal, the pages may ...


0

As a slight simplification to the previous answer, I found it easier to just run: tput cup $LINES in the beginning of .bashrc or .zshrc. It just does the job. Pros: it only prints once, when you start your shell Cons: when clearing screen with ^L, it doesn't print and aliasing clear to clear; tput ... doesn't help; prompt moves elsewhere when ...


0

I fixed this issue by adding this to my PS1 in my .bashrc file. \[\e]2;\u@\H:\w\a\] Therefore the whole line looks like this(I've customized my PS!: export PS1='\[\e]2;\u@\H:\w\a\]\n($LOGNAME@$HOSTNAME) \t\n[$PWD]: ' I hope that helps others.


0

THIS! -> https://github.com/ecraven/pinentry-emacs You'll have to do some wrenching, but using this thing worked for me. put the script there into a directory in your PATH and then add the following entry to ~/.gnupg/gpg-agent.conf: pinentry-program <path-to-pinentry-emacs/pinentry-emacs Then reload the agent: $ echo RELOADAGENT | gpg-connect-agent ...


3

You can start the process in screen, type screen (it will start new screen session), run any command just like in your regular shell, detach screen (by pressing Ctrla, then d) and attach to the screen from any other terminal tab by typing screen -r. In this case the process's parent is screen, which is detachable / attachable from any terminal session, ...


4

read -s disables the terminal echo only for the duration of that read command. So if you type something in between two read commands, the terminal driver will echo it back. You should disable echo and then call read in your loop without -s: if [ -t 0 ]; then saved=$(stty -g) stty -echo fi while read -rN1; do ... done if [ -t 0 ]; then stty "$saved" ...


1

The supported terminal capability depends on your terminal emulator (xterm, ...). The terminal emulator should set the term info correctly. It does usually not make much sense to use "another terminal" (except maybe xterm-256color instead of xterm or if the $TERM variable is set wrongly). You should use libraries like ncurses which deals automatically with ...


1

I think the option of enabling "Ctrl+V" varies from emulator to emulator, but there are easy ways around this most of the time: Ctrl + Shift + V works as a paste in most terminal emulators I've used. Your mileage may vary, so you can check if your emulator has a similar keyboard shortcut (usually an afterthought in gray font after opening the menu "Edit > ...


1

Not exactly the answer you asked for, but you should be able to transfer files through an SSH connection: sending ssh user1@firewall "ssh user2@cluster \"cat > remote_file\" " < local_file fetching ssh user1@firewall "ssh user2@cluster \"cat remote_file\" " > local_file EDIT: There are also terminal based file transfer tools like ...


0

Read about Reverse SSH. Maybe this will help you. I use it to connect to remote storages behind NAT.


1

After a day of struggling I finally ended up with even better thing I needed: #!/bin/bash # Adds RVM to needed paths to start servers with needed Ruby version PATH=$PATH:$HOME/.rvm/bin [[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # I need this server to run in background startLocalRedmineServer()( cd ...


0

You can use gdebi to install the Debian Steam installer made by Ghost Squad 57, available from Github. It gets around the issues raised by Valve's installer and has not encountered any issues on Wheezy.


0

I'd turn up the logging level for the SSH Daemon via the configuration file, /etc/ssh/sshd_config. Typically this section of the configuration file: # Logging # obsoletes QuietMode and FascistLogging #SyslogFacility AUTH SyslogFacility AUTHPRIV #LogLevel INFO Uncomment the LogLevel section and restart SSH service. This should show you where those messages ...


1

There is no foolproof way. TERM uses the same value for mostly-compatible emulators; most modern terminal emulators aside from screen and tmux report xterm. You can explore the process list to find Vim's parent's parent. That will tell you in what terminal emulator (if any) Vim is running in in the common case where Vim was launched from a shell which was ...


0

I believe typing "q", whether at the end or not, will return you to your console. Is this not the case on your machine? Edit: at least, less and journalctl behave this way for me on fedora 20.


2

The problem is: When bash is started non-interactively then it does not read ~/.bashrc. Thus you have to read h() from the script. If you want to use aliases in a script then you have to enable the use of aliases in the script with shopt -s expand_aliases define the alias in the script. An alternative to an alias is defining a shell function (which ...


1

If you have GNU stdbuf, you can use: $ stdbuf -o0 -e0 php -S 0.0.0.0:12345 | tee -a access.log PHP 5.4.34-0+deb7u1 Development Server started at Mon Nov 24 14:38:33 2014 Listening on http://0.0.0.0:12345 Document root is /home/cuonglm Press Ctrl-C to quit.


1

What you describe as your "actual" IP address isn't, it is the IP address of your router, or anything else that got an IP address from your provider and acts as an intermediary for your computer to the internet. That is why your (windows) hosts provides an internal address as well. Your VirtualBox host gives out IP addresses in the range 10.x.x.x by default ...


0

From your experiments, it appears that the vsim program wants its standard input to be connected to a terminal; if it isn't, it either does nothing useful (because it's waiting for input but not getting any) or exits. $ vsim $ sh -c vsim This runs the command normally from a terminal, in the foreground. The command can read input from the terminal. $ ...



Top 50 recent answers are included