Ubuntu users guide eye candy

Материал из NNLUG Wiki

Перейти к: навигация, поиск

Eye Candy

Как установить Xgl/Compiz (Nvidia)



sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf_backup
sudo gedit /etc/X11/xorg.conf
  • Найдите эту секцию
Section "Module"
	Load	"i2c"
	Load	"bitmap"
	...
	Load	"type1"
	Load	"vbe"
EndSection
  • Закомментируйте dri и GLcore (если присутствуют)
#	Load	"dri"
#	Load	"GLcore"
  • Убедитесь что glx модуль загружаеться
	Load	"glx"
  • Найдите эту секцию (у вас может отличаться)
Section "Device"
	Identifier	"NVIDIA Corporation NV34M [GeForce FX Go5200]"
	Driver		"nv"
	BusID		"PCI:1:0:0"
EndSection
  • Замените следующими строчками,оставив Identifier и BusID без изменений
Section "Device"
	...
	Driver		"nvidia"
	...
	Option		"RenderAccel"		"true"
	Option		"AllowGLXWithComposite" "true"
EndSection
  • Найдите эту секцию
Section "Screen"
	Identifier	"Default Screen"
	Device		"NVIDIA Corporation NV34M [GeForce FX Go5200]"
	Monitor		"Generic Monitor"
	DefaultDepth	16
  • Убедитесь что DefaultDepth установлен в 24
	DefaultDepth	24
  • Сохраните файл
  • Установите Xgl/Compiz
sudo apt-get install compiz xserver-xgl libgl1-mesa xserver-xorg libglitz-glx1 compiz-gnome
sudo cp /etc/gdm/gdm.conf-custom /etc/gdm/gdm.conf-custom-backup
sudo gedit /etc/gdm/gdm.conf-custom
  • Все замените на следующие строки
# GDM Configuration Customization file.
#
# This file is the appropriate place for specifying your customizations to the
# GDM configuration.   If you run gdmsetup, it will automatically edit this
# file for you and will cause the daemon and any running GDM GUI programs to
# automatically update with the new configuration.  Not all configuration
# options are supported by gdmsetup, so to modify some values it may be
# necessary to modify this file directly by hand.
# 
# To hand-edit this file, simply add or modify the key=value combination in
# the appropriate section in the template below.  Refer to the comments in the
# gdm.conf file for information about each option.  Also refer to the reference
# documentation.
# 
# If you hand edit a GDM configuration file, you should run the following
# command to get the GDM daemon to notice the change.  Any running GDM GUI
# programs will also be notified to update with the new configuration.
#
# gdmflexiserver --command="UPDATE_CONFIG <configuration key>"
#
# For example, the "Enable" key in the "[debug]" section would be specified by
# "debug/Enable".
#
# You can also run gdm-restart or gdm-safe-restart to cause GDM to restart and
# re-read the new configuration settings.  You can also restart GDM by sending
# a HUP or USR1 signal to the daemon.  HUP behaves like gdm-restart and causes
# any user session started by GDM to exit immediately while USR1 behaves like
# gdm-safe-restart and will wait until all users log out before restarting GDM.
# 
# For full reference documentation see the gnome help browser under
# GNOME|System category.  You can also find the docs in HTML form on
# http://www.gnome.org/projects/gdm/
# 
# NOTE: Lines that begin with "#" are considered comments.
# 
# Have fun!

[daemon]

[security]

[xdmcp]

[gui]

[greeter]

[chooser]

[debug]

[servers]# Override display 1 to use Xgl
0=Xgl 

[server-Xgl] 
name=Xgl server 
command=/usr/bin/Xgl :0 -fullscreen -ac -accel glx:pbuffer -accel xv:fbo 
flexible=true
  • Создайте скрипт который запускает Xgl/Compiz при загрузке
sudo gedit /usr/bin/thefuture
  • Вставьте следующие строки в новый файл. Замените .us в соответствии с настройками клавиатуры для района. Например .uk для Англии. Если не уверены, оставьте .us
#!/bin/bash
gnome-window-decorator &  compiz --replace gconf decoration wobbly fade minimize cube rotate zoom scale move resize place switcher &
xmodmap /usr/share/xmodmap/xmodmap.us
  • Сохраните файл
sudo chmod 755 /usr/bin/thefuture
  • Запустите compiz для текущей сессии
thefuture
  • Для запуска compiz при загрузке
    • System -> Preferences -> Sessions
    • Startup Programs -> Add
/usr/bin/thefuture
  • Проблемы
    • Если кажеться, что Xgl/Compiz не работает, или возникают ошибки, просто перезагрузите компьютер после добавления "thefuture" в автозагрузку
    • Если перемещение окон тормозит систему,запустите в терминале gconf-editor. Найдите apps/compiz/general/screen0/options. Отключите detect_refresh_rate и выставьте refresh rate в 60. Теперь все должно работать...
    • Если вы используете не стандартную раскладку клавиатуры (другой язык), вам, возможно, придется опять изменить ее на ту, что вам нужна в System/Settings/Keyboard.
    • Там же вы можете установить Super-клавишу для кнопки окна.
  • Подсказки
    • Переключение окон = Alt + Tab
    • Упорядочивание и просмотр всех окон = F12 включает или выключает; клик на окно фокусирует его
    • Переключение рабочих столов на кубе = Ctrl + Alt + Стрелка Влево/Вправо
    • Переключение рабочих столов на кубе - с перемещением активного окна = Ctrl + Shift + Alt + Стрелка Влево/Вправо
    • Вращение куба = Ctrl + Alt + левый клик
    • Изменение прозрачности = сейчас возможно только с помощью утилиты "transset"
    • Приближение = Super-клавиша правый клик
    • Увеличение = Super-клавиша + колесо мыши вверх
    • Уменьшение = Super-клавиша + колесо мыши вниз
    • Двигать окно = Alt + левый клик
    • Прикрепление окна(цепляет к краю) = Ctrl + Alt + левый клик
    • Изменение размера окна = Alt + правый клик