This file is indexed.

/usr/share/anyremote/cfg-data/Server-mode/winManager.cfg is in anyremote-data 6.5-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
%
% anyremote configuration file for basic window manager operations (Server-mode)
% prerequisites: xwd, ImageMagic
%

% STATUS stable
% TODO handle FIRE joystick button on Nokia's
% XTEST yes
% SOUND no
% ENV no

GuiAppName=Window manager
GuiAppBinary=true
GuiAppType=Custom
GuiAppDesc=Shows screen of PC on screen of the phone. Beware: Can cause java crash on some Nokia's and Samsung's
GuiAppProtocols=Server

[Protocol]=Server

(Init)=\
	Include($(CfgDir)/Utils/aliases-server.cfg);\
	Macro(TEST_IMAGEMAGIC);\
	Macro(TEST_XWD);\
	Macro(DISPLAYSIZE);\
	Make(var,wm_scale,by_value,15);\
	Make(var,wm_cx,by_value,120);\
	Make(var,wm_cy,by_value,160);\
	Make(var,wm_px,by_value,120);\
	Make(var,wm_py,by_value,160);\
	Make(var,wm_rotate,by_value,);

(Connect)=\
	Set(parameter,debug,on);Set(status,Press 1 to see screenshot);\
	Set(icons,WinManager,1,folder,2,fullscreen,3,default,4,default,5,default,6,default,7,default,8,default,9,default,*,question,0,no,#,default);\
	Get(screen_size);

TEST_XWD=\
	Exec(P=`which xwd 2> /dev/null|grep xwd|grep -v no|wc -l|tr -d " "`;\
            if [ "x$P" = "x1" ]; then true; \
            else $(CfgDir)/Utils/message.sh "ERROR: xwd is not installed"; fi);

DISPLAYSIZE=\
	Make(var,dpy_tmp,xdpyinfo|grep dimensions|tr -s ' '|cut -f 3 -d ' ');\
	Make(var,wm_dx,echo $(dpy_tmp)|cut -f 1 -d 'x');\
    Make(var,wm_dy,echo $(dpy_tmp)|cut -f 2 -d 'x');

Cancel=\
    Make(exit);

* *=Set(text,replace,Help, Window manager.\n 1 - to show screenshot\nthen use joystick to move a cursor);

Back=\
    Set(list,close);Set(text,close);Set(image,close);Set(menu,replace,)

0=Make(exit);
1=Macro(SHOW);
2=Set(fullscreen,toggle);Get(screen_size);

% sure that SizeY will be second one
SizeX($$)=\
	Make(var,wm_cx,by_value,$(Index));\
	Make(var,wm_px,by_value,$(Index));
	
SizeY($$)=\
	Make(var,wm_cy,by_value,$(Index));\
	Make(var,wm_py,by_value,$(Index));\
	Macro(SWAP,if [ "x$(wm_rotate)" = "x-rotate 90" ]; then echo 0; else echo 1; fi;);\
	Macro(SETSCALE);

% sure that PressedY will be second one
PressedX($$)=\
	Make(var,pr_x,echo "$(Index) $(wm_scale)"|awk '{n=split($0,a);print int(a[1]*a[2]) }');

PressedY($$)=\
	Make(var,pr_y,echo "$(Index) $(wm_scale)"|awk '{n=split($0,a);print int(a[1]*a[2]) }');\
	Make(var,pos_x,X=$(pr_x);if [ "x$(wm_rotate)" = "x-rotate 90" ]; then X=$(pr_y);fi;echo $X);\
	Make(var,pos_y,Y=$(pr_y);if [ "x$(wm_rotate)" = "x-rotate 90" ]; then Y=`expr $(wm_dy) - $(pr_x)`;fi;echo $Y);\
    Emulate(mousemove,$(pos_x),$(pos_y),sleep,200000,mouse,1);\
    Macro(SHOW2);

PosX($$)=\
	Make(var,pp_x,echo "$(Index) $(wm_scale)"|awk '{n=split($0,a);print int(a[1]*a[2]) }');

PosY($$)=\
	Make(var,pp_y,echo "$(Index) $(wm_scale)"|awk '{n=split($0,a);print int(a[1]*a[2]) }');\
	Make(var,pos_x,X=$(pp_x);if [ "x$(wm_rotate)" = "x-rotate 90" ]; then X=$(pp_y);fi;echo $X);\
    Make(var,pos_y,Y=$(pp_y);if [ "x$(wm_rotate)" = "x-rotate 90" ]; then Y=`expr $(wm_dy) - $(pp_x)`; fi;echo $Y);\
    Emulate(mousemove,$(pos_x),$(pos_y));

SWAP=\
	Make(var,tmp,by_value,$(wm_cx));\
	Make(var,wm_cx,by_value,$(wm_cy));\
	Make(var,wm_cy,by_value,$(tmp));

WINMENU=\
	Set(menu,replace,Zoom,Close Window,Update,Rotate,Center Cursor,Cursor to UL,Dynamic);

%GETIMAGEPROPS=\
%	Make(var,im_x,file -b $(TmpDir)/scr.png|cut -d ',' -f 2|tr -d ' '|cut -d 'x' -f 1);\
%	Make(var,im_y,file -b $(TmpDir)/scr.png|cut -d ',' -f 2|tr -d ' '|cut -d 'x' -f 2);

SETSCALE=\
	Make(var,wm_scale,echo "$(wm_cx) $(wm_cy) $(wm_dx) $(wm_dy)"|\
                    awk '{n=split($0,a);r1=a[3]/a[1];r2=a[4]/a[2];if(r2>r1) r1=r2; z=sprintf("%f",r1);print z;}');

SHOW=\
	ExecAndSet(image,window,xwd -silent -root|\
            convert xwd:- -resize $(wm_cx)x$(wm_cy) $(wm_rotate) -depth 8 $(TmpDir)/scr.png;echo $(TmpDir)/scr.png);\
	Macro(WINMENU);

SHOW2=\
	ExecAndSet(image,window,sleep 1;xwd -silent -root|\
                convert xwd:- -resize $(wm_cx)x$(wm_cy) $(wm_rotate) -depth 8 $(TmpDir)/scr.png;echo $(TmpDir)/scr.png);\
	Macro(WINMENU);

Close Window=\
	Emulate(keydown,Alt_L,key,F4,keyup,Alt_L);\
	Macro(SHOW2);
	
Update=\
	Macro(SHOW);

Rotate=\
	Make(var,wm_rotate,if [ "x$(wm_rotate)" = "x" ]; then echo "-rotate 90"; else echo ""; fi);\
    Macro(SWAP);\
    Macro(SETSCALE);\
    Macro(SHOW2);
	
Cursor to UL=\
	Emulate(mousemove,0,0);\
	Make(var,cur_tmp,echo "$(wm_dy) $(wm_scale)"|awk '{n=split($0,a);print int(a[1]/a[2]);}');\
	ExecAndSet(image,set_cursor,XM=$(cur_tmp);OUT='0,0';\
        if [ "x$(wm_rotate)" = "x-rotate 90" ]; then OUT="$XM,0"; fi;echo $OUT);

Center Cursor=\
	Make(var,ccx,echo $(wm_dx)|awk '{print $0/2;}');\
	Make(var,ccy,echo $(wm_dy)|awk '{print $0/2;}');\
	Emulate(mousemove,$(ccx),$(ccy));\
    ExecAndSet(image,set_cursor,echo "$(ccx) $(ccy) `echo $(wm_scale)|cut -f 3 -d ' '`"|\
        awk '{n=split($0,a);z=sprintf("%d,%d",a[1]/a[3],a[2]/a[3]);print z;}');

Dynamic=\
	Set(image,dynamic_cursor);\
	Set(menu,replace,Zoom,Close Window,Update,Rotate,Center Cursor,Cursor to UL,NonDynamic);

NonDynamic=\
	Set(image,cursor);\
	Set(menu,replace,Zoom,Close Window,Update,Rotate,Center Cursor,Cursor to UL,Dynamic);

Zoom=\
	Make(mode,Zoom);

[Mode]=Zoom

(EnterMode)=\
	Macro(WINSIZE);\
	Macro(SETSCALE);\
	Macro(SHOWWIN);\
	Set(menu,replace,Update,Close);\
	Set(image,nocursor);
	
(ExitMode)=\
	Macro(DISPLAYSIZE);\
	Macro(SETSCALE);\
	Macro(SHOW2);\
	Macro(WINMENU);\
	Set(image,cursor);

WINSIZE=\
	Exec(cd $(TmpDir);xwininfo > xwi.tmp);Emulate(sleep,100000,mouse,1);\
	Make(var,wm_dx,sleep 1;cat $(TmpDir)/xwi.tmp|grep "\-geometry"|tr -s ' '|cut -d ' ' -f 3|cut -d 'x' -f 1);\
    Make(var,wm_dy,cat $(TmpDir)/xwi.tmp|grep "\-geometry"|tr -s ' '|cut -d ' ' -f 3|cut -d 'x' -f 2|cut -d '-' -f 1);

SHOWWIN=\
	ExecAndSet(image,window,sleep 1;\
                    cd $(TmpDir);xwd -id `grep "Window id" xwi.tmp|\
                    cut -d ' ' -f 4` -silent|convert xwd:- -resize $(wm_cx)x$(wm_cy) $(wm_rotate) -depth 8 scr.png;\
                    echo $(TmpDir)/scr.png);\
	Macro(GETIMAGEPROPS);

Update=\
	Macro(SHOWWIN);

Close=\
	Make(mode,default);

Back=\
	Make(mode,default);

[ModeEnd]

[End]