The tag has no usage guidance.

learn more… | top users | synonyms

0
votes
0answers
41 views

add multiple users to multiple servers [duplicate]

I have a quick bash scripting question. I'm trying to add multiple new user accounts to multiple RedHat servers in my environment. This the script I've come up with so far, but it's not quite ...
1
vote
1answer
32 views

cat into stdin then pipe into program keeps forked shell open, why?

I'm not sure what's going on but I've been trying to understand what is happening with the input and output. So here is my program. #include <stdio.h> #include <stdlib.h> int main(){ ...
0
votes
2answers
42 views

Switch user using password from file

how can i switch user using su command and adding password from file ? i want to make a script which will automaticly switch the user, having the user and the password ,instead of manually typing the ...
1
vote
0answers
23 views

Multiple entries in /proc/bus/input/devices for same device

I have one USB touchscreen connected to my hardware setup but using cat /proc/bus/input/devices gives me two entries for the same device : I: Bus=0003 Vendor=2965 Product=5023 Version=0110 N: Name="...
0
votes
0answers
20 views

Sub process keyboard input layer

I have a bash script where I set up a stream playlist by user interaction. The user then press p to play the selection. This simply do something like: media-player --playlist media-player defaults ...
0
votes
1answer
20 views

rm: cannot remove Input/output error in part of folder in a permanently mounted NTFS drive

I was experimenting with HDF5 installation from a permanently mounted NTFS data partition so lots of deletion etc. Now part of the folder (containing some codes etc.) is not deleting and showing the ...
1
vote
0answers
26 views

Xorg thinks touchpad is exact pointing device

I finally got Xorg working with LXDE, but I have one tiny problem: Xorg thinks my touchpad is an exact pointing device, such as a touchscreen. That is, coordinates on the touchpad are directly related ...
0
votes
2answers
40 views

Execute command when user interaction is detected ( ex: moving mouse, pressing key )

I am trying to make a bash script to turn down the brightness to lowest when idle for a certain amount of time but reverts back to its previous brightness when it detects user interaction whether it ...
3
votes
1answer
39 views

How to receive input from 2 files on an executable

Basically, I want to receive input from 2 different files whem I'm calling an executable on terminal Like: ./a.out < file1.pgm file2.pgm I want to read both the files input on my code, one ...
4
votes
3answers
77 views

How can I respond to a prompt within a shell script running in background?

I am scripting the installation of software on HP-UX server. Once the script starts it provides a prompt where I am to enter the install path. I need to pass the path to the script so it can ...
0
votes
0answers
15 views

Left-clicks not working for any device in openSUSE Tumbleweed

Okay, so I really am at wit's end here. I had this problem where my left click stopped working randomly. It had happened once before, but I thought it was a non-issue, as the problem manifested when I ...
1
vote
0answers
172 views

Kernel driver for trackpoint on Lenovo Thinkpad 13

On other ThinkPads I've succesfully configured the trackpoint with udev using this method but on my new Lenovo Thinkpad 13 this isn't possible: This command: find /sys/devices/platform/i8042 -name ...
3
votes
1answer
52 views

How to always print the prompt on a new line & keep input

We all know this annoying issue: $ printf "abc" > some-file $ cat some-file abc$ which tends to mess up the prompt if it is any more complex than $, throws off the current cursor position and ...
1
vote
0answers
27 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
128 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
31 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 "...
0
votes
1answer
37 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 ...
1
vote
0answers
10 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
0answers
127 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 ...
3
votes
1answer
37 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
42 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
21 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 ...
0
votes
0answers
126 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 ...
2
votes
1answer
19 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 ...
1
vote
1answer
62 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
41 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 ...
2
votes
2answers
103 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 ...
1
vote
1answer
60 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 this:...
2
votes
1answer
325 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 ...
2
votes
0answers
47 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" ...
1
vote
1answer
77 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
31 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
138 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
74 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
122 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
270 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 '...
1
vote
1answer
151 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
111 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
39 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
90 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
52 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
47 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
2k 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:~$ ...
6
votes
1answer
117 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 ...
0
votes
2answers
91 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
102 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 ...
3
votes
3answers
164 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 ...
1
vote
0answers
204 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 ...