X: Difference between revisions

From miki
Jump to navigation Jump to search
Line 90: Line 90:


=== Synergy ===
=== Synergy ===
==== Install ====
==== Install - Windows ====
<ul>
In Windows:
* Execute setup program.
<li> Execute setup program.</li>
* Set the client to start automatically at PC startup
<li> Set the client to start automatically at PC startup</li>
* Set the service ''Synergy Client'' to start manually.
<li> Set the service ''Synergy Client'' to start manually.</li>
<li> Check that the keymap for all users are identical.</li>
* To launch the client:
<li> To launch the client:</li>
<div style="padding-left:2em;"><source lang="winbatch">net start "Synergy Client" ::to start Synergy Client</source></div>
<source lang="winbatch">net start "Synergy Client"</source>
* Also, ideally check that the keymap for all users are identical - cfr [[NXP Dell Latitude D620]]).
</ul>


In Linux:
==== Install - Linux ====
<ul>
* To launch the client:
<li> Configuration file <tt>/etc/synergy.conf</tt></li>
<div style="padding-left:2em;"><source lang="bash">sudo synergyc --daemon --restart -n clientname servername</source></div>
<li> '''Client''' &mdash; Manual launch:</li>
<source lang="bash">sudo synergyc --daemon --restart -n clientname servername</source>
<li> '''Server on gdm''' &mdash; Requires editing 3 ''gdm'' startup scripts. <tt>/etc/gdm/Init/Default</tt>:</li>
<source lang="bash">
#
# Start the synergy server
#
/usr/bin/killall synergys
sleep 1
/usr/bin/synergys --config /etc/synergy.conf --daemon
</source>
<li> At the beginning of <tt>/etc/gdm/PostLogin/Default</tt>:</li>
<source lang="bash">
#
# Kill all running synergy server
#
/usr/bin/killall synergys
sleep 1
</source>
<li> At the beginning of <tt>/etc/gdm/PreSession/Default</tt>:</li>
<source lang="bash">
#
# Start synergy server
#
/usr/bin/killall synergys
sleep 1
/usr/bin/synergys --config /etc/synergy.conf --daemon
</source>
</ul>


