Giter Club home page Giter Club logo

x2x's Introduction

x2x

Project status

Dormant. This project needs a new maintainer.

x2x has a long history. It was born in the times when life was hard, window managers were simple and displays were rectangular. Now it needs an overhaul.

Overview

x2x allows the keyboard, mouse on one X display to be used to control another X display. It also shares X clipboards between the displays.

When built/run on Cygwin it may be run on Windows desktop to control X display.

License

x2x is under MIT/BSD license.

Windows support includes code under GPLv2+.

Authors

x2x was initially developed in DEC by David Chaiken. Current maintainer is Mikhail Gusarov.

Building on Various Systems

Building on Arch

  1. git clone https://github.com/dottedmag/x2x && cd x2x
  2. ./bootstrap.sh
  3. sudo pacman -S libxext libxtst
  4. ./configure
  5. make && sudo make install

If you want the simple solution, there is also a package in the AUR for x2x.

Building on Fedora

  1. git clone https://github.com/dottedmag/x2x && cd x2x
  2. ./bootstrap.sh
  3. sudo dnf -y install libXext-devel libXtst-devel
  4. ./configure
  5. make && sudo make install

Building on Debian or Debian-Derivative like Ubuntu

  1. git clone https://github.com/dottedmag/x2x && cd x2x
  2. git checkout debian
  3. dpkg-checkbuilddeps (and sudo apt install anything missing)
  4. env DEB_RULES_REQUIRES_ROOT=no debian/rules binary
  5. sudo dpkg --install ../x2x_VERSION.deb

x2x's People

Contributors

altruizine avatar amitsaha avatar barak avatar bingtimren avatar bitstreamout avatar deadmoose avatar dottedmag avatar hamishcoleman avatar jhutz avatar marwen-bm avatar morngrar avatar olavmrk avatar sjp38 avatar sundbp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

x2x's Issues

compile error on my cygwin x86-64

There are some define errors on my new windows 7 (64) cygwin x86-64 (with Cygwin dll 2.3.0)

conflicting types for BOOL, INT64, PLONG64....
any idea?

the configure and make log here:

$ ./configure --enable-win32
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.exe
checking for suffix of executables... .exe
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
./configure: line 3464: AX_CFLAGS_WARN_ALL: command not found
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for X11... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config.h
config.status: executing depfiles commands

make

