The tag has no usage guidance.

learn more… | top users | synonyms

6
votes
1answer
112 views

Extra output on input redirection

I have a folder with three files: $ ls a b c If I pipe the output of ls to wc, I get the right result: $ ls | wc -l 3 However, when I specify the input to wc as the output of ls, I get extra ...
1
vote
1answer
982 views

psmouse sync issues!

I have Compaq CQ61-420US (64-bit AMD) laptop with Synaptics touchpad checked using $ egrep -i 'synap' /proc/bus/input/devices N: Name="SynPS/2 Synaptics TouchPad" But recently after Arch Linux ...
2
votes
1answer
195 views

Tmux is not able to distinguish between insert and shift-insert

Insert when in xterm, gives ^[[2~ and, Shift+Insert gives ^[[2;1~ All this is good until I start tmux. Note that the $TERM variable remains the same, so this issue should not be related to ...
4
votes
1answer
1k views

how to merge two audio input source using avconv

I try to make screencast using avconv and I facing a problem. I finally succeed to record both pc output and microphone input , the problem is that they're not merged in the output file. (I saw ...
1
vote
0answers
22 views

X11 touch the value of the shivers . Is there any way?

I am using the X- widnwos. I use the touch screen. If you are a touch on the touch-screen cursor is unstable. Below is the video. https://youtu.be/jMub9-T_wEA How do I improve the following ...
2
votes
1answer
43 views

setting up Xorg input devices without udev

I have udev support in kernel(CONFIG_DEVTMPFS), thus my system does not strictly require udev daemon. Indeed everything works fine without udev daemon with the exception of Xorg (LXDE). LXDE starts ...
1
vote
1answer
28 views

Bash - Catch input for a substituted command stored in variable

How would I be able to catch the input for a substituted command stored in a variable? Example: How would I be able to catch the input for the following command? bar_foo=$(openssl passwd -1 -salt ...
1
vote
0answers
8 views

Configuring an alert when a program tries to interact with the user

Most programs in *nix-land take their options via the command line or through a configuration file. However, there are a few programs that do not have any such option, and will resort to interacting ...
0
votes
1answer
26 views

How do I give an input to an infinitely running program? [closed]

I have a python program that runs infinitely, takes an input and throws an output. I want to write a bash program that gives an input while the python script is running. So, how do I give an input to ...
0
votes
0answers
68 views

Connect bluetooth mouse Mint/Ubuntu

My bluetooth mouse I'm trying to connect this mouse by blueman device manager on mint 17.3 (kernel 4.4.4) I tried few different solutions in internet, but no success. On Windows 10 everything works ...
1
vote
2answers
25 views

Less specific input for script

Some time ago while i was searching for a way to find out what i can delete from my Android rom without crippling functions i use, i found deptree over at the xda forums. Since this was written back ...
13
votes
5answers
13k views

How to send keystrokes (F5) from terminal to a process?

I'm using an Raspberry Pi in combination with Chromium (kiosk mode) to show up some stats. The Pi doesn't have an connected keyboard so I searched for a solution to send keystrokes from the terminal ...
2
votes
2answers
89 views

Input from file: “advanced” (using less-than sign) vs. “beginner” syntax

I read the following in the grymoire: A simple example is changing "day" in the "old" file to "night" in the "new" file: sed s/day/night/ <old >new Or another way (for UNIX ...
3
votes
1answer
29 views

Head Script output explanation

So this shell script: #!/bin/bash head >/dev/null; head; almost always gives the same output when called with sequential numbers (e.g. seq 10000 | ./sscript) OUPUT: //blank line 1861 1862 ...
0
votes
4answers
40 views

Validating input

I have below script written to validate the input as an integer. But i also require "." to be included as an integer. For an instance if i give 1.5 is an input and run the script. It returns not an ...
1
vote
2answers
19 views

Find unique lines based on only a section

I am wondering if there is a way to split lines by some character (E.g. :) and find unique lines based on one part of this split. For example if I had the following piped in via stdin file1: line 4 ...
2
votes
1answer
359 views

Synaptics touchpad LED support

How to enable support the LED in Synaptics touchpads? I'm using Debian Jessie and xserver-xorg-input-synaptics ver. 1.8.1-1. I found patches by Takashi Iwai from SUSE for LED support in Synaptics ...
2
votes
1answer
17 views

How to set the keymap for keyboards that are plugged in later?

I have configured my keyboard layout by adding a call to setxkbmap to my .xinitrc. This works for my laptop's internal keyboard and for any external keyboard that is plugged in when the X server ...
0
votes
0answers
72 views

Read single line from device at /dev/input/event0

When using "cat /dev/input/event0 | hexdump", I get a stream of data from the joystick that won't end until I use Ctrl-C to interrupt it. I want to get a single line of data I can use in a script I ...
1
vote
1answer
208 views

Mapping two joysticks with Xorg

I already managed to map the input of a joystick to keyboard inputs by writing a file in my xorg.conf.d/ directory (the file is named 51-joystick.conf). Now I would like to map the inputs of a second ...
1
vote
1answer
49 views

Linux bash script input without using “read” [closed]

I need to create a bash script where a single argument is passed by the user (without using the "read" input option) at the terminal command line that creates a directory with that name, or otherwise ...
0
votes
4answers
40 views

Loop a program if the input is missing

I have this script that runs perfectly well, I would however like to re-run the script if the wrong input is entered, how could this be done? #! /bin/bash #! userInput - a script that reads in text ...
1
vote
1answer
39 views

Bash: How do I make a command line call a script and pass two strings?

I have a simple bash script named text.sh which looks like this: #!/bin/bash read username read password echo "script attempted with $username $password" I want to call it using something like ...
2
votes
1answer
180 views

Read from /dev/input devices without root privileges

Is there a way to read from /dev/input devices, without needing root privileges? In my case, I would like to use the Python library evdev to read from multiple keyboards (so that I know which ...
17
votes
1answer
8k views

SSH causes while loop to stop

I have finally managed to boil down a problem I have been struggling with for a few weeks. I use SSH with "authorized keys" to run commands remotely. All is fine except when I do it in a while loop. ...
13
votes
2answers
4k views

Record every keystroke and store in a file

I need to record every keystroke and store in a file in the user directory ~, when using my account, I am not sudoer and I cannot install programs (like logKeys) in any way. How could I do so using ...
2
votes
0answers
35 views

X configuration not being applied to device?

I've got a configuration file which I'm installing at /usr/share/X11/xorg.conf.d/52-synaptics-bcm5974.conf: Section "InputClass" Identifier "MacBook Pro Touchpad" MatchUSBID "05ac:0272" ...
0
votes
1answer
725 views

How to clear log files periodically?

I am new to shell scripting. I want to clear log files in a directory based on the dates. I have managed to gather this code: DIR1='/home/u01/app/oracle/servers/DIR1/logs' ...
1
vote
1answer
64 views

Is there any command that read their standard input in special cases? [closed]

I have been looking for lesser known commands that reads their standar input in special cases(missing arguments , for example). I'm thinking "cat" or maybe other command would fit here .. but I'm ...
0
votes
1answer
30 views

How to automaticallly accept when adding a repository?

Code : sudo add-apt-repository ppa:nemh/systemback sudo apt-get update sudo apt-get install systemback -y after entering the first command it will show something like this: Simple system backup ...
0
votes
1answer
96 views

How do I emulate sending keystrokes through a terminal program?

I need to send keystrokes virtually to a terminal program (like vi or emacs). I want to do something like this: echo -e 'iHello, world!\e' | vi and then have a vi session open with this buffer: ...
5
votes
2answers
25 views

maintain prompt despite ouput flow

Short version Can I maintain an input symbol (> for instance) at the bottom of the terminal so that the user can input despite text flowing above? Long version I am making a multi-process ...
4
votes
1answer
61 views

Working around a buggy keyboard / hacking an input stream?

When I type the key sequence oun quickly, the key sequence oun<F12> is emitted by my keyboard. (Update: actually, you must press-and-hold each key in the sequence in order to trigger the ...
1
vote
1answer
105 views

Block user input on interactive shell using “cat /dev/ttyS0”

I created an update routine for my device. The update process can be started using the serial console, SSH, telnet, a webserver or a REST API. Once the update started, I want to block all user input ...
1
vote
2answers
221 views

How to start script and put standard input in one command?

I have a console program which uses standard input and output. For example I call : ./program_name and after that I enter input I need to make this two actions in one command like: ./program_name ...
0
votes
1answer
38 views

Compose plus apostrophe doesn't work with Cyrillic

I used to have a custom .XCompose, I removed it to possibly eliminate the cause. Unfortunately, the problem persists - I can't create an accented Cyrillic character, such as the ones here [1]. Simply ...
1
vote
1answer
104 views

How to automatically disable laptop keyboard/mouse with xinput when external keyboard/mouse is plugged in?

I know I can use xinput to disable my mouse and keyboard, and I usually type three commands every time I plug in my keyboard and mouse to my keyboard: xinput float 'AT Translated Set 2 keyboard' ...
2
votes
3answers
103 views

Why does using pipe '|' terminate the second process, is there a way to prevent it?

Just to give some context, I'm trying to run this command echo "set hive.execution.engine=tez;" | hive hive terminates as soon as "set hive.execution.engine..." has been entered into the hive ...
1
vote
1answer
34 views

Read from the terminal from a disowned background process

Do we still have a possibility to read input from keyboard even if the application is running in background (disowned)?
1
vote
0answers
66 views

Disable embedded keyboard when in a tty

I've been lately working on a netbook. I like to connected an external keyboard and mouse to it whenever I can, and I put the keyboard over the embedded keyboard. When on X, I used xinput to disable ...
1
vote
1answer
43 views

Sharing a keyboard over point to point network

I tried following http://superuser.com/questions/67659/linux-share-keyboard-over-network but had no success with the #1 solution. Then I tried socat and I had partial success -- it does work but ...
3
votes
0answers
37 views

How to obtain mouse events from the kernel when X is active?

When switching to a virtual terminal on my system, The kernel successfully delivers mouse events to a generic input event interface -/dev/input/event6 in my case- as well as legacy interfaces mouse1 ...
16
votes
2answers
1k views

What does CTRL+4 (and CTRL+\) do in bash?

I just found out by accident that CTRL + 4 closes programs reading stdin input from the command-line. This is how it looks when I type CTRL + 4 or CTRL + / into programs reading stdin ryvnf:~$ ...
1
vote
2answers
3k views

awk - get input from both file and STDIN?

Is it possible to get input from both file and the terminal? I wish to ask the user something in the END portion of the awk script. That input should be typed in by the user and not read from the ...
0
votes
2answers
76 views

Interactively remove files in loop with standard input redirection

I need to interactively (i.e. rm -i) remove files stored in variable $to_remove (one path per line). Unfortunately my code doesn't work because standard input is already used by redirection ...
-1
votes
1answer
88 views

Is there a Linux keylogger which records the timestamp at which every input was given? If not how would one go about doing this?

In the end I want it so that I have a list of time steps which record, at each time step, what key was pressed (or what was the last key pressed in the given interval). I'm not sure such software ...
4
votes
1answer
869 views

USB keypad (HID) not responding in linux but in grub

An external USB keypad I'd like to use gets recognised as a USB HID device, but it is not functional when Linux is booted. It does work when plugged into a Windows desktop and it does work while in ...
2
votes
3answers
133 views

How do I remap newline and carriage return regardless of the terminal used to connect?

All my configuration is stored in my github account (https://github.com/mnebuerquo/dotfiles) so I can just clone my repo and run my install script and my home is configured to use all my tools. I ...
-2
votes
2answers
198 views

Enter a variable into a command in bash

My question should be simple for you guys. I am writing a simple script that runs a command but the file it would need is always different. Is there a way for it to ask: "Where is the file?" And ...
1
vote
0answers
168 views

Ubuntu 14.04 - Multiple Griffin Technology Powermate Knobs

I am running Ubuntu 14.04, and I want to run multiple griffin powermate knobs: https://store.griffintechnology.com/powermate. I want to map them to different keys other than audio control. I want to ...