==== Troubleshoot ====
==== Troubleshoot ====
<ul>
;Chinese bug
:When copy/pasting text (incl. address bar) from Firefox to a remote Windows screen, chinese characters are printed instead. A workaround is to install package '''xselection''' (or '''xsel'''), and type in a console '''<tt>xselection PRIMARY</tt>''' before pasting in the remote Windows screen.
<li>'''Firefox Chinese bug''' &mdash; When copy/pasting text (incl. address bar) from Firefox to a remote Windows screen, chinese characters are printed instead. Workaround:</li>
<source lang="bash">
;Security
sudo apt-get install xsel # Install xsel (Ubuntu) / xselection (opensuse)
:Data are not encrypted between the server and the client(s). To enable this, use SSH port forwarding. Run on the remote client:
xsel -p # (Ubuntu) Before pasting in the remote Windows screen
:<source lang="bash">
xselection PRIMARY # (opensuse)
</source>
<li>'''Security''' &mdash; Data are not encrypted between the server and the client(s). To enable this, use SSH port forwarding. Run on the remote client:</li>
<source lang="bash">
ssh -f -N -L 24800:<server-name>:24800 <user-server-name>@<server-name> && synergyc localhost
ssh -f -N -L 24800:<server-name>:24800 <user-server-name>@<server-name> && synergyc localhost
</source>
</source>
:However, this creates some lag, and mouse movement are a bit jerky. Another solution is to not use wireless connection, and connect computers through a network switch so that local communication are not visible to other computers on the network.
However, this creates some lag, and mouse movement are a bit jerky. Another solution is to not use wireless connection, and connect computers through a network switch so that local communication are not visible to other computers on the network.
<li>'''Login / Unlocking screen saver on Windows client''' &mdash; On Windows client, Synergy must be configured to '''autostart at boot''' in order to be able to unlock a session (eg. when client screensaver is protected by a password).</li>
;Login / Unlocking screen saver on Windows client
<li>'''Keymaps''' &mdash; Server and all client must be configured to all use exactly the '''same keymap'''. On Windows client, this is valid for logged user but also for at least ''Administrator'' account. Otherwise typing in the login window will give incorrect characters.</li>
:On Windows client, Synergy must be configured to '''autostart at boot''' in order to be able to unlock a session (eg. when client screensaver is protected by a password).
<li>Can't get '''tilde''' character ('''<tt>~</tt>''') on a ''Belgian-french'' keyboard on windows client / Linux server with {{kb|AltGr}}<font color="blue">=</font></li>
;Keymaps
Workaround: Use {{kb|C}}{{kb|A}}<font color="blue">=</font> followed by {{kb|space}}.
:Server and all client must be configured to all use exactly the '''same keymap'''. On Windows client, this is valid for logged user but also for at least ''Administrator'' account. Otherwise typing in the login window will give incorrect characters.
<li>Can't connect to server. Possibly because synergy client not started with '''root''' privileges</li>
;Troubleshoot
</ul>
:*Can't get '''tilde''' character ('''<tt>~</tt>''') on a ''Belgian-french'' keyboard on windows client (using Linux server) with keypress <tt>AltGr-=</tt>
::Workaround: Use keypress '''<tt>Ctrl-Alt-=</tt>''' followed by <tt>Space</tt>.
:*Can't connect to server. Possible causes:
:** '''synergy client''' not started with '''root''' privileges

Revision as of 21:54, 24 January 2011

General

  • xset is a user preference utility for X. It can be used to set different settings in X.
    To get the current configuration settings:
  • xset q
    

Windows Manager

References

The function of the window manager is to draw the windows in a certain place, with a certain size, and let them be movable and resizable.

Most common Window Managers on Ubuntu:

  • Metacity — The default GNOME Window Manager
  • Kwin — KDE Window Manager
  • Compiz

Windows Decorator

The window decorator draws the window borders. It is not necessary to move the window, since alt+click & drag will still work even when the window decorator has crashed.

  • Metacity has its own window decorator built-in
  • KWin also has its own window decorator built-in
  • Compiz supports 3 different window decorators:
    • gtk-window-decorator
    • kde-window-decorator
    • emerald — The window decorator inherited from Beryl, the ancestor of Compiz.

Themes

Gnome:

  • GTK theme — controls how buttons look, the colors of text, the window background, the scrollbars, and the menubar styles.
  • Metacity theme — just controls the window border's style.

KDE:

  • Qt theme — does the buttons, scrollbars, etc.,
  • Kwin has its own themes for window borders.

When Compiz is used, the theme used depends on the selected window decorator. gtk-window-decorator uses Metacity themes, kde-window-decorator used kwin themes, Emerald has its own themes.

Input Devices

Use xev (package x11-utils) to detect keyboard or mouse presses, as well as any X events (show keycode - i.e. scancode, keypress, button press...).

Mouse

To adjust mouse properties, use xset m. Default settings (restored with xset m):

Pointer Control: acceleration:  2/1    threshold:  4

Set custom settings:

xset m 1/1 2         # xset m [acc_mult[/acc_div] [thr]]

In Gnome, mouse settings can also be configured in System → Hardware → Mouse.

Keyboard

Qwerty / Azerty

Some tips and tricks to (touch-)type on a QWERTY keyboard when the keymap is set to AZERTY.

The main issue is that AZERTY keyboard has an additional key next to the left SHIFT key. This key gives access to <, to > (Shift) and to \ (AltGr). To obtain these keys on a QWERTY keyboard, the basic trick is to temporarily switch the keyboard layout. Alternatively, one can use under X:

  • <:
  • >:
  • \: Use AltGr-- (on QWERTY, i.e. AltGr-) on AZERTY)

Layout

To change keyboard layout (xfree86):

#Set to BE layout
xprop -root -f _XKB_RULES_NAMES 8s -set _XKB_RULES_NAMES xfree86
setxkbmap -model pc105 -layout be
#Set to US layout
xprop -root -f _XKB_RULES_NAMES 8s -set _XKB_RULES_NAMES xfree86
setxkbmap -model pc104 -layout us

Multiple keyboards - Change keyboard layout on each device separately ([1])

setxkbmap -device 3 af       #Set device 3 to Farsi (to find device id, try 1 and then up)
setxkbmap -device 3 us       #Set it back to US


Utilities

See Linux Commands for a list of X-related commands, and programs to manage key bindings in X. See Linux Software for list of X-related software.

Screenshot

  • In Gnome,
    • Press PrtScn to take a screenshot of the complete desktop.
    • Press Alt + PrtScn to take a snapshot of window under mouse pointer.
  • See all Linux Software#Shutter
  • There exists also plenty of command-line & GUI solutions ([2]).

Synergy

Install - Windows

  • Execute setup program.
  • Set the client to start automatically at PC startup
  • Set the service Synergy Client to start manually.
  • Check that the keymap for all users are identical.
  • To launch the client:
  • net start "Synergy Client"
    

Install - Linux

  • Configuration file /etc/synergy.conf
  • Client — Manual launch:
  • sudo synergyc --daemon --restart -n clientname servername
    
  • Server on gdm — Requires editing 3 gdm startup scripts. /etc/gdm/Init/Default:
  • #
    # Start the synergy server
    #
    /usr/bin/killall synergys
    sleep 1
    /usr/bin/synergys --config /etc/synergy.conf --daemon
    
  • At the beginning of /etc/gdm/PostLogin/Default:
  • #
    # Kill all running synergy server
    #
    /usr/bin/killall synergys
    sleep 1
    
  • At the beginning of /etc/gdm/PreSession/Default:
  • #
    # Start synergy server
    #
    /usr/bin/killall synergys
    sleep 1
    /usr/bin/synergys --config /etc/synergy.conf --daemon
    

Troubleshoot

  • Firefox Chinese bug — When copy/pasting text (incl. address bar) from Firefox to a remote Windows screen, chinese characters are printed instead. Workaround:
  • sudo apt-get install xsel           # Install xsel (Ubuntu) / xselection (opensuse)
    xsel -p                             # (Ubuntu) Before pasting in the remote Windows screen
    xselection PRIMARY                  # (opensuse)
    
  • Security — Data are not encrypted between the server and the client(s). To enable this, use SSH port forwarding. Run on the remote client:
  • ssh -f -N -L 24800:<server-name>:24800 <user-server-name>@<server-name> && synergyc localhost
    

    However, this creates some lag, and mouse movement are a bit jerky. Another solution is to not use wireless connection, and connect computers through a network switch so that local communication are not visible to other computers on the network.

  • Login / Unlocking screen saver on Windows client — On Windows client, Synergy must be configured to autostart at boot in order to be able to unlock a session (eg. when client screensaver is protected by a password).
  • Keymaps — Server and all client must be configured to all use exactly the same keymap. On Windows client, this is valid for logged user but also for at least Administrator account. Otherwise typing in the login window will give incorrect characters.
  • Can't get tilde character (~) on a Belgian-french keyboard on windows client / Linux server with AltGr=
  • Workaround: Use CA= followed by space.
  • Can't connect to server. Possibly because synergy client not started with root privileges