Bash: Need to get Data and then Insert this Data

mpskinner

New Member
Joined
Jan 21, 2019
Messages
5
Reaction score
2
Credits
0
Hi

I am a left handed person using a Right Handed Wacom tablet and need to use a bash command to convert it to a Left Handed tablet.

I use the xinput list command in Bash to get

Wacom Bamboo 2FG 6x8 Pen id=9 [slave pointer (2)]

I am looking for the id=9 which I insert into a bash script I put in the bin directory so I can run it.

xinput map-to-output 9 DVI-0

Is there a way for me write a bash script that will get the value 9 and insert it into

xinput map-to-output 9 DVI-0

The Value 9 changes. When I reboot sometimes. That's my problem.

Thank You..
 


The Value 9 changes. When I reboot sometimes. That's my problem.

(Wizard appears in a puff of smoke)

G'day @mpskinner :)

I don't use Wacoms but I used to use xinput a fair bit, to disable a recalcitrant touchscreen.

See pic below

WjzaIfJ.png


Here, I look as if I am about to disable my mouse. You can use the ID number or the name of the device, if you use the name of the device, quotes go either side.

So you could go

Code:
xinput disable "Wacom Bamboo 2FG 6x8 Pen"

... in your script, if you were looking to disable, or likely

Code:
xinput map-to-output "Wacom Bamboo 2FG 6x8 Pen" DVI-0

to achieve what you are seeking.

If this works, then for a more permanent solution you could place the command in a file that is called on immediately after the X environment is loaded.

@JasKinasis or @kenJackson could likely help better with the scripting.

Cheers and good luck

Chris Turner
wizardfromoz
 
Yippe-ki-yay Wizard, he got something write on a subject (Wacom) he knows next to nothing about :D:D

P.S. how can I mark this thread as solved?

No need to, Mate, unless you want to edit your own Thread and put a [Solved] at the start (looks good but not necessary).

We leave threads open here in case another Member comes along with similar issues, or in case you need to revisit for extra help.

Cheers

Wizard
 
I'm trying to do the same as you but using a Huion tablet and the output I have is
Code:
Unable to find output 'DVI-0'. Output may not be connected.
What does DVI-0 even do?
 
min-liban: Sorry for my late reply. I have two displays.

xinput map-to-output "Wacom Bamboo 2FG 6x8 Pen" DVI-0

I use this code because it works. But know little about it. DVI-0 is the monitor I want to effect, so that is why the code is there. What I really need to do is find a tablet that acknowledges the existence of Linux.
 

Members online


Top