Difference between revisions of "Unity"

From ArchWiki
Jump to: navigation, search
m (Some grammar clean-ups)
m (Indicator messages doesn't work properly)
(46 intermediate revisions by 7 users not shown)
Line 1: Line 1:
[[Category:Desktop environments (English)]]
+
[[it:Notify OSD]]
[[Category:Eye candy (English)]]
+
[[zh-CN:Unity]]
{{i18n|Unity}}
+
[[Category:Desktop environments]]
 
+
 
{{Article summary start|Summary}}
 
{{Article summary start|Summary}}
 
{{Article summary text|This article discusses how to install and use Unity. Unity is a shell interface for the GNOME desktop environment. This article covers how to get Unity on your system and how to configure it to fit your needs.}}
 
{{Article summary text|This article discusses how to install and use Unity. Unity is a shell interface for the GNOME desktop environment. This article covers how to get Unity on your system and how to configure it to fit your needs.}}
Line 9: Line 8:
 
{{Article summary end}}
 
{{Article summary end}}
  
[http://unity.ubuntu.com/ Unity] is an alternative shell for the GNOME desktop environment, developed by Canonical in its Ayatana project. It consists of several components including the Launcher, Dash, lenses, Panel, indicators, Notify OSD and Overlay Scrollbar. Unity available in two implementations: 'Unity' is the 3D accelerated version, which uses Compiz window manager and Nux toolkit; and 'Unity 2D' is a lighter alternative, which uses Metacity window manager and Qt toolkit.
+
[http://unity.ubuntu.com/ Unity] is an alternative shell for the GNOME desktop environment, developed by Canonical in its Ayatana project. It consists of several components including the Launcher, Dash, lenses, Panel, indicators, Notify OSD and Overlay Scrollbar. Unity used to available in two implementations: 'Unity' is the 3D accelerated version, which uses Compiz window manager and Nux toolkit; and 'Unity 2D' is a lighter alternative, which uses Metacity window manager and Qt toolkit. Unity 2D is already dropped by Canonical from Ubuntu 12.10. Instead a version powered by Gallium3D llvmpipe alternative is used.
  
 
== Installation ==
 
== Installation ==
All of these packages are available in the [[Arch User Repository]] and [http://ayatana.info/ Ayatana] repository. Please note that
+
There are two ways to install Unity on Archlinux:
*Some packages require a patched version of gtk2, gtk3 and qt packages (named with '-ubuntu' suffix). When you install these patched packages, pacman will inform you about conflicting packages. It's normal, and you can safely accept to remove the original ones. If you decide to no longer use Unity packages, it's recommended to reinstall the original packages.
+
*'''from source code'''
*Some packages are split to avoid depending on both version (2 and 3) of the GTK+ toolkit.
+
*'''from repository'''
{{Warning|Remember you're installing '''unofficial''' packages that unsupported by the Arch Linux developers.}}
+
=== From source ===
 +
All of the pkgbuilds can be browsed in [https://github.com/chenxiaolong/Unity-for-Arch Github repository], where [https://github.com/chenxiaolong/Unity-for-Arch Unity-For-Arch] provides a minimal working Unity shell, [https://github.com/chenxiaolong/Unity-for-Arch-Extra Unity-For-Arch-Extra] provides some additoinal applications including '''lightdm-ubuntu'''(lightdm with ubuntu patch), '''light-themes''', '''ubuntu-tweak'''(a popular ubuntu tweak tool) and so on.
 +
 
 +
To install minimal Unity shell:
 +
 
 +
1. 'cd' to a directory that you want to keep the sources in and then run:
 +
{{bc|$ git clone https://github.com/chenxiaolong/Unity-for-Arch.git}}
 +
Where {{Pkg|git}} is required.
 +
 
 +
2 Open the README file and build packages according to the order listed. Basically run:
 +
{{bc|$ cd packagename
 +
$ rm -rvf # Clears out any files from a previous build
 +
$ makepkg -sci # '-s' means install needed dependencies, '-c' means clear left files after build and '-i' means install the package after it is built.
 +
}}
 +
3. Log out and log into the Unity session.
 +
 
 +
To use lightdm to start Unity, almost the same steps need to be followed to instal '''lightdm-ubuntu''' and '''lightdm-unity-greeter''' from [https://github.com/chenxiaolong/Unity-for-Arch-Extra Unity-For-Arch-Extra]. And lightdm needs to be added to autostart daemons. For Systemd users, check [https://wiki.archlinux.org/index.php/Systemd wiki article about Systemd].
 +
 
 +
{{Tip|To make this procedure automatic, [https://gist.github.com/3906721 a script] can be used.}}
 +
 
 +
=== From repository ===
 +
Compiled packages are also available at [http://unity.humbug.in/ unity.humbug.in] and [http://unity.xe-xe.org/ unity.xe-xe.org].
 +
Take '''unity.xe-xe.org''' as an example, to install the packages,
 +
add
 +
{{bc|
 +
[unity]
 +
Server = http://unity.xe-xe.org/$arch
 +
 
 +
[unity-extra]
 +
Server = http://unity.xe-xe.org/extra/$arch
 +
}}
 +
to {{ic|/etc/pacman.conf}}
 +
 
 +
Run:
 +
{{bc|
 +
$ pacman -Suy
 +
$ pacman -S $(pacman -Slq unity)}}
  
=== Unity ===
+
{{Tip| There are many ubuntu-patched packages that replace original Arch packages.
As noted in the introduction, Unity is available in two implementation: Unity and Unity 2D. Both provides the same functionality, but Unity requires 3D acceleration. To make sure that you can run Unity, run the following command (provided by package {{AUR|nux}}):
+
      Also it is recommended to use freetype2-ubuntu and libxft-ubuntu from AUR.}}
{{bc|$ /usr/lib/nux/unity_support_test -p}}
+
  
Depending on your choice,
+
{{Warning|Remember you're installing '''unofficial''' packages that are unsupported by the Arch Linux developers.}}
*'''Unity''' can be installed with package {{AUR|unity}},
+
{{Warning|Almost all of the packages related to Unity in AUR are outdated. Don't mix those packages with those from the repository.}}
*'''Unity 2D''' can be installed with the package {{AUR|unity-2d}} and {{AUR|metacity-ubuntu}}.
+
  
metacity-ubuntu is optional, but provides better integration with the window manager (e.g. hide windows title bar when maximized) and some bug fixes.
+
==Update==
 +
For Unity repository, the update is the same as packages from official repositories.
  
These packages provide the Unity/Unity 2D session, and a basic interface with Launcher, Dash and Panel. You should install some more packages to get a fully functional desktop environment (see below).
+
Otherwise:
  
=== Lenses ===
+
1. 'cd' into the 'Unity-for-Arch' directory where it was originally cloned
Lenses bring some additional functionality to Dash. Dash is a central place to search, filter, open and launch applications, documents, music etc..
+
*'''Applications Lens''' provides access to installed applications. It can be installed with package {{AUR|unity-lens-applications}}.
+
*'''Files Lens''' provides access to user's documents and files. It can be installed with the package {{AUR|unity-lens-files}}.
+
*'''Music Lens''' provides access to music library from Banshee. It can be installed with the package {{AUR|unity-lens-music}}.
+
*'''Gwibber Lens''' provides access to social network messages from Gwibber. It can be installed with the package {{AUR|gwibber-unity}}.
+
  
=== Indicators ===
+
2. pull all of changes from github repository:
Indicators bring some additional functionality to Panel. Panel is the horizontal bar at the top of the screen to display application and status icons and menus.
+
{{bc|$ git pull}}
 +
3. Check if packages need to be updated:
 +
{{bc|$ ./What_can_I_update\?.py}}
 +
4. If any packages need to be updated, just build them like mentioned above in '''from source''' section.
  
GNOME/Unity require GTK+ 3 indicators:
+
{{Note| Sometimes if certain crucial package is updated, those package which depend on it will also need to be recompiled though they won't be reported. For example, '''Unity''' is often required to be recompiled if '''nux''' gets updated}}
*'''Application Indicator''' exposes status icons and menus from applications. It can be installed with the package {{AUR|indicator-application}}.
+
*'''Appmenu Indicator''' exposes menubars from applications. It can be installed with the package {{AUR|indicator-appmenu}}.
+
*'''Datetime Indicator''' provides the current time, and access to [[Evolution]] events. It can be installed with the package {{AUR|indicator-datetime}}.
+
*'''Messages Indicator''' provides the Messages menu to collect new messages. It can be installed with the package {{AUR|indicator-messages}}.
+
*'''Network Indicator''' provides the Network menu for controlling [[Connman|ConnMan]]. It can be installed with the package {{AUR|indicator-network}}.
+
*'''Power Indicator''' provides the Power menu for displaying battery life. It can be installed with the package {{AUR|indicator-power}}.
+
*'''Session Indicator''' provides the Users and Devices menus for switch users, access some pluggable devices, logout and shutdown/restart the computer. It can be installed with the package {{AUR|indicator-session}}.
+
*'''Sound Indicator''' provides the Sound menu for control media players and volume. It can be installed with the package {{AUR|indicator-sound}}.
+
  
Xfce/LXDE require GTK+ 2 indicators:
+
==Trouble Shooting==
*'''Application Indicator for GTK+ 2''' can be installed with the package {{AUR|indicator-application-gtk2}}.
+
===Unity stops working after update===
*'''Messages Indicator for GTK+ 2''' can be installed with the package {{AUR|indicator-messages-gtk2}}.
+
Try to run:
*'''Sound Indicator for GTK+ 2''' can be installed with the package {{AUR|indicator-sound-gtk2}}.
+
{{bc|$ compiz.reset}}
 +
and Log out and log into the Unity session.
  
==== Application Indicator support ====
+
If it still doesn't work, report an issue on [https://github.com/chenxiaolong/Unity-for-Arch/issues?state=open github] or discuss it on [https://bbs.archlinux.org/viewtopic.php?id=125423&p=1 Arch forum].
Application Indicator requires explicit support from applications/toolkits to expose applications' status icons and menus. Basically, all applications/toolkits supported that implements the [http://www.notmart.org/misc/statusnotifieritem/index.html Status Notifier Specification].
+
*'''Qt StatusNotifierItem''' turns all QSystemTrayIcon into StatusNotifierItems. It can be installed with the package {{AUR|sni-qt}}.
+
Currently, GTK+ applications require individual support to be displayed in Application Indicator.
+
  
==== Appmenu Indicator support ====
+
===Window decoration doesn't work properly===
Appmenu Indicator requires explicit support from applications/toolkits to expose applications' menubars.
+
Try to install {{Pkg|gnome-tweak-tool}} to adjust the theme.
*'''Appmenu GTK+''' exposes menubars from standard GTK+ applications (both from version 2 and 3). It can be installed with the package {{AUR|appmenu-gtk}}.
+
*'''Appmenu Qt''' exposes menubars from Qt applications. It can be installed with the package {{AUR|appmenu-qt}}.
+
*'''LibreOffice Menubar extension''' exposes menubar from LibreOffice. It can be installed with the package {{AUR|libreoffice-extension-menubar}}.
+
  
==== Messages Indicator support ====
+
===Window decoration can't use certain theme===
Messages Indicator requires explicit support from applications to indicate new messages.
+
Install metacity-ubuntu instead of metacity.
*{{AUR|cloudsn}}
+
*{{pkg|emesene}}
+
*{{AUR|evolution-indicator}} for Evolution
+
*{{AUR|gm-notify}}
+
*{{AUR|gwibber}}
+
*{{AUR|liferea-indicator}} for Liferea
+
*{{AUR|pidgin-indicator}} for Pidgin
+
*{{AUR|indicator-popper}}
+
*{{AUR|quassel-indicator}} for Quassel
+
*{{AUR|smuxi}}
+
*{{AUR|specto}}
+
*{{AUR|telepathy-indicator}} for Empathy
+
*{{AUR|xchat-indicator}} for XChat and XChat-GNOME
+
  
==== Sound Indicator support ====
+
===Some gtk themes look ugly after update to Gnome 3.6===
Sound Indicator requires explicit support from media players. Basically, all media players are supported that implements the [http://www.mpris.org/2.1/spec/ MPRIS 2 specification]:
+
It also happens for unity default theme light-themes. Put
*{{pkg|Banshee}}
+
{{bc|
*{{pkg|Clementine}}
+
GtkLabel {
*{{pkg|Rhythmbox}}
+
background-color: @transparent;
*{{AUR|Xnoise}}
+
}
 +
}}
 +
in {{ic|.config/gtk3.0/gtk.css}}
  
==== Indicators in GNOME, KDE, Xfce and LXDE ====
+
===Newly opened window is always placed at (0,0) on the screen===
*'''Indicator Applet''' puts all indicators into the GNOME Panel. It can be installed with the package {{AUR|indicator-applet}}.
+
'''Metacity-ubuntu''' needs to be used instead of {{Pkg|metacity}}. '''Metacity-ubuntu''' is now included in [https://github.com/chenxiaolong/Unity-for-Arch Unity-for-Arch] again.
*'''Xfce Indicator Plugin''' puts all indicators into the Xfce4 Panel. It can be installed with the package {{AUR|xfce4-indicator-plugin}}.
+
*'''Xfce Appmenu Plugin''' provides a global menu for Xfce4 Panel. It can be installed with the package {{AUR|xfce4-appmenu-plugin}}.
+
*'''LXPanel Indicator Applet''' plugin puts all indicators into the LXPanel. It can be installed with the package {{AUR|lxpanel-indicator-applet-plugin}}.
+
*'''Message Indicator Plasma Widget''' provides Messages Indicator functionality by collecting new messages. It can be installed with the package {{AUR|plasma-widget-message-indicator}}.
+
*'''Menubar Plasma Widget''' provides Appmenu Indicator functionality by exposing menubars from applications. It can be installed with the package {{AUR|plasma-widget-menubar}}.
+
*'''Oxygen Appmenu''' is an oxygen style for kwin displaying application menu in titlebar (via menu button). It can be installed with the package {{AUR|oxygen-appmenu}}.
+
  
=== Notify OSD ===
+
===Window's titlebar still exists when maximized===
'''Notify OSD''' (On-Screen Display) is an on-screen notification agent designed by Canonical. It presents notifications in semi-transparent click-through bubbles from applications that implement the [http://developer.gnome.org/notification-spec/ Desktop Notifications Specification]. It can be installed with the package {{AUR|notify-osd}}.
+
'''Metacity-ubuntu''' needs to be used instead of {{Pkg|metacity}}.
  
=== Overlay Scrollbar ===
+
===''Indicator-messages'' doesn't work properly===
'''Overlay Scrollbar''' is a design enhancement to save some space on the screen: it hides the scrollbars of the windows, and shows them only when you move your mouse near to the application's border. It can be installed with the package {{AUR|overlay-scrollbar}}.
+
Pidgin and a bunch of other applications can not be integrated into indicator-messages due to its API changes. Wait for the upstream software updates or you can help file a bug report.
  
It works only with standard GTK+ applications (both with version 2 and 3). For Qt apps, you need to install {{AUR|qt-ubuntu}} package, which implicitly disables Overlay Scrollbar to avoid crashes when gtk style used ([https://bugs.launchpad.net/ubuntu/+source/qt4-x11/+bug/805303 LP: #805303])
+
==Known Issues==

Revision as of 20:57, 13 November 2012

Template:Article summary start Template:Article summary text Template:Article summary heading Template:Article summary wiki Template:Article summary end

Unity is an alternative shell for the GNOME desktop environment, developed by Canonical in its Ayatana project. It consists of several components including the Launcher, Dash, lenses, Panel, indicators, Notify OSD and Overlay Scrollbar. Unity used to available in two implementations: 'Unity' is the 3D accelerated version, which uses Compiz window manager and Nux toolkit; and 'Unity 2D' is a lighter alternative, which uses Metacity window manager and Qt toolkit. Unity 2D is already dropped by Canonical from Ubuntu 12.10. Instead a version powered by Gallium3D llvmpipe alternative is used.

Installation

There are two ways to install Unity on Archlinux:

  • from source code
  • from repository

From source

All of the pkgbuilds can be browsed in Github repository, where Unity-For-Arch provides a minimal working Unity shell, Unity-For-Arch-Extra provides some additoinal applications including lightdm-ubuntu(lightdm with ubuntu patch), light-themes, ubuntu-tweak(a popular ubuntu tweak tool) and so on.

To install minimal Unity shell:

1. 'cd' to a directory that you want to keep the sources in and then run:

$ git clone https://github.com/chenxiaolong/Unity-for-Arch.git

Where git is required.

2 Open the README file and build packages according to the order listed. Basically run:

$ cd packagename
$ rm -rvf # Clears out any files from a previous build
$ makepkg -sci # '-s' means install needed dependencies, '-c' means clear left files after build and '-i' means install the package after it is built.

3. Log out and log into the Unity session.

To use lightdm to start Unity, almost the same steps need to be followed to instal lightdm-ubuntu and lightdm-unity-greeter from Unity-For-Arch-Extra. And lightdm needs to be added to autostart daemons. For Systemd users, check wiki article about Systemd.

Tip: To make this procedure automatic, a script can be used.

From repository

Compiled packages are also available at unity.humbug.in and unity.xe-xe.org. Take unity.xe-xe.org as an example, to install the packages, add

[unity]
Server = http://unity.xe-xe.org/$arch

[unity-extra]
Server = http://unity.xe-xe.org/extra/$arch

to /etc/pacman.conf

Run:

$ pacman -Suy
$ pacman -S $(pacman -Slq unity)
Tip: There are many ubuntu-patched packages that replace original Arch packages. Also it is recommended to use freetype2-ubuntu and libxft-ubuntu from AUR.
Warning: Remember you're installing unofficial packages that are unsupported by the Arch Linux developers.
Warning: Almost all of the packages related to Unity in AUR are outdated. Don't mix those packages with those from the repository.

Update

For Unity repository, the update is the same as packages from official repositories.

Otherwise:

1. 'cd' into the 'Unity-for-Arch' directory where it was originally cloned

2. pull all of changes from github repository:

$ git pull

3. Check if packages need to be updated:

$ ./What_can_I_update\?.py

4. If any packages need to be updated, just build them like mentioned above in from source section.

Note: Sometimes if certain crucial package is updated, those package which depend on it will also need to be recompiled though they won't be reported. For example, Unity is often required to be recompiled if nux gets updated

Trouble Shooting

Unity stops working after update

Try to run:

$ compiz.reset

and Log out and log into the Unity session.

If it still doesn't work, report an issue on github or discuss it on Arch forum.

Window decoration doesn't work properly

Try to install gnome-tweak-tool to adjust the theme.

Window decoration can't use certain theme

Install metacity-ubuntu instead of metacity.

Some gtk themes look ugly after update to Gnome 3.6

It also happens for unity default theme light-themes. Put

GtkLabel {
background-color: @transparent;
}

in .config/gtk3.0/gtk.css

Newly opened window is always placed at (0,0) on the screen

Metacity-ubuntu needs to be used instead of metacity. Metacity-ubuntu is now included in Unity-for-Arch again.

Window's titlebar still exists when maximized

Metacity-ubuntu needs to be used instead of metacity.

Indicator-messages doesn't work properly

Pidgin and a bunch of other applications can not be integrated into indicator-messages due to its API changes. Wait for the upstream software updates or you can help file a bug report.

Known Issues