Difference between revisions of "X11"
From Noah.org
Jump to navigationJump to searchm |
m |
||
Line 17: | Line 17: | ||
<pre> | <pre> | ||
time xwd -silent -nobdrs -id $WINDOWID | convert - -crop 32x32+0+0 -depth 8 xpm:- | time xwd -silent -nobdrs -id $WINDOWID | convert - -crop 32x32+0+0 -depth 8 xpm:- | ||
+ | </pre> | ||
+ | |||
+ | == Display apps on remote X11 desktop == | ||
+ | |||
+ | If you xserver was started to listen to TCP port 6000 then this will work. If your Xorg was started with the '''-nolisten''' option then this will '''not''' work. Note that running your X server this way is very insecure. This is the old-fashioned way of doing it. This was invented before they invented security. | ||
+ | |||
+ | On your server you need to allow clients to connect to your display. From a command-line run this command: | ||
+ | <pre> | ||
+ | xhost + | ||
+ | </pre> | ||
+ | |||
+ | On your client machine simply set your DISPLAY to the IP address of the server and then run your X app. | ||
+ | <pre> | ||
+ | export DISPLAY=192.168.1.2:0.0 | ||
+ | xclock | ||
</pre> | </pre> |
Revision as of 22:39, 21 September 2010
Get background color of shell
This is a hack. I'm still working on this.
Should be average color, but seems to be more like median. Pretty fast:
time xwd -silent -nobdrs -id $WINDOWID | convert - -gravity center -crop 1x1+0+0 -depth 8 txt:-
Average, Slower:
time xwd -silent -nobdrs -id $WINDOWID | convert - -colors 1 -crop 1x1+0+0 -depth 8 txt:-
Desktop icon of a window:
time xwd -silent -nobdrs -id $WINDOWID | convert - -crop 32x32+0+0 -depth 8 xpm:-
Display apps on remote X11 desktop
If you xserver was started to listen to TCP port 6000 then this will work. If your Xorg was started with the -nolisten option then this will not work. Note that running your X server this way is very insecure. This is the old-fashioned way of doing it. This was invented before they invented security.
On your server you need to allow clients to connect to your display. From a command-line run this command:
xhost +
On your client machine simply set your DISPLAY to the IP address of the server and then run your X app.
export DISPLAY=192.168.1.2:0.0 xclock