meta data for this page
  •  

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
linux:prepare:x_window [2016/02/14 11:16] niziaklinux:prepare:x_window [2023/01/03 11:49] (current) niziak
Line 1: Line 1:
-=== default window manager ===+====== X Window system ====== 
 +based on XFCE 
 + 
 +==== Font smoothing ==== 
 +  * Settings -> Appearance -->  (it works only for XFCE desktop) 
 + 
 +<file xml | ~/.fonts.conf> 
 +<?xml version="1.0" ?> 
 +<!DOCTYPE fontconfig SYSTEM "fonts.dtd"> 
 +<fontconfig> 
 +<!-- 
 +    <match target="font"> 
 + <edit name="autohint" mode="assign"><bool>true</bool></edit> 
 +    </match> 
 +--> 
 + <!-- 
 +            use rgb sub-pixel ordering to improve glyph appearance on 
 +            LCD screens.  Changes affecting rendering, but not matching 
 +            should always use target="font"
 +   --> 
 +       <match target="font"> 
 +            <edit name="rgba" mode="assign"><const>rgb</const></edit> 
 +            <edit name="hintstyle" mode="assign"><const>hintfull</const></edit> 
 +       </match> 
 +</fontconfig> 
 + 
 +</file> 
 + 
 +  * Chrom browser. Go to [[chrome://flags]] and find ''LCD text antialiasing'' 
 +  * Firefox. Go to [[about:config]] and find ''gfx.use_text_smoothing_setting'' 
 +  *  
 +==== Focus stealing ==== 
 +  * Settings -> Window Manager -> Focus 
 +  * Settings -> Window Manager Tweaks -> Focus 
 + 
 +==== set default window manager ====
 <code bash> <code bash>
 update-alternatives --config x-session-manager update-alternatives --config x-session-manager
 +# /usr/bin/startxfce4
 update-alternatives --config x-window-manager update-alternatives --config x-window-manager
 +# /usr/bin/xfwm4
 update-alternatives --config x-terminal-emulator update-alternatives --config x-terminal-emulator
 +# /usr/bin/xfce4-terminal.wrapper
 +</code>
 +
 +=== Enable CTRL+ALT+DEL to kill X-server ===
 +<code bash>dpkg-reconfigure keyboard-configuration</code>
 +
 +
 +=== XFCE4: restore working TAB key and CTRL+D ===
 +<file | ~/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml>
 +<property name="&lt;Super&gt;Tab" type="string" value="empty"/>
 +
 +</file>
 +
 +=== misc ===
 +<code bash>apt-get install browser-plugin-vlc</code>
 +
 +
 +=== Power management ===
 +<code bash>sudo apt-get install acpi-support</code>
 +
 +Turn off monitors command and lock:
 +<code bash>
 +xset dpms force off
 +xscreensaver-command --lock
 +</code>
 +
 +=== Control minitor brightness ===
 +<code bash>
 +xrandr --output HDMI2 --brightness 0.5
 +xrandr --output VGA1 --brightness 0.5
 +</code>
 +
 +=== Enable/disable 2nd monitor ===
 +<code bash>
 +xrandr --output HDMI2 --off
 +xrandr --output HDMI2 --auto --right-of VGA1
 +</code>
 +==== Using Brighntess Controller ====
 +<code bash>sudo apt-get install python-wxgtk3.0 python-pyside</code>
 +
 +Download and install latest version from [[http://lordamit.github.io/Brightness]].
 +Do not use Ubuntu's deb because it contain old version.
 +
 +
 +==== Using Indicator Brightness ====
 +apt-get install libappindicator1 libdbusmenu-gtk4 libindicator7 python-appindicator python-gobject
 +apt-get install notify-osd
 +
 +wget http://launchpadlibrarian.net/196377180/notify-osd-icons_0.8%2B15.04.20150202-0ubuntu1_all.deb
 +dpkg -i dpkg -i notify-osd-icons_0.8+15.04.20150202-0ubuntu1_all.deb
 +
 +wget http://ppa.launchpad.net/indicator-brightness/ppa/ubuntu/pool/main/i/indicator-brightness/indicator-brightness_0.4~bzr11~ubuntu15.04.1_all.deb
 +dpkg -i indicator-brightness_0.4~bzr11~ubuntu15.04.1_all.deb
 +
 +
 +sudo apt-get install software-properties-common python-software-properties
 +sudo add-apt-repository ppa:indicator-brightness/ppa
 +sudo apt-get update
 +sudo apt-get install indicator-brightness
 +
 +
 +
 +=== Open PDFs in okular ===
 +Force system to ask how to open file:
 +<code bash>mimeopen -d file.pdf</code>
 +or
 +<code bash>
 +xdg-mime query filetype document.pdf
 +xdg-mime query default application/pdf
 +xdg-mime default okularApplication_pdf.desktop application/pdf 
 +# or kde4-okularApplication_pdf.desktop
 +</code>
 +see
 +<code bash>
 +cat /usr/share/applications/mimeinfo.cache and defaults.list 
 +cat  ~/.local/share/applications/mimeapps.list 
 +</code>
 +
 +sudo update-mime-database /usr/share/mime
 +
 +=== Multimonitor ===
 +use xrandr to list available outputs. Example output:
 +
 +<code>
 +Screen 0: minimum 320 x 200, current 1920 x 1080, maximum 8192 x 8192
 +VGA1 connected 1366x768+0+0 (normal left inverted right x axis y axis) 410mm x 230mm
 +   1366x768      59.79*+
 +...
 +HDMI1 disconnected (normal left inverted right x axis y axis)
 +HDMI2 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 477mm x 268mm
 +   1920x1080     60.00*+
 +...
 +DP1 disconnected (normal left inverted right x axis y axis)
 +HDMI3 disconnected (normal left inverted right x axis y axis)
 +</code>
 +
 +To set layout of monitor:
 +<code bash>
 +xrandr --output VGA1 --right-of HDMI2
 +</code>
 +
 +You need to create startup script with above command, and configure XFCE to run it at start (read more below).
 +
 +There is also graphical UI available:
 +<code bash>apt-get install arandr</code>
 +
 +To make settings permanent, use **Layout** --> **Save as**
 +This will create executable script in **~/.screenlayout/your_name.sh**
 +
 +Then add above executable script to autostart of XFCE:
 +**Application Menu** --> **Settings** --> **Session and Startup**
 +
 +=== remote VNC access ===
 +Start VNC after first user login (from autostart):
 +
 +<code bash>
 +$ sudo apt-get install x11vnc
 +$ mkdir -p ~/.config/autostart
 +$ cd ~/.config/autostart
 +$ cat > X11VNC.desktop
 +</code>
 +
 +And paste following content:
 +
 +<code ini>
 +[Desktop Entry]
 +Encoding=UTF-8
 +Type=Application
 +Name=X11VNC
 +Comment=
 +Exec=x11vnc -forever -usepw -httpport 5900
 +StartupNotify=false
 +Terminal=false
 +Hidden=false
 +</code>
 +
 +Finish pasting with CTRL+D
 +
 +Password file (~/.vnc/passwd) you can create using //vncpasswd// command.
 +
 +==== vnc4server ====
 +
 +in file ~/.vnc/xstartup
 +
 +add before executing x-session:
 +
 +<file bash ~/.vnc/xstartup>
 +if test -z "$DBUS_SESSION_BUS_ADDRESS" ; then
 + eval `dbus-launch --sh-syntax –exit-with-session`
 + echo "D-BUS per-session daemon address is: \
 + $DBUS_SESSION_BUS_ADDRESS"
 +fi
 +</file>
 +
 +Update:
 +It looks like now vncserver expects that ''xstartup'' to stay foreground, so simply:
 +<file bash ~/.vnc/xstartup>
 +xsession &
 +dbus-launch --exit-with-session lxsession
 +</file>
 +
 +=== Sound ===
 +<code>
 +apt-get install pavucontrol pavumeter
 +</code>
 +
 +=== Trackball/mouse ===
 +<code bash>apt-get install xinput</code>
 +For touchscreen, please install also xinput-calibrator
 +
 +<code bash>
 +xinput list # to see device list and ids
 +xinput list-props 10 # list props for device id=10
 </code> </code>