$ make
make all-am
make[1]: Entering directory '/home/P645/x2x-dev'
gcc -DHAVE_CONFIG_H -I. -DWIN_2_X -g -O2 -MT x2x.o -MD -MP -MF .deps/x2x.Tpo -c -o x2x.o x2x.c
In file included from /usr/include/w32api/windef.h:8:0,
from /usr/include/w32api/windows.h:69,
from x2x.c:100:
/usr/include/w32api/minwindef.h:131:15: error: conflicting types for 'BOOL'
typedef int BOOL;
^
In file included from /usr/include/X11/extensions/dpms.h:33:0,
from x2x.c:94:
/usr/include/X11/Xmd.h:120:16: note: previous declaration of 'BOOL' was here
typedef CARD8 BOOL;
^
In file included from /usr/include/w32api/winnt.h:143:0,
from /usr/include/w32api/minwindef.h:163,
from /usr/include/w32api/windef.h:8,
from /usr/include/w32api/windows.h:69,
from x2x.c:100:
/usr/include/w32api/basetsd.h:32:44: error: conflicting types for 'INT64'
**MINGW_EXTENSION typedef signed __int64 INT64,_PINT64;
^
In file included from /usr/include/X11/extensions/dpms.h:33:0,
from x2x.c:94:
/usr/include/X11/Xmd.h:97:14: note: previous declaration of 'INT64' was here
typedef long INT64;
^
In file included from /usr/include/w32api/winnt.h:143:0,
from /usr/include/w32api/minwindef.h:163,
from /usr/include/w32api/windef.h:8,
from /usr/include/w32api/windows.h:69,
from x2x.c:100:
/usr/include/w32api/basetsd.h:192:43: error: expected identifier or '(' before ',' token
__MINGW_EXTENSION typedef __int64 LONG64,_PLONG64;
^
In file included from /usr/include/w32api/minwindef.h:163:0,
from /usr/include/w32api/windef.h:8,
from /usr/include/w32api/windows.h:69,
from x2x.c:100:
/usr/include/w32api/winnt.h:1509:60: error: unknown type name 'Value'
LONG64 InterlockedAdd64(LONG64 volatile Addend,LONG64 Value);
^
/usr/include/w32api/winnt.h:1514:74: error: unknown type name 'Value'
__forceinline LONG64 InterlockedAdd64(LONG64 volatile *Addend,LONG64 Value) { return InterlockedExchangeAdd64(Addend,Value) + Value; }
^
In file included from /usr/include/w32api/minwindef.h:163:0,
from /usr/include/w32api/windef.h:8,
from /usr/include/w32api/windows.h:69,
from x2x.c:100:
/usr/include/w32api/winnt.h:1575:69: error: expected ')' before '
' token
LONG64 Multiply128(LONG64 Multiplier,LONG64 Multiplicand,LONG64 _HighProduct);
^
/usr/include/w32api/winnt.h:1581:69: error: expected ')' before 'BYTE'
LONG64 MultiplyExtract128(LONG64 Multiplier,LONG64 Multiplicand,BYTE Shift);
^
/usr/include/w32api/winnt.h:1585:82: error: expected ')' before 'BYTE'
__CRT_INLINE LONG64 MultiplyExtract128(LONG64 Multiplier,LONG64 Multiplicand,BYTE Shift) {
^
In file included from /usr/include/w32api/minwindef.h:163:0,
from /usr/include/w32api/windef.h:8,
from /usr/include/w32api/windows.h:69,
from x2x.c:100:
/usr/include/w32api/winnt.h:3606:2: error: unknown type name 'PLONG64'
PLONG64 pInt64;
^
In file included from x2x.c:87:0:
/usr/include/w32api/winnt.h:5170:15: error: two or more data types in declaration specifiers
DWORD64 Status;
^
/usr/include/w32api/winnt.h:5309:13: error: two or more data types in declaration specifiers
DWORD Status;
^
In file included from x2x.c:87:0:
/usr/include/w32api/rpcdce.h:142:88: error: expected ';', ',' or ')' before 'int'
typedef void __RPC_API RPC_OBJECT_INQ_FN(UUID *ObjectUuid,UUID *TypeUuid,RPC_STATUS *Status);
^
In file included from /usr/include/w32api/rpc.h:82:0,
from /usr/include/w32api/windows.h:88,
from x2x.c:100:
/usr/include/w32api/rpcdce.h:210:51: error: unknown type name 'RPC_OBJECT_INQ_FN'
RPCRTAPI RPC_STATUS RPC_ENTRY RpcObjectSetInqFn(RPC_OBJECT_INQ_FN *InquiryFn);
^
In file included from x2x.c:87:0:
/usr/include/w32api/rpcdce.h:471:145: error: expected ';', ',' or ')' before 'int'
typedef void (__RPC_API *RPC_AUTH_KEY_RETRIEVAL_FN)(void *Arg,unsigned short *ServerPrincName,unsigned __LONG32 KeyVer,void *_Key,RPC_STATUS Status);
^
In file included from /usr/include/w32api/rpc.h:82:0,
from /usr/include/w32api/windows.h:88,
from x2x.c:100:
/usr/include/w32api/rpcdce.h:473:112: error: unknown type name 'RPC_AUTH_KEY_RETRIEVAL_FN'
RPCRTAPI RPC_STATUS RPC_ENTRY RpcServerRegisterAuthInfoA(RPC_CSTR ServerPrincName,unsigned __LONG32 AuthnSvc,RPC_AUTH_KEY_RETRIEVAL_FN GetKeyFn,void *Arg);
^
/usr/include/w32api/rpcdce.h:474:112: error: unknown type name 'RPC_AUTH_KEY_RETRIEVAL_FN'
RPCRTAPI RPC_STATUS RPC_ENTRY RpcServerRegisterAuthInfoW(RPC_WSTR ServerPrincName,unsigned __LONG32 AuthnSvc,RPC_AUTH_KEY_RETRIEVAL_FN GetKeyFn,void *Arg);
^
In file included from x2x.c:87:0:
/usr/include/w32api/rpcdce.h:513:81: error: expected ';', ',' or ')' before 'int'
RPCRTAPI signed int RPC_ENTRY UuidCompare(UUID *Uuid1,UUID *Uuid2,RPC_STATUS *Status);
^
/usr/include/w32api/rpcdce.h:515:72: error: expected ';', ',' or ')' before 'int'
RPCRTAPI int RPC_ENTRY UuidEqual(UUID *Uuid1,UUID *Uuid2,RPC_STATUS *Status);
^
/usr/include/w32api/rpcdce.h:516:69: error: expected ';', ',' or ')' before 'int'
RPCRTAPI unsigned short RPC_ENTRY UuidHash(UUID *Uuid,RPC_STATUS *Status);
^
/usr/include/w32api/rpcdce.h:517:59: error: expected ';', ',' or ')' before 'int'
RPCRTAPI int RPC_ENTRY UuidIsNil(UUID *Uuid,RPC_STATUS *Status);
^
/usr/include/w32api/rpcdce.h:547:140: error: expected ';', ',' or ')' before 'int'
typedef int (__RPC_API *RPC_MGMT_AUTHORIZATION_FN)(RPC_BINDING_HANDLE ClientBinding,unsigned __LONG32 RequestedMgmtOperation,RPC_STATUS *Status);
^
In file included from /usr/include/w32api/rpc.h:82:0,
from /usr/include/w32api/windows.h:88,
from x2x.c:100:
/usr/include/w32api/rpcdce.h:555:59: error: unknown type name 'RPC_MGMT_AUTHORIZATION_FN'
RPCRTAPI RPC_STATUS RPC_ENTRY RpcMgmtSetAuthorizationFn(RPC_MGMT_AUTHORIZATION_FN AuthorizationFn);
^
In file included from x2x.c:87:0:
/usr/include/w32api/rpcdcep.h:220:62: error: two or more data types in declaration specifiers
RPCRTAPI __LONG32 RPC_ENTRY I_RpcMapWin32Status(RPC_STATUS Status);
^
/usr/include/w32api/rpcasync.h:118:11: error: two or more data types in declaration specifiers
ULONG Status;
^
/usr/include/w32api/rpcnsip.h:21:81: error: two or more data types in declaration specifiers
RPCNSAPI void RPC_ENTRY I_RpcNsRaiseException(PRPC_MESSAGE Message,RPC_STATUS Status);
^
/usr/include/w32api/rpcndr.h:691:160: error: two or more data types in declaration specifiers
RPCRTAPI RPC_STATUS RPC_ENTRY NdrMapCommAndFaultStatus(PMIDL_STUB_MESSAGE pStubMsg,unsigned __LONG32 *pCommStatus,unsigned __LONG32 *pFaultStatus,RPC_STATUS Status);
^
In file included from /usr/include/w32api/ole2.h:18:0,
from /usr/include/w32api/wtypes.h:12,
from /usr/include/w32api/winscard.h:10,
from /usr/include/w32api/windows.h:97,
from x2x.c:100:
/usr/include/w32api/oleauto.h:123:40: error: expected ')' before 'BYTE'
WINOLEAUTAPI VarUI1FromI8(LONG64 i64In,BYTE *pbOut);
^
/usr/include/w32api/oleauto.h:138:39: error: expected ')' before 'SHORT'
WINOLEAUTAPI VarI2FromI8(LONG64 i64In,SHORT *psOut);
^
/usr/include/w32api/oleauto.h:153:39: error: expected ')' before 'LONG'
WINOLEAUTAPI VarI4FromI8(LONG64 i64In,LONG *plOut);
^
/usr/include/w32api/oleauto.h:167:43: error: expected declaration specifiers or '...' before '
' token
WINOLEAUTAPI VarI8FromUI1(BYTE bIn,LONG64 pi64Out);
^
/usr/include/w32api/oleauto.h:168:43: error: expected declaration specifiers or '...' before '
' token
WINOLEAUTAPI VarI8FromI2(SHORT sIn,LONG64 pi64Out);
^
/usr/include/w32api/oleauto.h:169:42: error: expected declaration specifiers or '...' before '
' token
WINOLEAUTAPI VarI8FromI4(LONG lIn,LONG64 pi64Out);
^
/usr/include/w32api/oleauto.h:170:45: error: expected declaration specifiers or '...' before '
' token
WINOLEAUTAPI VarI8FromR4(FLOAT fltIn,LONG64 pi64Out);
^
/usr/include/w32api/oleauto.h:171:46: error: expected declaration specifiers or '...' before '
' token
WINOLEAUTAPI VarI8FromR8(DOUBLE dblIn,LONG64 pi64Out);
^
/usr/include/w32api/oleauto.h:172:41: error: expected declaration specifiers or '...' before '
' token
WINOLEAUTAPI VarI8FromCy(CY cyIn,LONG64 pi64Out);
^
/usr/include/w32api/oleauto.h:173:47: error: expected declaration specifiers or '...' before '
' token
WINOLEAUTAPI VarI8FromDate(DATE dateIn,LONG64 pi64Out);
^
/usr/include/w32api/oleauto.h:174:85: error: expected declaration specifiers or '...' before '
' token
WINOLEAUTAPI VarI8FromStr(OLECHAR strIn,LCID lcid,unsigned __LONG32 dwFlags,LONG64 *pi64Out);
^
/usr/include/w32api/oleauto.h:175:64: error: expected declaration specifiers or '...' before '
' token
WINOLEAUTAPI VarI8FromDisp(IDispatch pdispIn,LCID lcid,LONG64 *pi64Out);
^
/usr/include/w32api/oleauto.h:176:55: error: expected declaration specifiers or '...' before '
' token
WINOLEAUTAPI VarI8FromBool(VARIANT_BOOL boolIn,LONG64 pi64Out);
^
/usr/include/w32api/oleauto.h:177:42: error: expected declaration specifiers or '...' before '
' token
WINOLEAUTAPI VarI8FromI1(CHAR cIn,LONG64 pi64Out);
^
/usr/include/w32api/oleauto.h:178:46: error: expected declaration specifiers or '...' before '
' token
WINOLEAUTAPI VarI8FromUI2(USHORT uiIn,LONG64 pi64Out);
^
/usr/include/w32api/oleauto.h:179:45: error: expected declaration specifiers or '...' before '
' token
WINOLEAUTAPI VarI8FromUI4(ULONG ulIn,LONG64 pi64Out);
^
/usr/include/w32api/oleauto.h:180:49: error: expected declaration specifiers or '...' before '
' token
WINOLEAUTAPI VarI8FromUI8(ULONG64 ui64In,LONG64 pi64Out);
^
/usr/include/w32api/oleauto.h:181:50: error: expected declaration specifiers or '...' before '
' token
WINOLEAUTAPI VarI8FromDec(DECIMAL pdecIn,LONG64 *pi64Out);
^
/usr/include/w32api/oleauto.h:182:44: error: expected declaration specifiers or '...' before '
' token
WINOLEAUTAPI VarI8FromInt(INT intIn,LONG64 *pi64Out);
^
/usr/include/w32api/oleauto.h:186:39: error: expected ')' before 'FLOAT'
WINOLEAUTAPI VarR4FromI8(LONG64 i64In,FLOAT *pfltOut);
^
/usr/include/w32api/oleauto.h:201:39: error: expected ')' before 'DOUBLE'
WINOLEAUTAPI VarR8FromI8(LONG64 i64In,DOUBLE *pdblOut);
^
/usr/include/w32api/oleauto.h:216:41: error: expected ')' before 'DATE'
WINOLEAUTAPI VarDateFromI8(LONG64 i64In,DATE *pdateOut);
^
/usr/include/w32api/oleauto.h:231:39: error: expected ')' before 'CY'
WINOLEAUTAPI VarCyFromI8(LONG64 i64In,CY *pcyOut);
^
/usr/include/w32api/oleauto.h:246:41: error: expected ')' before 'LCID'
WINOLEAUTAPI VarBstrFromI8(LONG64 i64In,LCID lcid,unsigned __LONG32 dwFlags,BSTR *pbstrOut);
^
/usr/include/w32api/oleauto.h:261:41: error: expected ')' before 'VARIANT_BOOL'
WINOLEAUTAPI VarBoolFromI8(LONG64 i64In,VARIANT_BOOL *pboolOut);
^
/usr/include/w32api/oleauto.h:276:39: error: expected ')' before 'CHAR'
WINOLEAUTAPI VarI1FromI8(LONG64 i64In,CHAR *pcOut);
^
/usr/include/w32api/oleauto.h:291:40: error: expected ')' before 'USHORT'
WINOLEAUTAPI VarUI2FromI8(LONG64 i64In,USHORT *puiOut);
^
/usr/include/w32api/oleauto.h:306:40: error: expected ')' before 'ULONG'
WINOLEAUTAPI VarUI4FromI8(LONG64 i64In,ULONG *plOut);
^
/usr/include/w32api/oleauto.h:321:41: error: expected ')' before 'ULONG64'
WINOLEAUTAPI VarUI8FromI8(LONG64 ui64In,ULONG64 *pi64Out);
^
/usr/include/w32api/oleauto.h:337:40: error: expected ')' before 'DECIMAL'
WINOLEAUTAPI VarDecFromI8(LONG64 i64In,DECIMAL pdecOut);
^
/usr/include/w32api/oleauto.h:353:39: error: expected ')' before 'LONG'
WINOLEAUTAPI VarI4FromI8(LONG64 i64In,LONG plOut);
^
In file included from /usr/include/w32api/ole2.h:18:0,
from /usr/include/w32api/wtypes.h:12,
from /usr/include/w32api/winscard.h:10,
from /usr/include/w32api/windows.h:97,
from x2x.c:100:
/usr/include/w32api/oleauto.h:505:36: error: unknown type name 'lRight'
STDAPI VarCyMulI8(CY cyLeft,LONG64 lRight,LPCY pcyResult);
^
In file included from x2x.c:87:0:
/usr/include/w32api/winspool.h:56:11: error: two or more data types in declaration specifiers
DWORD Status;
^
/usr/include/w32api/winspool.h:80:11: error: two or more data types in declaration specifiers
DWORD Status;
^
/usr/include/w32api/winspool.h:240:11: error: two or more data types in declaration specifiers
DWORD Status;
^
/usr/include/w32api/winspool.h:256:11: error: two or more data types in declaration specifiers
DWORD Status;
^
/usr/include/w32api/winspool.h:282:11: error: two or more data types in declaration specifiers
DWORD Status;
^
/usr/include/w32api/winspool.h:308:11: error: two or more data types in declaration specifiers
DWORD Status;
^
x2x.c:399:1: error: expected '=', ',', ';', 'asm' or '__attribute
' before 'WinMain'
WinMain (HINSTANCE hInst, HINSTANCE hPrev, LPSTR lpCmd, int nShow)
^
x2x.c: In function 'InitDpyInfo':
x2x.c:1146:42: error: 'GWL_USERDATA' undeclared (first use in this function)
SetWindowLong(pDpyInfo->bigwindow, GWL_USERDATA, (LONG) pDpyInfo);
^
x2x.c:1146:42: note: each undeclared identifier is reported only once for each function it appears in
x2x.c:1146:56: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
SetWindowLong(pDpyInfo->bigwindow, GWL_USERDATA, (LONG) pDpyInfo);
^
x2x.c:1147:57: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
SetWindowLong(pDpyInfo->edgewindow, GWL_USERDATA, (LONG) pDpyInfo);
^
x2x.c: In function 'DoWakeUp':
x2x.c:1440:30: warning: passing argument 3 of 'DPMSInfo' from incompatible pointer type
if (!DPMSInfo(dpy, &state, &onoff))
^
In file included from x2x.c:94:0:
/usr/include/X11/extensions/dpms.h:47:15: note: expected 'BOOL ' but argument is of type 'BOOL *'
extern Status DPMSInfo(Display *, CARD16 *, BOOL *);
^
x2x.c: In function 'WinProcessMessage':
x2x.c:2689:54: error: 'GWL_USERDATA' undeclared (first use in this function)
PDPYINFO pDpyInfo = (PDPYINFO) GetWindowLong(hwnd, GWL_USERDATA);
^
x2x.c: In function 'SendKeyEvent':
x2x.c:3361:9: warning: 'XKeycodeToKeysym' is deprecated (declared at /usr/include/X11/Xlib.h:1687) [-Wdeprecated-declarations]
if (XKeycodeToKeysym(pShadow->dpy, keycode, winShift ? 1:0) != keysym){
^
x2x.c:3363:11: warning: 'XKeycodeToKeysym' is deprecated (declared at /usr/include/X11/Xlib.h:1687) [-Wdeprecated-declarations]
if (XKeycodeToKeysym(pShadow->dpy,keycode,winShift ? 0:1) == keysym){
^
x2x.c: In function 'ProcessSelectionNotifyW':
x2x.c:3521:51: warning: cast from pointer to integer of different size -Wpointer-to-int-casttype, format, (int)nitems, (int)prop,
^
Makefile:440: recipe for target 'x2x.o' failed
make[1]: *
* [x2x.o] Error 1
make[1]: Leaving directory '/home/P645/x2x-dev'
Makefile:328: recipe for target 'all' failed
make: *** [all] Error 2

Any key opens "Gnome help" on distant computer

Hi, I'm using x2x between an Arch Linux laptop and a desktop computer running Ubuntu 14.04.4 LTS. I compiled x2x on both machine using the git version.

The target computer is the desktop computer, and the source (on which I've got the mouse and the keyboard) is my laptop.

The setup works perfectly for the mouse (click and move is ok), however whenever I hit any key with my mouse on the target computer, the "gnome help" pops up. This is also the case for Ctrl, Alt, Shift keys.

Mouse speed lag on xserver-xsdl

There is an immense mouse lag when using this with xserver-xsdl. I suspect that the power saving features of Android devices cause it to poll/listen with a very low refresh rate, resulting in mouse location update commands to queue.

If this hypothesis is correct, there should be an option to only update the mouse location at a rate of 1/100th the current one. Or perhaps a custom value.

Anther way, not sure if possible because I really don't know a lot about the X internals, is to calculate the new position based on all previously queued positions to clear the queue on every update.

x2x - error: can not open display

I'm trying to connect from Ubuntu 18.04 to Mendel Linux but keep getting x2x - error: can not open display
Ubuntu 18.04 = 10.0.0.1
Mendel Linux = 10.0.0.2

Both Ubuntu and Mendel machines have enabled:
ForwardX11 in /etc/ssh/ssh_config, and
X11Forwarding in /etc/ssh/sshd_config.

I've also executed xhost + on both machines.

I get the following outputs when I check DISPLAY:
Ubuntu 18.04:
set | grep DISPLAY
DISPLAY=:0

echo $DISPLAY
:0

Mendel:
set | grep DISPLAY
DISPLAY=:0
WAYLAND_DISPLAY=wayland-0

echo $DISPLAY
:0

So then I executed export DISPLAY=:0 on both Ubuntu and Mendel.
And executed export WAYLAND_DISPLAY=wayland-0 on Mendel.

And finally, from Ubuntu terminal, I execute:
ssh -X [email protected] x2x -from 10.0.0.1:0 -to 10.0.0.2:0 -west
but get the following error:
x2x - error: can not open display 10.0.0.1:0

So then I tried:
ssh -X [email protected] x2x -from :0 -to 10.0.0.2:0 -west
but get the following error:
x2x - error: can not open display 10.0.0.2:0

And then obviously:
ssh -X [email protected] x2x -from :0 -to :0 -west
predictably gives:
x2x: display names are both :0

What else am I missing?

Keyboard shortcut request

Hi. I was wondering if ther is any easy way of adding some kind of shortcut, or hot key to change from one screen to another. Something like put the mouse cursor in the middle of the other screen. That way you could practically avoid getting your hands off the keyboard.
Thanks

Cursor constrained when using multiple monitors with deadspace.

Hello,

I have two computers that I connect with x2x. My mouse is plugged into computer A, and computer A has two monitors with differenht sizes. The X11 setup I have is smart enough to stop my mouse from entering the dead space caused by the different sizes. This creates a problem with x2x, though: when I move my mouse over to computer B's screen, there is an area of the monitor that I can't move my mouse to, and I think it's the same shape as the dead space on computer A.

I don't know how easy this is to fix. Is it possible to change x2x so that when the mouse on machine A is hidden, it doesn't let it leave the first screen?

Let me know if you want more details. If you give me a general idea of what needs to be changed, I might find some time to fiddle with the source myself, since I have the setup that triggers the bug.

Thanks for making x2x!

Disparate target/source sizes cause wraparound and/or jumpiness

Looking at commit 00a6a16 from @hamishcoleman that almost fixed issue #5 in my case (THANKS)

The wrap-around problem that appear with this commit gives me an idea for a more general approach of the problem (ie: allow to reach any part of any target desktop layout and resolution)

It should be possible to move the hidden cursor in the source display too no ?

So maybe the hidden cursor in the source display could be restricted to an area (or not) and "wrapped around" so that we can compute deltas that could be added to the current cursor position in the target display instead of using the absolute source display cursor coordinates ?

(with an optional scale - the default scale could be computed using the size in mm returned by X for each screen as in xrandr)

So the question is: is it possible to move the hidden cursor in the source display to achieve this ?

Mouse cursor invisible

Many thanks for your amazing and very interesting X2X.
I use it in original way and I have problem to see mouse cursor on the client machine.
Server is Ubuntu 10.4 with XRDP + TightVNC server
Client is tablet PC on Windows CE (sorry, no choice !) with RDP client
I use X2X over to the "to" display option, keyboard work, the mouse is active (II can focuse windows and clic R is active, ex: menu on desktop) but the mouse cursor is not visible. Only the original pointer from CE is visible and don't move.
I have try many options in x2x, rdp, vnc, x11, but it's seems to be outside of my competence .
Do you have some idea ?
Thanks Frank French Guiana

Instead of -west / -east (etc), put remote screen between two local screens

I have a comp (A) with 3 screens running debian / Xorg. Screens: A1, A2, A3

I have another comp (B) with 1 screen running debian / Xorg. Screens: B1

I wish to control the B1 screen from my computer A. X2x allows for that, beautifully (whoever made this program shall be sanctified).

The only thing that I miss to be completely happy and in awe would be some option that would allow me to put the screens in the following order:

A1 B1 A2 A3

Right now, with -west or -east options I can only do B1 A1 A2 A3 or A1 A2 A3 B1.

Thanks for all the suggestions, and again, I've been using x2x since the 90s. What a nice program, thanks for maintaining it.

X2X can't move mouse to secondary screen if a primary window is too close to the edge after upgrade to Ubuntu 18.04

Starting after upgrading to Ubuntu 18.04 from 16 (switching from the Unity desktop to the Gnome desktop), when I try to move the mouse to the right to my secondary screen it will stop at the edge of the screen if the primary screen has a window too close to the edge of the screen. If the primary screen has a window maximized, for instance I can't move the mouse to the secondary screen until I un-maximize. If a window takes up the top half of the primary screen, I must move the mouse cursor over the right threshold on the bottom half of the screen to successfully move it to the secondary screen. I'm sure that it has something to do with releasing the mouse cursor and possibly there is a work-around like making the 1 pixel wide x2x window "always on top" or something like that but I'm unsure how to do that. Thanks for your help and for a wonderful tool.

Clipboard should also be transferred

Now the primary selection (created by marking, and pasted using the middle mouse button) is transferred to all screens (created using Ctrl+C or Ctrl+X, and pasted using Ctrl+V), but not the clipboard selection, using xclip terminology from man xclip. I think also the clipboard selection should be transferred to all screens. The two selections should still be separated since it is useful with two clipboards.

This is related to #7, but is a request to add a feature.

Question : Can I control a windows with this ?

I want to have one keyboard on my office and control multiples computers, can I use x2x to control windows machines or is it only for linux ?

There is a mention of windows in the readme but no executables or tutorials for windows 😩

Thanks in advance ❤️

Could you please make a release?

The source code says that the version is 1.30. But there is no release. Lack of releases can cause confusion, and the package not being updated because automatic release detectors will not find new versions.

keyup and keypress event in chrome/firefox keeps firing when holding a key

Hi and thanks for the awesome x2x
I don't know if this is a chrome/firefox bug or it's x2x bug.
when I use chrome/firefox via x2x, keyup and keypress events keeps firing after holding down anykey.
to reproduce

open new tab
press F12 to open devtools
on console tab enter 
    document.addEventListener("keyup", console.log)
select window
press anykey

The -resurface otion is not working

Hi,

When x2x windows are obscured by another window, they never come back upfront even when -resurface or -struts options are used.

I was able to fix the issue by setting the class of the x2x windows to InputOutput instead of InputOnly (at x2x.c:1270).
InputOnly windows never receive the VisibilityNotify event, thus the ProcessVisibility() callback is never called.
Xlib documentation confirming : https://tronche.com/gui/x/xlib/events/window-state-change/visibility.html

Mouse cursor jump from the rightmost screen to the leftmost screen

My setup is like this:

images 6

The "mouseless" screen is the rightmost one.

When in the rightmost screen I hit the the left border above the top of the middle screen, the cursor jumps at the same level in the leftmost screen

Then I cannot come back in the rightmost screen without going down and crossing the middle screen.

Instead the cursor should stay in the rightmost screen.

Clipboard handling

Is it possible to have a better clipboard handling? At this time only X old "select and middle click" clipboard works, and not always.
Using an editor with windows on both machines may be a workaround, but not this nimble. Thank you.

keys not working /characters missing

Hello there,
x2x is really an amazing tool!! I love it, however some of my keys are not workikng, I have in both sides an english international keyboard and there are some keys that do not work on remote node: ", ', ´, `, ~
unfortunately there's no error output ...
I'm using ubuntu maverik and debian lenny, both with the repository version of x2x.
thanks!!

Scary clang uninitialized variable warnings

These can be replicated with ./configure CC=clang.

$ clang -Wall -c x2x.c
x2x.c:1047:7: warning: variable 'xoff' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
  if (doEdge) { /* edge triggers x2x */
      ^~~~~~
x2x.c:1254:22: note: uninitialized use occurs here
  xsh->x           = xoff;
                     ^~~~
x2x.c:1047:3: note: remove the 'if' if its condition is always false
  if (doEdge) { /* edge triggers x2x */
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
x2x.c:930:17: note: initialize the variable 'xoff' to silence this warning
  int       xoff, yoff; /* window offsets */
                ^
                 = 0
x2x.c:1047:7: warning: variable 'yoff' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
  if (doEdge) { /* edge triggers x2x */
      ^~~~~~
x2x.c:1255:22: note: uninitialized use occurs here
  xsh->y           = yoff;
                     ^~~~
x2x.c:1047:3: note: remove the 'if' if its condition is always false
  if (doEdge) { /* edge triggers x2x */
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
x2x.c:930:23: note: initialize the variable 'yoff' to silence this warning
  int       xoff, yoff; /* window offsets */
                      ^
                       = 0
x2x.c:1047:7: warning: variable 'width' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
  if (doEdge) { /* edge triggers x2x */
      ^~~~~~
x2x.c:1256:22: note: uninitialized use occurs here
  xsh->base_width  = width;
                     ^~~~~
x2x.c:1047:3: note: remove the 'if' if its condition is always false
  if (doEdge) { /* edge triggers x2x */
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
x2x.c:931:21: note: initialize the variable 'width' to silence this warning
  unsigned int width, height; /* window width, height */
                    ^
                     = 0
x2x.c:1047:7: warning: variable 'height' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
  if (doEdge) { /* edge triggers x2x */
      ^~~~~~
x2x.c:1257:22: note: uninitialized use occurs here
  xsh->base_height = height;
                     ^~~~~~
x2x.c:1047:3: note: remove the 'if' if its condition is always false
  if (doEdge) { /* edge triggers x2x */
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
x2x.c:931:29: note: initialize the variable 'height' to silence this warning
  unsigned int width, height; /* window width, height */
                            ^
                             = 0
4 warnings generated.

x2x: display names are both :0

When I run the following command:
ssh -YC [email protected] "x2x -west -to :0"

I get the following message and it doesn't connect:
x2x: display names are both :0

Any idea what the issue is and how to fix it?

Edge pixels are inaccessible.

It would be really nice if x2x allowed to move the cursor to the edge pixels of the screen as well, currently they're just unreachable which breaks KDE's panel autohide (panel becomes inaccessible).

Wayland!

Hi x2x team!

I've just discover x2x and I can see it being part of my daily use from now on. One problem that is looming on the horizon is the Wayland compositor which seems poised to replace Xorg. I'm using Fedora 25 now and it defaults to Wayland. x2x fails to work, but no error messages are thrown on either side of the connection. I suspect there is some deficit in Wayland's backwards compatibility features has failed to implement a necessary API interface for x2x.

My question is, can we modify x2x to also support Wayland? Should we make some API requests to the Wayland team? Should we do a refactor as part of the modernizing that has been requested on this project's README.md? I may have some programming time to spare. Let me know your thoughts on the correct path forward.

Keyboard keys not being sent.

Mouse pointer is working but type on the keyboard has no effect on remote machine, keyboard keys are not sent to my host machine though. Installed on a Raspberry Pi

Force the control back to the machine

I was wondering whether it would be possible to have 2 machines, each normally controlling itself, where either machine could temporarily take control of the other.

On host 1: ssh -X host_2 "x2x -east -to :0.0"

On host 2: ssh -X host_1 "x2x -west -to :0.0"

This could either be very clever (and potentially useful), or very stupid. It turns out to be the latter. When the controls are crossed, both machines get stuck, and it's necessary to
chvt 1; killall x2x in order to get either to respond..

Maybe this is inevitable, but it would be nice if X2X could prevent the error, even if it did so by crashing out in once instance.

Similarly, if the network dies, the machine with the keyboard cannot get control back.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.