https://wiki.archlinux.org/api.php?action=feedcontributions&user=Muffinmad&feedformat=atomArchWiki - User contributions [en]2024-03-28T22:23:00ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=GNOME&diff=311450GNOME2014-04-22T08:51:10Z<p>Muffinmad: /* Disable blinking cursor in Terminal */</p>
<hr />
<div>[[Category:GNOME]]<br />
[[cs:GNOME]]<br />
[[de:GNOME]]<br />
[[es:GNOME]]<br />
[[fr:GNOME]]<br />
[[it:GNOME]]<br />
[[ja:GNOME]]<br />
[[nl:GNOME]]<br />
[[pl:GNOME]]<br />
[[pt:GNOME]]<br />
[[ru:GNOME]]<br />
[[sr:GNOME]]<br />
[[th:GNOME]]<br />
[[tr:Gnome Masaüstü Ortamı]]<br />
[[uk:GNOME]]<br />
[[zh-CN:GNOME]]<br />
[[zh-TW:GNOME]]<br />
{{Related articles start}}<br />
{{Related|Desktop environment}}<br />
{{Related|Display manager}}<br />
{{Related|Window manager}}<br />
{{Related|GTK+}}<br />
{{Related|GDM}}<br />
{{Related|Nautilus}}<br />
{{Related|Gedit}}<br />
{{Related|Epiphany}}<br />
{{Related|GNOME Flashback}}<br />
{{Related articles end}}<br />
<br />
[http://www.gnome.org/ GNOME] is a [[desktop environment]] developed by The GNOME Project.<br />
<br />
GNOME 3 has ''two'' sessions:<br />
<br />
*'''GNOME''' is the default, innovative layout.<br />
*'''GNOME Classic''' is a traditional desktop layout, similar to the GNOME 2 user interface whilst using GNOME 3 technologies. It does so through the use of pre-activated extensions and parameters (see [http://worldofgnome.org/welcome-to-gnome-3-8-flintstones-mode/ here] for a list). Hence it is more of a customized GNOME Shell than a truly distinct mode.<br />
<br />
Both of them use GNOME Shell, a desktop shell and plugin of the Mutter window manager. Mutter acts as a composite manager for the desktop, employing hardware graphics acceleration to provide effects aimed at reducing screen clutter. GNOME session manager automatically detects if your video driver is capable of running GNOME Shell and if not, falls back to software rendering using llvmpipe.<br />
<br />
== Installation ==<br />
<br />
GNOME 3 is available in the [[official repositories]] and can be [[pacman|installed]] with one of the following:<br />
*The {{Pkg|gnome-shell}} package provides a minimal desktop shell.<br />
*The {{Grp|gnome}} group contains the core desktop environment and applications required for the standard GNOME experience.<br />
*The {{Grp|gnome-extra}} group contains various optional tools such as an editor, an archive manager, a disk burner, a mail client, games, development tools and other non-critical applications that integrate well with the GNOME desktop. Installing just the {{Grp|gnome-extra}} group will not pull in the whole {{Grp|gnome}} group via dependencies. If you want to install all GNOME packages then you will need to explicitly install both groups.<br />
<br />
== Starting GNOME ==<br />
<br />
'''Graphical log-in'''<br />
<br />
For the best desktop integration, [[GDM]] (the GNOME [[Display manager]]) is recommended. GDM is installed as part of the {{grp|gnome}} group and can be used by enabling {{ic|gdm.service}} [[systemd#Using units|using systemd]].<br />
<br />
Other display managers can be used in place of GDM if desired.<br />
<br />
{{note|Native support for screenlocking in GNOME is provided by GDM. If you choose to not use GDM you will need to use a different screenlocking program such as [[Xscreensaver]].}} <br />
<br />
'''Starting GNOME manually'''<br />
<br />
If you prefer to start GNOME manually from the console, add the following line to your {{ic|~/.xinitrc}} file:<br />
{{hc|~/.xinitrc|<nowiki><br />
exec gnome-session<br />
</nowiki>}}<br />
<br />
Or {{ic|exec gnome-session --session&#61;gnome-classic}} for GNOME Classic. After editing your {{ic|~/.xinitrc}}, GNOME can be launched by typing {{ic|startx}}.<br />
<br />
See [[xinitrc]] for details, such as preserving the logind session.<br />
<br />
After setting up your {{ic|~/.xinitrc}} file you can also arrange to [[Start X at Login]] so that you don't have to run {{ic|startx}} manually.<br />
<br />
== Using the shell ==<br />
<br />
=== GNOME Cheat Sheet ===<br />
<br />
The [https://wiki.gnome.org/Projects/GnomeShell/CheatSheet GNOME Shell Cheat Sheet] on the GNOME Wiki explains task switching, keyboard use, window control, the panel, overview mode, and more.<br />
<br />
=== Restarting the shell ===<br />
<br />
After appearance tweaks you are often asked to restart the GNOME shell. You could log out and log back in, but it is simpler and faster to issue the following keyboard command. Restart the shell by pressing {{ic|Alt}} + {{ic|F2}} then {{ic|r}} then {{ic|Enter}}<br />
<br />
=== Shell crashes ===<br />
<br />
Certain tweaks and/or repeated shell restarts may cause the shell to crash when a restart is attempted. In this case, you are informed about the crash and then forced to log out. Some shell changes cannot be accomplished via a keyboard restart; you must log out and log back in to effect them.<br />
<br />
{{note|Valuable documents should be saved (and perhaps closed) before attempting a shell restart. It is not strictly necessary; open windows and documents usually remain intact after a shell restart however there is a risk that data could be lost if documents are not saved.}}<br />
<br />
=== Shell freezes ===<br />
<br />
Sometimes shell extensions freeze the GNOME Shell. In this case a possible strategy is to switch to another terminal via {{ic|Ctrl+Alt+F2}} through {{ic|Ctrl+Alt+F6}}, log in, and restart gnome-shell with:<br />
<br />
# pkill -HUP gnome-shell<br />
<br />
All open applications will still be available after restarting the shell.<br />
<br />
Sometimes, however, merely restarting the shell might not be enough. Then you will have to restart X, losing all work in progress. You can restart X by:<br />
<br />
# pkill X<br />
<br />
The GNOME Shell then restarts automatically.<br />
<br />
If this does not work, you can try to restart your login manager. For instance, if you use GDM, try:<br />
<br />
# systemctl restart gdm.service<br />
<br />
{{Tip|You can also use '''htop''' in tty; press ''t'', select the ''gnome-shell'' tree, press ''k'' and send ''SIGKILL''.}}<br />
<br />
== Pacman integration: GNOME PackageKit ==<br />
{{Warning|1=As of Gnome 3.12 the pacman integration with packagekit is very outdated. See [https://bbs.archlinux.org/viewtopic.php?pid=1334848#p1334848 this forum thread] and [http://worldofgnome.org/gnome-software-on-arch/ this article] for more information.}}<br />
<br />
GNOME has its own Pacman GUI: {{Pkg|gnome-packagekit}}.<br />
<br />
Using the [https://www.archlinux.org/pacman/libalpm.3.html alpm] backend, it supports the following features:<br />
<br />
* Install and remove packages from the repos.<br />
* Periodically refresh package databases and prompt for updates.<br />
* Install packages from tarballs.<br />
* Search for packages by name, description, category or file.<br />
* Show package dependencies, files and reverse dependencies.<br />
* Ignore IgnorePkgs and hold HoldPkgs.<br />
* Report optional dependencies, .pacnew files, etc.<br />
<br />
You can change the {{ic|remove}} operation from -Rc to -Rsc by setting the DConf key {{ic|org.gnome.packagekit.enable-autoremove}}.<br />
<br />
=== Packages updates notifications ===<br />
<br />
If you want GNOME to check automatically for updates, you must install {{Pkg|gnome-settings-daemon-updates}} from the official repository.<br />
<br />
== Customizing GNOME appearance ==<br />
<br />
The ''Systems Settings'' tool (provided by {{pkg|gnome-control-center}}) is a simple and streamlined panel which covers most basic settings. <br />
<br />
More elaborate graphical customization (such as modifying fonts, themes, titlebar buttons and such) can be done using the graphical ''GNOME tweak tool''. {{Pkg|gnome-tweak-tool}} is available from the [[official repositories]]. See [[#Theming]] below for more information about the subject.<br />
<br />
More extensive customisation may require more low-level configuration, using [[#gsettings and dconf]].<br />
<br />
==== Theming ====<br />
<br />
To install a new theme or icon set, put it in {{ic|~/.themes}} or {{ic|~/.icons}}. You can then activate it using ''GNOME tweak tool'', that is described above.<br />
<br />
Alternatively, you can set a GTK (icon) theme via {{ic|~/.config/gtk-3.0/settings.ini}}. In this file you can set the GTK theme ({{ic|gtk-theme-name}}), the icon theme ({{ic|gtk-icon-theme-name}}), the font ({{ic|gtk-font-name}}) and more.<br />
<br />
''Adwaita,'' the default GNOME 3 theme, is a part of {{pkg|gnome-themes-standard}}. Additional GTK3 themes can be found at [http://browse.deviantart.com/customization/skins/linuxutil/desktopenv/gnome/gtk3/ Deviantart web site.] For example:<br />
{{hc|~/gtk-3.0/settings.ini|<nowiki><br />
[Settings]<br />
gtk-theme-name = Adwaita<br />
# next option is applicable only if selected theme supports it<br />
gtk-application-prefer-dark-theme = true<br />
# set font name and dimension<br />
gtk-font-name = Sans 10<br />
</nowiki>}}<br />
<br />
It is necessary to restart the GNOME shell for settings to be applied. More GTK options are found at [http://developer.gnome.org/gtk3/3.0/GtkSettings.html#GtkSettings.properties GNOME developer documentation.]<br />
<br />
==== gsettings and dconf ====<br />
<br />
dconf is a data store used by GNOME to store its settings. It can be edited with the graphical {{ic|dconf-editor}} or the command line {{ic|gsettings}} tool. See [http://blog.fpmurphy.com/2011/03/customizing-the-gnome-3-shell.html Customizing the GNOME Shell] for a tutorial on using gsettings.<br />
<br />
=== Customize top bar ===<br />
<br />
==== Show date in top bar ====<br />
<br />
By default GNOME displays only the weekday and time in the top bar. This can be changed with the following command. Changes take effect immediately. <br />
<br />
# gsettings set org.gnome.desktop.interface clock-show-date true<br />
<br />
==== Hiding icons in the top bar ====<br />
<br />
When installing GNOME, some unwanted icons might appear in the panel. These icons can be removed by manually editing the GNOME panel script.<br />
<br />
For example, to remove the keyboard button, comment out the {{ic|'keyboard'}} line in {{ic|PANEL_ITEM_IMPLEMENTATIONS}}:<br />
<br />
{{hc|/usr/share/gnome-shell/js/ui/panel.js|<nowiki><br />
const PANEL_ITEM_IMPLEMENTATIONS = {<br />
'activities': ActivitiesButton,<br />
'aggregateMenu': AggregateMenu,<br />
'appMenu': AppMenuButton,<br />
'dateMenu': imports.ui.dateMenu.DateMenuButton,<br />
'a11y': imports.ui.status.accessibility.ATIndicator,<br />
'a11yGreeter': imports.ui.status.accessibility.ATGreeterIndicator,<br />
//'keyboard': imports.ui.status.keyboard.InputSourceIndicator,<br />
};<br />
</nowiki>}}<br />
<br />
Then, save your results and restart the shell:<br />
<br />
#{{ic|Alt+F2}}<br />
#{{ic|r}}<br />
#{{ic|Enter}}<br />
<br />
==== Eliminate delay when logging out ====<br />
<br />
The following tweak removes the confirmation dialog and sixty second delay for logging out.<br />
<br />
This dialog normally appears when you log out with the status menu. This tweak affects the '''''Power Off''''' dialog as well. This is not a system-wide change; it affects only the user who enters this command. The change takes effect immediately after entering the command.<br />
<br />
$ gsettings set org.gnome.SessionManager logout-prompt 'false'<br />
<br />
==== Show system monitor ====<br />
<br />
The [https://extensions.gnome.org/extension/120/system-monitor/ system-monitor] extension is included in the {{pkg|gnome-shell-extensions}} package. The git version is available as {{AUR|gnome-shell-system-monitor-applet-git}} in the [[AUR]].<br />
<br />
==== Show weather information ====<br />
<br />
The [https://extensions.gnome.org/extension/613/weather/ Weather] extension can be installed from [https://extensions.gnome.org/extension/613/weather/ the official extension website]. The git version is available as {{AUR|gnome-shell-extension-weather-git}} in the [[AUR]].<br />
<br />
=== Activity view ===<br />
<br />
==== Remove entries from Applications view ====<br />
<br />
Like most desktop environments, GNOME uses .desktop files to populate its Applications view. These text files are located in the '''{{ic|/usr/share/applications}}''' folder. It is not possible to edit these files from a folder view ‒ Nautilus does not treat their icons as text files. Use a terminal to display or edit .desktop file entries. You will need root privileges to edit the .desktop files.<br />
<br />
# ls /usr/share/applications<br />
# nano /usr/share/applications/foo.desktop<br />
<br />
For system wide changes, edit files in '''{{ic|/usr/share/applications}}'''. For local changes, make a copy of ''foo.desktop'' in your home folder.<br />
<br />
$ cp /usr/share/applications/foo.desktop ~/.local/share/applications/<br />
<br />
Edit .desktop files to fit your wishes. <br />
<br />
{{Note|Removing a .desktop file does not uninstall an application, but instead removes its desktop integration: MIME types, shortcuts, and so forth.}}<br />
<br />
To hide an application launcher open its .desktop file in a text editor and add the following line:<br />
<br />
NoDisplay=true<br />
<br />
==== Sort applications into folders ====<br />
<br />
Gnome 3.12 allows the user to sort applications into folders. A GUI for this is provided by Gnome Software, which Arch does not package (due to PackageKit incompatibilities). However, applications can still be sorted into folders manually via dconf. To add a folder, navigate via dconf to '''{{ic|org.gnome.desktop.app-folders}}''' and set the value of '''{{ic|folder-children}}''' to an array of comma separated folder names:<br />
<br />
['Utilities', 'Sundry']<br />
<br />
To add applications to these folders, use '''{{ic|gsettings}}''':<br />
<br />
gsettings set org.gnome.desktop.app-folders.folder:/org/gnome/desktop/app-folders/folders/Sundry/ apps "['alacarte.desktop', 'dconf-editor.desktop']"<br />
<br />
This adds the applications corresponding to '''{{ic|alacarte.desktop}}''' and '''{{ic|dconf-editor.desktop}}'''' to the Sundry folder.<br />
<br />
This will also create the folder '''{{ic|org.gnome.desktop.app-folders.folders.Sundry}}'''. The constituents of the folder can be updated from dconf or from '''{{ic|gsettings}}''', by appending applications to the list.<br />
<br />
To name the folder (if it has no name it will simply appear at the top of the applications), set the name key via '''{{ic|gsettings}}''':<br />
<br />
gsettings set org.gnome.desktop.app-folders.folder:/org/gnome/desktop/app-folders/folders/Sundry/ name "Sundry"<br />
<br />
Applications can also be sorted by their category (specified in their '''{{ic|.desktop}}''' file):<br />
<br />
gsettings set org.gnome.desktop.app-folders.folder:/org/gnome/desktop/app-folders/folders/Sundry/ categories "['Office']"<br />
<br />
If certain applications matching a category are not wanted in a certain folder, exclusions can be set:<br />
<br />
gsettings set org.gnome.desktop.app-folders.folder:/org/gnome/desktop/app-folders/folders/Sundry/ excluded-apps "['libreoffice-draw.desktop']"<br />
<br />
For further information, refer to the [https://git.gnome.org/browse/gsettings-desktop-schemas/tree/schemas/org.gnome.desktop.app-folders.gschema.xml.in.in app-folders schema].<br />
<br />
==== Change application icon size ====<br />
<br />
To change the application icon size it is necessary to edit the GNOME-Shell theme.<br />
<br />
You can edit system files directly (make a backup first) or copy theme files to your local folder and edit these files. <br />
* For the '''default''' theme, edit '''{{ic|/usr/share/gnome-shell/theme/gnome-shell.css}}'''<br />
<br />
* For '''user themes''', edit '''{{ic|/usr/share/themes/<UserTheme>/gnome-shell/gnome-shell.css}}'''<br />
<br />
Edit ''gnome-shell.css'' and replace the following values. Afterward, [[#Restarting the shell|restart the GNOME shell.]]<br />
{{hc|gnome-shell.css|<nowiki><br />
...<br />
/* Application Launchers and Grid */<br />
<br />
.icon-grid {<br />
spacing: 18px;<br />
-shell-grid-horizontal-item-size: 82px;<br />
-shell-grid-vertical-item-size: 82px;<br />
}<br />
<br />
.icon-grid .overview-icon {<br />
icon-size: 48px;<br />
}<br />
...<br />
</nowiki>}}<br />
<br />
==== Change dash icon size ====<br />
GNOME's Activities view has a dash on the left hand side, the size of the icons in this dash will scale depending on the amount of icons set to display. The scaling can be manipulated or set to a constant icon size. To do so, edit {{ic|/usr/share/gnome-shell/js/ui/dash.js}}.<br />
<br />
{{hc|dash.js|<nowiki><br />
...<br />
<br />
let iconSizes = [ 16, 22, 24, 32, 48, 64 ];<br />
<br />
...<br />
</nowiki>}}<br />
<br />
==== Change switcher (alt-tab) icon size ====<br />
GNOME comes with a built in task switcher, the size of the icons in this task switcher will scale depending on the amount of icons set to display. The scaling can be manipulated or set to a constant icon size. To do so, edit {{ic|/usr/share/gnome-shell/js/ui/altTab.js}}<br />
<br />
{{hc|altTab.js|<nowiki><br />
...<br />
<br />
const iconSizes = [96, 64, 48, 32, 22];<br />
<br />
...<br />
</nowiki>}}<br />
<br />
==== Change system tray icon size ====<br />
GNOME comes with a built in system tray, visible when the mouse is hovered over the bottom right corner of the screen. The size of the icons in this tray is set to a fixed value of 24. To change this value, edit {{ic|/usr/share/gnome-shell/js/ui/messageTray.js}}<br />
{{hc|messageTray.js|<nowiki><br />
...<br />
<br />
ICON_SIZE: 24,<br />
<br />
...<br />
</nowiki>}}<br />
<br />
==== Disable Activity hot corner hovering ====<br />
<br />
To disable automatic activity view when the hot corner is hovered, edit {{ic|/usr/share/gnome-shell/js/ui/layout.js}} (that was ''panel.js'' in GNOME 3.0.x) :<br />
{{hc|layout.js|<nowiki><br />
this._corner = new Clutter.Rectangle({ name: 'hot-corner',<br />
width: 1,<br />
height: 1,<br />
opacity: 0,<br />
reactive: true });icon-size: 48px;<br />
}<br />
</nowiki>}}<br />
and set {{ic|reactive}} to {{ic|false}}. GNOME Shell needs to be restarted.<br />
<br />
{{tip|There are also [[GNOME#GNOME_shell_extensions|GNOME Shell extensions]] that can be installed which will modify this behaviour.}}<br />
<br />
==== Disable Message Tray hovering ====<br />
<br />
The message tray is shown when the mouse hovers at the bottom of the screen for one second. To disable this behavior, comment out the following line in {{ic|/usr/share/gnome-shell/js/ui/messageTray.js}}:<br />
{{hc|messageTray.js|<nowiki><br />
//pointerWatcher.addWatch(TRAY_DWELL_CHECK_INTERVAL, Lang.bind(this, this._checkTrayDwell));<br />
</nowiki>}}<br />
GNOME Shell needs to be restarted. The message tray is still visible in activity view.<br />
<br />
=== Titlebar ===<br />
<br />
==== Reduce title bar height ====<br />
* ''' global''' - edit {{ic|/usr/share/themes/Adwaita/metacity-1/metacity-theme-3.xml}}, search for {{ic|title_vertical_pad}} and and reduce its value to a minimum of {{ic|0}}.<br />
* '''user-only''' - copy {{ic|/usr/share/themes/Adwaita/metacity-1/metacity-theme-3.xml}} to {{ic|/home/$USER/.local/share/themes/Adwaita/metacity-1/metacity-theme-3.xml}}, search for {{ic|title_vertical_pad}} and reduce its value to a minimum of {{ic|0}}.<br />
<br />
Then restart the GNOME shell. <br />
<br />
To restore the original values, [[pacman|install]] the package {{Pkg|gnome-themes-standard}} from the [[official repositories]] or remove {{ic|/home/$USER/.local/share/themes/Adwaita/metacity-1/metacity-theme-3.xml}}<br />
<br />
==== Reorder titlebar buttons ====<br />
<br />
At present this setting can be changed through '''dconf-editor.'''<br />
<br />
For example, to move the close and minimize buttons to the left side of the titlebar, open '''dconf-editor''' and locate the '''''org.gnome.shell.overrides.button_layout''''' key. Change its value to '''{{ic|close,minimize:}}''' (Colon symbol designates the spacer between left side and right side of the titlebar.) Place the buttons in your preferred order. You cannot use a button more than once. Also, keep in mind that certain buttons are deprecated. Restart the shell to see your new button arrangement.<br />
<br />
==== Hide titlebar when maximized ====<br />
The command below will hide the titlebar when windows are maximised:<br />
<br />
# sed -i -r 's|(<frame_geometry name="max")|\1 has_title="false"|' /usr/share/themes/Adwaita/metacity-1/metacity-theme-3.xml<br />
<br />
After entering the command restart the GNOME shell. After this tweak, you may find it difficult to un-maximize a window when there is no titlebar to grab.<br />
<br />
With suitable keybindings, you should be able to use {{ic|Alt+F5}}, {{ic|Alt+F10}} or {{ic|Alt+Space}} to remedy the situation.<br />
<br />
To prevent {{ic|metacity-theme-3.xml}} from being overwritten each time package {{pkg|gnome-themes-standard}} is upgraded, add its name to {{ic|/etc/pacman.conf}} with {{ic|NoUpgrade}}.<br />
<br />
{{hc|/etc/pacman.conf|<nowiki>... previous lines ...<br />
<br />
# Pacman will not upgrade packages listed in IgnorePkg and members of IgnoreGroup<br />
# IgnorePkg =<br />
# IgnoreGroup =<br />
<br />
NoUpgrade = usr/share/themes/Adwaita/metacity-1/metacity-theme-3.xml # Do not add a leading slash to the path<br />
<br />
... more lines ...</nowiki>}}<br />
<br />
To restore original Adwaita theme values, install the {{pkg|gnome-themes-standard}} package.<br />
<br />
== Miscellaneous settings ==<br />
<br />
=== Power Management ===<br />
<br />
==== Turn off Suspend-To-RAM (S3) when closing the LID ====<br />
This setting is not available in GNOME, ''gnome-control-center'' and ''dconf'' make this available. The current approach is to manage this on the level of [[systemd]]. Edit {{ic|/etc/systemd/logind.conf}}, uncomment the {{ic|HandleLidSwitch}} line and set it to {{ic|ignore}}:<br />
<br />
{{hc|/etc/systemd/logind.conf|HandleLidSwitch&#61;ignore}}<br />
<br />
See the [[Power management#ACPI_events]] article for more information.<br />
<br />
==== No reaction on lid close ====<br />
<br />
When configuring the lid close events via [[systemd#ACPI power management]], the settings may seem to have no effect. If you have an external monitor connected to your laptop, this is default GNOME behaviour. Disconnect the monitor and the settings should work, otherwise your {{ic|/etc/systemd/logind.conf}} may be incorrect.<br />
To change default behaviour open the {{ic|dconf-editor}} and change {{ic|org.gnome.settings-daemon.plugins.xrandr.default-monitors-setup}} to {{ic|"do-nothing"}}.<br />
<br />
==== Change Critical Battery Level Action (for Laptops) ====<br />
<br />
The ''System Settings'' panel only allows the user to choose between ''Suspend'' or ''Hibernate''. To choose another option such as ''Do Nothing'' open the {{ic|dconf-editor}} and navigate to {{ic|org.gnome.settings-daemon.plugins.power}}. Edit the {{ic|"critical-battery-action"}} value to {{ic|"nothing"}}.<br />
<br />
=== Switch back scrolling behavior ===<br />
If you do not like the new scrollbar behavior just put {{ic|<nowiki>gtk-primary-button-warps-slider = false</nowiki>}} under the {{ic|<nowiki>[Settings]</nowiki>}} section in {{ic|~/.config/gtk-3.0/settings.ini}}:<br />
<br />
{{hc|~/.config/gtk-3.0/settings.ini|<nowiki><br />
[Settings]<br />
gtk-primary-button-warps-slider = false<br />
...<br />
</nowiki>}}<br />
<br />
=== Autostarting / Automatic program launch upon logging in ===<br />
<br />
As of Gnome 3.12 {{ic|gnome-session-properties}} is deprecated. Specify which programs start automatically after logging in using {{ic|gnome-tweak-tool}}.<br />
<br />
=== Editing applications menu ===<br />
<br />
{{pkg|alacarte}} provides a more complete menu editor for adding/editing menu entries.<br />
<br />
=== Inner padding in Gnome Terminal===<br />
To move the terminal output away from the window borders create the stylesheet {{ic|~/.config/gtk-3.0/gtk.css}} with the following setting:<br />
<br />
TerminalScreen {<br />
-VteTerminal-inner-border: 10px 10px 10px 10px;<br />
}<br />
<br />
=== Disable blinking cursor in Terminal ===<br />
Since Gnome 3.8 and the migration to gsettings and dconf the key required to modify in order to disable the blinking cursor in the Terminal differs slightly in contrast to the old gconf key. To disable the blinking cursor in Gnome 3.8 use:<br />
<br />
gsettings set org.gnome.desktop.interface cursor-blink false<br />
<br />
If you prefer dconf to the gsettings CLI then open {{ic|dconf-editor}} and expand expand org -> gnome -> desktop -> interface and untick the option labelled '''cursor-blink'''.<br />
<br />
To disable the blinking cursor in Terminal only use (make sure profile uid is correct one):<br />
<br />
dconf write /org/gnome/terminal/legacy/profiles:/:b1dcc9dd-5262-4d8d-a863-c897e6d979b9/cursor-blink-mode "'off'"<br />
<br />
=== Make new tabs inherit current directory in Gnome Terminal (3.8+) ===<br />
In Gnome 3.8, the behaviour of how current directories are tracked has changed. To restore this behaviour, you need to source the {{ic|/etc/profile.d/vte.sh}} file, put this in your {{ic|~/.bashrc}} or {{ic|~/.zshrc}} for zsh users:<br />
<br />
source /etc/profile.d/vte.sh<br />
<br />
For more information refer to the [https://wiki.gnome.org/action/show/Apps/Terminal/FAQ?action=show&redirect=Terminal%252FFAQ#How_can_I_make_new_terminals_start_in_the_working_directory_of_the_current_terminal.3F Gnome wiki]<br />
<br />
=== Move dialog windows ===<br />
The default configuration for dialogs will not allow you to move them which causes problems in some cases. To change this you will need to use gconf-editor and change this setting:<br />
<br />
/desktop/gnome/shell/windows/attach_modal_dialogs<br />
<br />
After the change you will need to restart the shell for it to take affect.<br />
<br />
=== GNOME shell extensions ===<br />
<br />
GNOME Shell can be customized with extensions. These provide features such as a dock or a widget for changing the theme.<br />
<br />
Many extensions are collected and hosted by [https://extensions.gnome.org/ extensions.gnome.org]. They can be browsed and installed simply activating them in the browser. More information about gnome shell extensions can be found [https://extensions.gnome.org/about/ here].<br />
<br />
See [[#When an extension breaks GNOME|when an extension breaks GNOME]] for troubleshooting information.<br />
<br />
=== Default Applications ===<br />
<br />
While one can right click any file and set the default applications in 'Preferences', the settings are actually saved in {{ic | $HOME/.local/share/applications/mimeapps.list}} and {{ic| $HOME/.local/share/applications/mimeinfo.cache}}<br />
<br />
For systemwide preferences create or edit the file {{ic|/usr/share/applications/mimeapps.list}}.<br />
<br />
{{tip|If you are making the change systemwide you may to create the {{ic|/usr/share/applications/mimeapps.list}} file yourself.}}<br />
<br />
==== Default file browser/replace Nautilus ====<br />
You can specify a different file manager in the ''mimeapps.list'' file as shown below:<br />
<br />
'''User only''': add the line {{ic|<nowiki>inode/directory=myfilemanager.desktop</nowiki>}} to {{ic|~/.local/share/applications/mimeapps.list}}<br />
<br />
'''Systemwide''': add the line {{ic|<nowiki>inode/directory=myfilemanager.desktop</nowiki>}} to {{ic|/usr/share/applications/mimeapps.list}}<br />
<br />
Where my filemanager.desktop is the correct .desktop file for the file manager of your choice.<br />
<br />
<br />
Alternatively you can trick GNOME into using another file browser by editing the {{ic|Exec}} line in {{ic|/usr/share/applications/nautilus.desktop}}. See the correct parameters in the {{ic|.desktop}} file of the file manager of your choice, e.g.:<br />
{{hc|/usr/share/applications/nautilus.desktop|<br />
2=[...]<br />
Exec=thunar %F<br />
OR<br />
Exec=pcmanfm %U<br />
OR<br />
Exec=nemo %U<br />
[...]<br />
}}<br />
<br />
==== Default PDF viewer ====<br />
In some cases when you have installed Inkscape or other graphic programs Evince Document Viewer might no longer be selected as the default PDF application. If it is not available in the '''Open With''' entry which would be the GUI solution, you can use the following user command to make it the default application again.<br />
<br />
xdg-mime default evince.desktop application/pdf<br />
<br />
==== Default terminal ====<br />
<br />
{{ic|gsettings}} (which replaces {{ic|gconftool-2}}) is used to set the default terminal. The setting affects ''nautilus-open-terminal'' (a Nautilus extension).<br />
To make [[rxvt-unicode|urxvt]] the default, run:<br />
<br />
gsettings set org.gnome.desktop.default-applications.terminal exec urxvtc<br />
gsettings set org.gnome.desktop.default-applications.terminal exec-arg "'-e'"<br />
<br />
{{Note|The {{ic|-e}} flag is for executing a command. When ''nautilus-open-terminal'' invokes {{ic|urxvtc}}, it puts a {{ic|cd}} command at the end of the command line so that the new terminal starts in the directory you opened it from. Other terminals will require a different (perhaps empty) {{ic|exec-arg}}.}}<br />
<br />
=== Middle mouse button ===<br />
<br />
By default, GNOME 3 disables middle mouse button emulation regardless of [[Xorg]] settings ('''Emulate3Buttons'''). To enable middle mouse button emulation use:<br />
<br />
$ gsettings set org.gnome.settings-daemon.peripherals.mouse middle-button-enabled true<br />
<br />
=== Display dimming ===<br />
<br />
By default GNOME 3 has a ten second idle timeout to dim the screen regardless of the battery and AC state:<br />
<br />
# gsettings get org.gnome.settings-daemon.plugins.power idle-dim-time<br />
<br />
To set a new value type the following<br />
<br />
# gsettings set org.gnome.settings-daemon.plugins.power idle-dim-time <int><br />
<br />
where <int> is the value in seconds<br />
<br />
=== Changing hotkeys ===<br />
Certain hotkeys cannot be changed directly via the ''System Settings'' panel. In order to change these keys, use dconf-editor. An example of particular note is the hotkey Alt-Above_Tab. On US keyboards, this is Alt-`: is a hotkey often used in the [[Emacs]] editor. It can be changed by opening dconf-editor and modifying the ''switch-group'' key found in {{ic|org.gnome.desktop.wm.keybindings}}.<br />
<br />
It is possible to manually change the keys via an application's so-called accel map file. Where it is to be found is up to the application: For instance, Thunar's is at ~/.config/Thunar/accels.scm, whereas Nautilus's is located at ~/.config/nautilus/accels and ~/.gnome2/accels/nautilus on old release.<br />
<br />
The file should contain a list of possible hotkeys, each unchanged line commented out with a leading ";" that has to be removed for a change to become active.<br />
For example to replace the hotkey used by Nautilus to move files to the trash folder, change the line :<br />
; (gtk_accel_path "<Actions>/DirViewActions/Trash" "<Primary>Delete")<br />
to this :<br />
(gtk_accel_path "<Actions>/DirViewActions/Trash" "Delete")<br />
<br />
The file is regenerated regularly so do not comment the file. The uncommented line will stay but every comment you add will be lost.<br />
<br />
==== Hotkeys in Nautilus 3.4 and older ====<br />
Firstly, use '''dconf-editor''' to place a checkmark next to {{ic|can-change-accels}} in the key named ''org.gnome.desktop.interface.''<br />
<br />
We will replace the hotkey — a.k.a. keyboard shortcut, keyboard accelerator — used by Nautilus to move files to the trash folder.<br />
The default assignment is a somewhat-awkward {{ic|Ctrl+Delete}}.<br />
* Open Nautilus, select any file, and click '''Edit''' on the menu bar.<br />
* Hover over the ''Move to Trash'' menu item.<br />
* While hovering, press {{ic|Delete}}. The current accelerator is now unset.<br />
* Press the key that you wish to become the new keyboard accelerator.<br />
* Press {{ic|Delete}} to make the new accelerator be the Delete key.<br />
Unless you select a file or folder, ''Move to Trash'' will be grayed-out. Finally, disable {{ic|can-change-accels}} to prevent accidental hotkey changes.<br />
<br />
=== Screencast recording ===<br />
<br />
Gnome features the built-in possbility to create screencasts easily. Thereby Control+Shift+Alt+R keybinding starts and stops the recording. A red circle is displayed in the bottom right corner of the screen when the recording is in progress. After the recording is finished, a file named 'Screencast from %d%u-%c.webm' is saved in the Videos directory. In order to use the screencast feature you need to have installed the gst plugins which are:<br />
<br />
$ pacman -Qs gst<br />
<br />
=== Modify Keyboard with XkbOptions ===<br />
<br />
Using the '''dconf-editor''', navigate to the key named ''org.gnome.desktop.input-sources.xkb-options'' and add desired XkbOptions (e.g. 'caps:swapescape') to the list.<br />
<br />
See /usr/share/X11/xkb/rules/xorg for all XkbOptions and then /usr/share/X11/xkb/symbols/* for the respective descriptions.<br />
<br />
{{Note|To enable the {{ic|Ctrl+Alt+Backspace}} combination to terminate Xorg, use the {{Pkg|gnome-tweak-tool}} from [[official repositories]]. Within the Gnome Tweak Tool, navigate to ''Typing > Terminate'' and select the option {{ic|Ctrl+Alt+Backspace}} from the dropdown menu.}}<br />
<br />
=== Toggle keyboard layouts ===<br />
Since Gnome does not consider any configuration in {{ic|/etc/X11/conf.d/*.conf}} you have to set the command for layout switching either via the control center with the options ''Switch to previous source'' and ''Switch to next source'' or if you want to use Alt - Shift combination you have to use the Gnome-Tweak-Tool and set ''Typing -> Modifiers-only input sources -> select Alt-shift''. For more information see also the forum [https://bbs.archlinux.org/viewtopic.php?id=152127 thread].<br />
<br />
=== Other tips ===<br />
See [[GNOME Tips]].<br />
<br />
== Tracker (search program) ==<br />
The {{Pkg|tracker}} provides the Tracker program, an indexing application. You can configure it with {{ic|tracker-preferences}}, and monitor status with {{ic|tracker-control}}. Once installed, indexing should start automatically when you log in. You can explicitly start indexing with {{ic|tracker-control -s}}. Search settings can also be configured in the ''System Settings'' panel.<br />
<br />
== Totem (movie player) ==<br />
<br />
Totem is a movie player based on [[GStreamer]]. For information about adding codecs or hardware acceleration, see [[GStreamer]].<br />
<br />
== Empathy (integrated messaging) and GNOME Online Accounts ==<br />
<br />
Empathy, the engine behind integrated messaging, GNOME Online Accounts, and all other system settings based on messaging accounts will not function correctly unless the {{grp|telepathy}} group of packages or at least one of the backends ({{pkg|telepathy-gabble}}, or {{pkg|telepathy-haze}}, for example) is installed.<br />
<br />
These packages are '''not''' included in either the {{grp|gnome}} or {{grp|gnome-extra}} groups . You can install the Telepathy and optionally any backends with:<br />
<br />
# pacman -S telepathy<br />
<br />
Without telepathy, Empathy will not open the account management dialog and can get stuck in this state. If this happens -- even after quitting Empathy cleanly -- the {{ic|/usr/bin/empathy-accounts}} application can remain running and will need to be killed before you can add any new accounts. Likewise, without telepathy installed, the 'Add an online account' button in GNOME Online Accounts will do nothing.<br />
<br />
View descriptions of telepathy components on the [http://telepathy.freedesktop.org/wiki/Components freedesktop.org telepathy wiki].<br />
<br />
== Troubleshooting ==<br />
<br />
=== Cannot change settings in dconf-editor ===<br />
<br />
When one cannot set settings in {{pkg|dconf}}, it is possible their dconf user settings are corrupt. In this case it is best to delete the user dconf files in {{ic|~/.config/dconf/user*}} and set the settings in dconf-editor after.<br />
<br />
=== When an extension breaks GNOME ===<br />
<br />
When enabling shell extensions causes GNOME breakage, you should first remove the ''user-theme'' and ''auto-move-windows'' extensions from their installation directory.<br />
<br />
The installation directory could be one of {{ic|~/.local/share/gnome‑shell/extensions}}, {{ic|/usr/share/gnome‑shell/extensions}} or {{ic|/usr/local/share/gnome‑shell/extensions}}. Removing these two extension-containing folders may fix the breakage. Otherwise, isolate the problem extension with trial‑and‑error.<br />
<br />
Removing or adding an extension-containing folder to the aforementioned directories removes or adds the corresponding extension to your system. Details on GNOME Shell extensions are available at the [https://live.gnome.org/GnomeShell/Extensions GNOME web site.]<br />
<br />
=== Extensions do not work after GNOME 3 update ===<br />
<br />
Locate the folder where your extensions are installed. It might be {{ic|~/.local/share/gnome-shell/extensions}} or {{ic|/usr/share/gnome-shell/extensions}}.<br />
<br />
Edit each occurrence of {{ic|metadata.json}} which appears in each extension sub-folder.<br />
<br />
{| border="0"<br />
| Insert: || {{ic|"shell-version": ["3.6"]}}<br />
|-<br />
| Instead of (for example): || {{ic|"shell-version": ["3.4"]}}<br />
|}<br />
<br />
{{ic|"3.x"}} indicates the extension works with every shell version. If it breaks, you will know to change it back.<br />
<br />
=== Remove Gnome Shell Extensions ===<br />
<br />
If you have trouble with uninstalling Gnome Extensions via https://extensions.gnome.org/local/, then probably they have been installed as system-wide extensions with {{ic|pacman -S gnome-shell-extensions}} before. To remove them, you have to be careful, because the following instruction removes all extensions from other user's, too.<br />
{{ic|pacman -R gnome-shell-extensions}}<br />
Following that, you refresh Gnome Shell by pressing ALT+F2 and entering {{ic|restart}}<br />
<br />
Then go to https://extensions.gnome.org/local/ again and have a look for your installed extensions list. It should have changed.<br />
<br />
All other extensions should be removable by pressing the red X icon to the right. If not, something may be broken. <br />
<br />
As a final step, you can remove them manually from {{ic|~/.local/share/gnome-shell/extensions/*}} and/or {{ic|/usr/share/gnome-shell/extensions}}. Restart Gnome Shell again and you should be fine.<br />
<br />
=== The "Windows" key ===<br />
By default, this key is mapped to the "overlay-key" to launch the Overview. You can remove this key mapping to free up your {{ic|Windows Key}} (also called {{ic|Mod4}}), which GNOME calls {{ic|Super_L}}, by utilizing {{ic|gsettings}}.<br />
<br />
Example:<br />
{{ic| gsettings set org.gnome.mutter overlay-key 'Foo';}}.<br />
You can leave out '''Foo''' to simply remove any binding to that function.<br />
<br />
{{Note| GNOME also uses {{ic|Alt+F1}} to launch the Overview.}}<br />
<br />
=== Keyboard Shortcut do not work with only conky running ===<br />
The gnome-shell keyboard shortcuts like {{ic|Alt+F2}}, {{ic|Alt+F1}}, and the media key shortcuts do not work if conky is the only program running. However if another application like gedit is running, then the keyboard shortcuts work.<br />
<br />
solution: edit .conkyrc <br />
<br />
own_window yes<br />
own_window_transparent yes<br />
own_window_argb_visual yes<br />
own_window_type dock<br />
own_window_class Conky<br />
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager<br />
<br />
=== Window opens behind other windows when using multiple monitors ===<br />
<br />
This is possibly a bug in GNOME Shell which causes new windows to open behind others.<br />
Unchecking "workspaces_only_on_primary" in desktop/gnome/shell/windows using gconf-editor solves this problem.<br />
<br />
=== Multiple monitors and dock extension ===<br />
<br />
If you have multiple monitors configured using Nvidia Twinview, the dock extension may get sandwiched in-between the monitors. You can edit the source of this extension to reposition the dock to a position of your choosing.<br />
<br />
Edit {{ic|/usr/share/gnome-shell/extensions/dock@gnome-shell-extensions.gnome.org/extension.js}} and locate this line in the source:<br />
<br />
this.actor.set_position(primary.width-this._item_size-this._spacing-2, (primary.height-height)/2);<br />
<br />
The first parameter is the X position of the dock display, by subtracting 15 pixels as opposed to 2 pixels from this it correctly positioned on my primary monitor, you can play around with any X,Y coordinate pair to position it correctly.<br />
<br />
this.actor.set_position(primary.width-this._item_size-this._spacing-15, (primary.height-height)/2);<br />
<br />
=== "Show Desktop" keyboard shortcut does not work ===<br />
<br />
GNOME developers treated the corresponding binding as bug (see https://bugzilla.gnome.org/show_bug.cgi?id=643609) due to Minimization being deprecated. To show the desktop again assign ALT+STRG+D to the following setting:<br />
<br />
System Settings --> Keyboard --> Shortcuts --> Navigation --> Hide all normal windows<br />
<br />
=== Unable to apply stored configuration for monitors ===<br />
<br />
If you encounter this message try to disable the xrandr gnome-settings-daemon plugin :<br />
<br />
$ dconf write /org/gnome/settings-daemon/plugins/xrandr/active false<br />
<br />
=== Lock button fails to re-enable touchpad ===<br />
<br />
Some laptops have a touchpad lock button that disables the touchpad so that users can type without worrying about touching the touchpad. It appears currently that although GNOME can lock the touchpad by pressing this button, it cannot unlock it. If the touchpad gets locked you can do the following to unlock it.<br />
# Start a terminal. You can do this by pressing {{ic|Alt+F2}}, then typing {{ic|gnome-terminal}} followed by pressing {{ic|Enter}}.<br />
# Type in the following command<br />
$ xinput set-prop "SynPS/2 Synaptics TouchPad" "Device Enabled" 1<br />
<br />
=== GNOME uses X11 cursors ===<br />
<br />
To fix this problem, set the cursor theme as according the XDG icon theme specification, see [[Cursor_Themes#Using_the_XDG_Icon_theme_specification|this section]] of the [[Cursor Themes]] article.<br />
<br />
=== Tracker & Documents do not list any local files ===<br />
<br />
In order for Tracker (and, therefore, Documents) to detect your local files, they must be stored in directories that it knows of. If your documents are contained in one of the usual XDG standard directories (i.e. "Documents" or "Music"), you should install {{Pkg|xdg-user-dirs}} and run:<br />
<br />
# xdg-user-dirs-update<br />
<br />
This will create all of the usual XDG home directories if they do not already exist and it will create the config file definining these directories that Tracker and Documents depend upon.<br />
<br />
=== Passwords are not remembered ===<br />
<br />
If you get a password prompt every time you login, and you find password are not saved, you might need to create/set a default keyring:<br />
<br />
Install {{pkg|seahorse}}. Open "Passwords and Keys" from the menu or run {{ic|seahorse}}. Select View > By Keyring. If there is no keyring in the left column (it will be marked with a lock icon), go to File > New > Password Keyring and give it a nice name. You will be asked to enter a password. If you do not give it a password it will be unlocked automatically even when using autologin, but passwords will not be stored securely. Finally, right-click on the keyring you just created and select "Set as default".<br />
<br />
=== Windows cannot be modified with Alt-Key + Mouse-Button ===<br />
<br />
Change the dconf-setting "org.gnome.desktop.wm.preferences.mouse-button-modifier" from <Super> back to <Alt>. It is not possible to change this with ''System Settings'' > "Keyboard" > "Shortcuts", you will find there only the regular keybindings. The developers of GNOME decided to change this from 3.4 to 3.6 because of this bug report https://bugzilla.gnome.org/show_bug.cgi?id=607797<br />
<br />
=== Gnome-shell 3.8.x fails to load with a black screen + cursor ===<br />
<br />
If you have a non-UTF8 language enabled, Gnome 3 can fail to load. Disable non-UTF-8 locales and perform a locale-gen until this is resolved.<br />
For more information see this bug report: https://bugzilla.gnome.org/show_bug.cgi?id=698952<br />
<br />
Additionally, if multiple locales of different languages are enabled, it may be necessary to disable all locales except for one (which is UTF-8).<br />
<br />
=== UI elements scale incorrectly ===<br />
<br />
Gnome introduced HDPI support in version 3.10. If your display does not provide the correct screen size through EDID, this can lead to incorrectly scaled UI elements. As a workaround you can open dconf-editor and find the key {{ic|scaling-factor}} in {{ic|org.gnome.desktop.interface}}. Set it to {{ic|1}} to get the standard scale.<br />
<br />
=== Tear-free video with Intel HD Graphics ===<br />
Enabling the [[Intel _Graphics#Tear-free_video|Xorg Intel TearFree option]] is a known workaround to tearing problems on Intel adapters, however the way this option acts makes it redundant with the use of a compositor (adds up memory consumption and lowers performance, see [https://bugs.freedesktop.org/show_bug.cgi?id=37686#c123 the original bug report's final comment]).<br />
<br />
On the other hand, GNOME Shell uses Mutter as a compositor which has a tweak known to address tearing problems (see [https://bugzilla.gnome.org/show_bug.cgi?id=657071#c1 the original suggestion for this fix] and its mention in [https://bugs.freedesktop.org/show_bug.cgi?id=37686#c59 the Freedesktop bug report]): the line {{ic|1=CLUTTER_PAINT=disable-clipped-redraws:disable-culling}} must be appended to {{ic|/etc/environment}} and Xorg server restarted. This tweak solved tearing problems.<br />
<br />
=== Logging in through GDM or lightdm quickly returns to the login screen without any feedback ===<br />
As discovered by the person in this thread: [http://forums.debian.net/viewtopic.php?f=6&t=84115], some aspect of checking for the existence of and then sourcing a bash_completion script seems to cause this issue. In addition to the bash completion setup in this package: [https://www.archlinux.org/packages/extra/any/bash-completion/], the Ruby Version Manager (RVM) includes the invocation of a bash completion script as part of it's init. It's worth keeping in mind that whatever causes this issue likely exists outside the exclusive realm of bash completion scripts, and that /etc/profile* is still worth poking around in while debugging even if a completion script isn't found.<br />
<br />
== External links ==<br />
* [http://www.gnome.org/ The Official Website of GNOME]<br />
* [http://extensions.gnome.org/ Extensions for GNOME-shell]<br />
* Themes, icons, and backgrounds:<br />
** [http://art.gnome.org/ GNOME Art]<br />
** [http://www.gnome-look.org/ GNOME Look]<br />
* GTK/GNOME programs:<br />
** [http://www.gnomefiles.org/ GNOME Files]<br />
** [http://www.gnome.org/projects/ GNOME Project Listing]</div>Muffinmadhttps://wiki.archlinux.org/index.php?title=GNOME&diff=296985GNOME2014-02-12T09:27:31Z<p>Muffinmad: /* No reaction on lid close */</p>
<hr />
<div>[[Category:GNOME]]<br />
[[cs:GNOME]]<br />
[[de:GNOME]]<br />
[[es:GNOME]]<br />
[[fr:GNOME]]<br />
[[it:GNOME]]<br />
[[ja:GNOME]]<br />
[[nl:GNOME]]<br />
[[pl:GNOME]]<br />
[[pt:GNOME]]<br />
[[ru:GNOME]]<br />
[[sr:GNOME]]<br />
[[th:GNOME]]<br />
[[tr:Gnome Masaüstü Ortamı]]<br />
[[uk:GNOME]]<br />
[[zh-CN:GNOME]]<br />
[[zh-TW:GNOME]]<br />
{{Related articles start}}<br />
{{Related|Desktop Environment}}<br />
{{Related|Display Manager}}<br />
{{Related|Window Manager}}<br />
{{Related|GTK+}}<br />
{{Related|GDM}}<br />
{{Related|Nautilus}}<br />
{{Related|Gedit}}<br />
{{Related|Epiphany}}<br />
{{Related|GNOME Flashback}}<br />
{{Related articles end}}<br />
<br />
[http://www.gnome.org/ GNOME] is a [[desktop environment]] developed by The GNOME Project.<br />
<br />
GNOME 3 has ''two'' sessions:<br />
<br />
*'''GNOME''' is the default, innovative layout.<br />
*'''GNOME Classic''' is a traditional desktop layout, similar to the GNOME 2 user interface whilst using GNOME 3 technologies. It does so through the use of pre-activated extensions and parameters (see [http://worldofgnome.org/welcome-to-gnome-3-8-flintstones-mode/ here] for a list). Hence it is more of a customized GNOME Shell than a truly distinct mode.<br />
<br />
Both of them use GNOME Shell, a desktop shell and plugin of the Mutter window manager. Mutter acts as a composite manager for the desktop, employing hardware graphics acceleration to provide effects aimed at reducing screen clutter. GNOME session manager automatically detects if your video driver is capable of running GNOME Shell and if not, falls back to software rendering using llvmpipe.<br />
<br />
== Installation ==<br />
<br />
GNOME 3 is available in the [[official repositories]] and can be [[pacman|installed]] with one of the following:<br />
*The {{Pkg|gnome-shell}} package provides a minimal desktop shell.<br />
*The {{Grp|gnome}} group contains the core desktop environment and applications required for the standard GNOME experience.<br />
*The {{Grp|gnome-extra}} group contains various optional tools such as an editor, an archive manager, a disk burner, a mail client, games, development tools and other non-critical applications that integrate well with the GNOME desktop. Installing just the {{Grp|gnome-extra}} group will not pull in the whole {{Grp|gnome}} group via dependencies. If you want to install all GNOME packages then you will need to explicitly install both groups.<br />
<br />
== Starting GNOME ==<br />
<br />
'''Graphical log-in'''<br />
<br />
For the best desktop integration, [[GDM]] (the GNOME [[Display Manager]]) is recommended. GDM is installed as part of the {{grp|gnome}} group and can be used by enabling {{ic|gdm.service}} [[systemd#Using units|using systemd]].<br />
<br />
Other display managers can be used in place of GDM if desired.<br />
<br />
{{note|Native support for screenlocking in GNOME is provided by GDM. If you choose to not use GDM you will need to use a different screenlocking program such as [[Xscreensaver]].}} <br />
<br />
'''Starting GNOME manually'''<br />
<br />
If you prefer to start GNOME manually from the console, add the following line to your {{ic|~/.xinitrc}} file:<br />
{{hc|~/.xinitrc|<nowiki><br />
exec gnome-session<br />
</nowiki>}}<br />
<br />
Or {{ic|exec gnome-session --session&#61;gnome-classic}} for GNOME Classic. After editing your {{ic|~/.xinitrc}}, GNOME can be launched by typing {{ic|startx}}.<br />
<br />
See [[xinitrc]] for details, such as preserving the logind session.<br />
<br />
== Using the shell ==<br />
<br />
=== GNOME cheat sheet ===<br />
<br />
The GNOME web site has a <s>helpful</s> '''outdated''' [https://live.gnome.org/GnomeShell/CheatSheet GNOME Shell cheat sheet] explaining task switching, keyboard use, window control, the panel, overview mode, and more.<br />
<br />
=== Restarting the shell ===<br />
<br />
After appearance tweaks you are often asked to restart the GNOME shell. You could log out and log back in, but it is simpler and faster to issue the following keyboard command. Restart the shell by pressing {{ic|Alt}} + {{ic|F2}} then {{ic|r}} then {{ic|Enter}}<br />
<br />
=== Shell crashes ===<br />
<br />
Certain tweaks and/or repeated shell restarts may cause the shell to crash when a restart is attempted. In this case, you are informed about the crash and then forced to log out. Some shell changes cannot be accomplished via a keyboard restart; you must log out and log back in to effect them.<br />
<br />
{{note|Valuable documents should be saved (and perhaps closed) before attempting a shell restart. It is not strictly necessary; open windows and documents usually remain intact after a shell restart however there is a risk that data could be lost if documents are not saved.}}<br />
<br />
=== Shell freezes ===<br />
<br />
Sometimes shell extensions freeze the GNOME Shell. In this case a possible strategy is to switch to another terminal via {{ic|Ctrl+Alt+F2}} through {{ic|Ctrl+Alt+F6}}, log in, and restart gnome-shell with:<br />
<br />
# pkill -HUP gnome-shell<br />
<br />
All open applications will still be available after restarting the shell.<br />
<br />
Sometimes, however, merely restarting the shell might not be enough. Then you will have to restart X, losing all work in progress. You can restart X by:<br />
<br />
# pkill X<br />
<br />
The GNOME Shell then restarts automatically.<br />
<br />
If this does not work, you can try to restart your login manager. For instance, if you use GDM, try:<br />
<br />
# systemctl restart gdm.service<br />
<br />
{{Tip|You can also use '''htop''' in tty; press ''t'', select the ''gnome-shell'' tree, press ''k'' and send ''SIGKILL''.}}<br />
<br />
== Pacman integration: GNOME PackageKit ==<br />
<br />
GNOME has its own Pacman GUI: {{Pkg|gnome-packagekit}}.<br />
<br />
Using the [https://www.archlinux.org/pacman/libalpm.3.html alpm] backend, it supports the following features:<br />
<br />
* Install and remove packages from the repos.<br />
* Periodically refresh package databases and prompt for updates.<br />
* Install packages from tarballs.<br />
* Search for packages by name, description, category or file.<br />
* Show package dependencies, files and reverse dependencies.<br />
* Ignore IgnorePkgs and hold HoldPkgs.<br />
* Report optional dependencies, .pacnew files, etc.<br />
<br />
You can change the {{ic|remove}} operation from -Rc to -Rsc by setting the DConf key {{ic|org.gnome.packagekit.enable-autoremove}}.<br />
<br />
=== Packages updates notifications ===<br />
<br />
If you want GNOME to check automatically for updates, you must install {{Pkg|gnome-settings-daemon-updates}} from the official repository.<br />
<br />
== Customizing GNOME appearance ==<br />
<br />
=== Overall appearance ===<br />
<br />
There is no all-encompassing configuration tool however a variety of tools are available to ensure that all customisations that the user needs to make can be made. The new ''Systems Settings'' tool (provided by {{pkg|gnome-control-center}}) is a simple and streamlined panel which covers most basic settings however more extensive customisation may require the use of some of the tools below.<br />
<br />
==== Gsettings ====<br />
<br />
A new command-line tool {{ic|gsettings}} stores data in a binary format, unlike previous tools using XML text. See [http://blog.fpmurphy.com/2011/03/customizing-the-gnome-3-shell.html Customizing the GNOME Shell] for a tutorial on using gsettings.<br />
<br />
==== GNOME tweak tool ====<br />
<br />
This graphical tool customizes fonts, themes, titlebar buttons and other settings. {{Pkg|gnome-tweak-tool}} is available from the [[official repositories]]. It is set up as a user friendly frontend to the gsettings tool.<br />
<br />
==== dconf ====<br />
<br />
The {{pkg|dconf}} tool is a tree based graphical frontend to gsettings. It is somewhat similar to the ''regedit'' tool in Windows. Most GNOME configuration settings are exposed in this tool.<br />
<br />
==== GTK3 theme via settings.ini ====<br />
<br />
It is possible to set a GTK3 theme via {{ic|${XDG_CONFIG_HOME}/gtk-3.0/settings.ini}} (usually {{ic|~/.config/gtk-3.0/settings.ini}}).<br />
<br />
''Adwaita,'' the default GNOME 3 theme, is a part of {{pkg|gnome-themes-standard}}. Additional GTK3 themes can be found at [http://browse.deviantart.com/customization/skins/linuxutil/desktopenv/gnome/gtk3/ Deviantart web site.] For example:<br />
{{hc|${XDG_CONFIG_HOME}/gtk-3.0/settings.ini|<nowiki><br />
[Settings]<br />
gtk-theme-name = Adwaita<br />
gtk-fallback-icon-theme = gnome<br />
# next option is applicable only if selected theme supports it<br />
gtk-application-prefer-dark-theme = true<br />
# set font name and dimension<br />
gtk-font-name = Sans 10<br />
</nowiki>}}<br />
<br />
It is necessary to restart the GNOME shell for settings to be applied. More GTK options are found at [http://developer.gnome.org/gtk3/3.0/GtkSettings.html#GtkSettings.properties GNOME developer documentation.]<br />
<br />
==== Icon theme ====<br />
<br />
Using {{pkg|gnome-tweak-tool}} version 3.0.3 and later, you can place any icon theme you wish to use inside {{ic|~/.icons}}.<br />
<br />
GNOME 3 is compatible with a number of icon themes including GNOME 2 icon themes. To install a new set of icons, copy your desired icon theme's directory to {{ic|~/.icons}}. As an example:<br />
<br />
$ cp -R /home/user/Desktop/my_icon_theme ~/.icons<br />
<br />
The new theme ''my_icon_theme'' is now selectable using {{ic|gnome-tweak-tool}} under ''interface''.<br />
<br />
Alternatively, you may manually select your icon theme without the use of gnome-tweak-tool or dconf. Add the GTK icon theme name to {{ic|${XDG_CONFIG_HOME}/gtk-3.0/settings.ini}}. Please note, not to use "" as your settings would not be recognised then.<br />
<br />
{{hc|${XDG_CONFIG_HOME}/gtk-3.0/settings.ini|<nowiki>... previous lines ...<br />
<br />
gtk-icon-theme-name = my_new_icon_theme</nowiki>}}<br />
<br />
=== GNOME panel ===<br />
<br />
==== Show date in top bar ====<br />
<br />
By default GNOME displays only the weekday and time in the top bar. This can be changed with the following command. Changes take effect immediately. <br />
<br />
# gsettings set org.gnome.desktop.interface clock-show-date true<br />
<br />
You can also change this setting using dconf or gnome-tweak-tool. In {{ic|dconf-editor}} expand org -> gnome -> desktop -> interface and tick the option labelled '''clock-show-date'''.<br />
<br />
In '''gnome-tweak-tool''' click on the "Top Bar" tab and tick the option labelled '''Show Date'''.<br />
<br />
==== Hiding icons in the top bar ====<br />
<br />
When installing GNOME, some unwanted icons might appear in the panel. These icons can be removed either with GNOME shell extensions or by manually editing the GNOME panel script.<br />
<br />
===== Hiding icons with shell extensions =====<br />
<br />
To remove the accessibility icon, one can use the https://extensions.gnome.org/extension/112/remove-accesibility/. <br />
<br />
The best way to use extensions is installing them from the gnome extensions web page like the one above.<br />
<br />
===== Manually editing the GNOME panel script =====<br />
<br />
For example, to remove the '''universal access icon''', comment out the 'a11y' line in PANEL_ITEM_IMPLEMENTATIONS:<br />
<br />
{{hc|/usr/share/gnome-shell/js/ui/panel.js|<nowiki><br />
const PANEL_ITEM_IMPLEMENTATIONS = {<br />
'activities': ActivitiesButton,<br />
'appMenu': AppMenuButton,<br />
'dateMenu': imports.ui.dateMenu.DateMenuButton,<br />
// 'a11y': imports.ui.status.accessibility.ATIndicator,<br />
'volume': imports.ui.status.volume.Indicator,<br />
'battery': imports.ui.status.power.Indicator,<br />
'lockScreen': imports.ui.status.lockScreenMenu.Indicator,<br />
'keyboard': imports.ui.status.keyboard.InputSourceIndicator,<br />
'powerMenu': imports.gdm.powerMenu.PowerMenuButton,<br />
'userMenu': imports.ui.userMenu.UserMenuButton<br />
};<br />
</nowiki>}}<br />
<br />
Then, save your results and restart the shell:<br />
<br />
#{{ic|Alt+F2}}<br />
#{{ic|r}}<br />
#{{ic|Enter}}<br />
<br />
{{note|As of GNOME 3.8 the accessibility icon is hidden from the panel by default.}}<br />
<br />
==== Eliminate delay when logging out ====<br />
<br />
The following tweak removes the confirmation dialog and sixty second delay for logging out.<br />
<br />
This dialog normally appears when you log out with the status menu. This tweak affects the '''''Power Off''''' dialog as well. This is not a system-wide change; it affects only the user who enters this command. The change takes effect immediately after entering the command.<br />
<br />
$ gsettings set org.gnome.SessionManager logout-prompt 'false'<br />
<br />
==== Show system monitor ====<br />
<br />
The [https://extensions.gnome.org/extension/120/system-monitor/ system-monitor] extension is included in the {{pkg|gnome-shell-extensions}} package. The git version is available as {{AUR|gnome-shell-system-monitor-applet-git}} in the [[AUR]].<br />
<br />
==== Show weather information ====<br />
<br />
The [https://extensions.gnome.org/extension/613/weather/ Weather] extension can be installed from [https://extensions.gnome.org/extension/613/weather/ the official extension website]. The git version is available as {{AUR|gnome-shell-extension-weather-git}} in the [[AUR]].<br />
<br />
=== Activity view ===<br />
<br />
==== Remove entries from Applications view ====<br />
<br />
Like most desktop environments, GNOME uses .desktop files to populate its Applications view. These text files are located in the '''{{ic|/usr/share/applications}}''' folder. It is not possible to edit these files from a folder view ‒ Nautilus does not treat their icons as text files. Use a terminal to display or edit .desktop file entries. You will need root privileges to edit the .desktop files.<br />
<br />
# ls /usr/share/applications<br />
# nano /usr/share/applications/foo.desktop<br />
<br />
For system wide changes, edit files in '''{{ic|/usr/share/applications}}'''. For local changes, make a copy of ''foo.desktop'' in your home folder.<br />
<br />
$ cp /usr/share/applications/foo.desktop ~/.local/share/applications/<br />
<br />
Edit .desktop files to fit your wishes. <br />
<br />
{{Note|Removing a .desktop file does not uninstall an application, but instead removes its desktop integration: MIME types, shortcuts, and so forth.}}<br />
<br />
To hide an application launcher open its .desktop file in a text editor and add the following line:<br />
<br />
NoDisplay=true<br />
<br />
==== Change application icon size ====<br />
<br />
To change the application icon size it is necessary to edit the GNOME-Shell theme.<br />
<br />
You can edit system files directly (make a backup first) or copy theme files to your local folder and edit these files. <br />
* For the '''default''' theme, edit '''{{ic|/usr/share/gnome-shell/theme/gnome-shell.css}}'''<br />
<br />
* For '''user themes''', edit '''{{ic|/usr/share/themes/<UserTheme>/gnome-shell/gnome-shell.css}}'''<br />
<br />
Edit ''gnome-shell.css'' and replace the following values. Afterward, [[#Restarting the shell|restart the GNOME shell.]]<br />
{{hc|gnome-shell.css|<nowiki><br />
...<br />
/* Application Launchers and Grid */<br />
<br />
.icon-grid {<br />
spacing: 18px;<br />
-shell-grid-horizontal-item-size: 82px;<br />
-shell-grid-vertical-item-size: 82px;<br />
}<br />
<br />
.icon-grid .overview-icon {<br />
icon-size: 48px;<br />
}<br />
...<br />
</nowiki>}}<br />
<br />
==== Change dash icon size ====<br />
GNOME's Activities view has a dash on the left hand side, the size of the icons in this dash will scale depending on the amount of icons set to display. The scaling can be manipulated or set to a constant icon size. To do so, edit {{ic|/usr/share/gnome-shell/js/ui/dash.js}}.<br />
<br />
{{hc|dash.js|<nowiki><br />
...<br />
<br />
let iconSizes = [ 16, 22, 24, 32, 48, 64 ];<br />
<br />
...<br />
</nowiki>}}<br />
<br />
==== Change switcher (alt-tab) icon size ====<br />
GNOME comes with a built in task switcher, the size of the icons in this task switcher will scale depending on the amount of icons set to display. The scaling can be manipulated or set to a constant icon size. To do so, edit {{ic|/usr/share/gnome-shell/js/ui/altTab.js}}<br />
<br />
{{hc|altTab.js|<nowiki><br />
...<br />
<br />
const iconSizes = [96, 64, 48, 32, 22];<br />
<br />
...<br />
</nowiki>}}<br />
<br />
==== Change system tray icon size ====<br />
GNOME comes with a built in system tray, visible when the mouse is hovered over the bottom right corner of the screen. The size of the icons in this tray is set to a fixed value of 24. To change this value, edit {{ic|/usr/share/gnome-shell/js/ui/messageTray.js}}<br />
{{hc|messageTray.js|<nowiki><br />
...<br />
<br />
ICON_SIZE: 24,<br />
<br />
...<br />
</nowiki>}}<br />
<br />
==== Disable Activity hot corner hovering ====<br />
<br />
To disable automatic activity view when the hot corner is hovered, edit {{ic|/usr/share/gnome-shell/js/ui/layout.js}} (that was ''panel.js'' in GNOME 3.0.x) :<br />
{{hc|layout.js|<nowiki><br />
this._corner = new Clutter.Rectangle({ name: 'hot-corner',<br />
width: 1,<br />
height: 1,<br />
opacity: 0,<br />
reactive: true });icon-size: 48px;<br />
}<br />
</nowiki>}}<br />
and set {{ic|reactive}} to {{ic|false}}. GNOME Shell needs to be restarted.<br />
<br />
{{tip|There are also [[GNOME#GNOME_shell_extensions|GNOME Shell extensions]] that can be installed which will modify this behaviour.}}<br />
<br />
==== Disable Message Tray hovering ====<br />
<br />
The message tray is shown when the mouse hovers at the bottom of the screen for one second. To disable this behavior, comment out the following line in {{ic|/usr/share/gnome-shell/js/ui/messageTray.js}}:<br />
{{hc|messageTray.js|<nowiki><br />
//pointerWatcher.addWatch(TRAY_DWELL_CHECK_INTERVAL, Lang.bind(this, this._checkTrayDwell));<br />
</nowiki>}}<br />
GNOME Shell needs to be restarted. The message tray is still visible in activity view.<br />
<br />
=== Titlebar ===<br />
<br />
==== Reduce title bar height ====<br />
* ''' global''' - edit {{ic|/usr/share/themes/Adwaita/metacity-1/metacity-theme-3.xml}}, search for {{ic|title_vertical_pad}} and and reduce its value to a minimum of {{ic|0}}.<br />
* '''user-only''' - copy {{ic|/usr/share/themes/Adwaita/metacity-1/metacity-theme-3.xml}} to {{ic|/home/$USER/.themes/Adwaita/metacity-1/metacity-theme-3.xml}}, search for {{ic|title_vertical_pad}} and reduce its value to a minimum of {{ic|0}}.<br />
<br />
Then restart the GNOME shell. <br />
<br />
To restore the original values, [[pacman|install]] the package {{Pkg|gnome-themes-standard}} from the [[Official Repositories|official repositories]] or remove {{ic|/home/$USER/.themes/Adwaita/metacity-1/metacity-theme-3.xml}}<br />
<br />
==== Reorder titlebar buttons ====<br />
<br />
At present this setting can be changed through '''dconf-editor.'''<br />
<br />
For example, to move the close and minimize buttons to the left side of the titlebar, open '''dconf-editor''' and locate the '''''org.gnome.shell.overrides.button_layout''''' key. Change its value to '''{{ic|close,minimize:}}''' (Colon symbol designates the spacer between left side and right side of the titlebar.) Place the buttons in your preferred order. You cannot use a button more than once. Also, keep in mind that certain buttons are deprecated. Restart the shell to see your new button arrangement.<br />
<br />
==== Hide titlebar when maximized ====<br />
The command below will hide the titlebar when windows are maximised:<br />
<br />
# sed -i -r 's|(<frame_geometry name="max")|\1 has_title="false"|' /usr/share/themes/Adwaita/metacity-1/metacity-theme-3.xml<br />
<br />
After entering the command restart the GNOME shell. After this tweak, you may find it difficult to un-maximize a window when there is no titlebar to grab.<br />
<br />
With suitable keybindings, you should be able to use {{ic|Alt+F5}}, {{ic|Alt+F10}} or {{ic|Alt+Space}} to remedy the situation.<br />
<br />
To prevent {{ic|metacity-theme-3.xml}} from being overwritten each time package {{pkg|gnome-themes-standard}} is upgraded, add its name to {{ic|/etc/pacman.conf}} with {{ic|NoUpgrade}}.<br />
<br />
{{hc|/etc/pacman.conf|<nowiki>... previous lines ...<br />
<br />
# Pacman will not upgrade packages listed in IgnorePkg and members of IgnoreGroup<br />
# IgnorePkg =<br />
# IgnoreGroup =<br />
<br />
NoUpgrade = usr/share/themes/Adwaita/metacity-1/metacity-theme-3.xml # Do not add a leading slash to the path<br />
<br />
... more lines ...</nowiki>}}<br />
<br />
To restore original Adwaita theme values, install the {{pkg|gnome-themes-standard}} package.<br />
<br />
== Miscellaneous settings ==<br />
<br />
=== Power Management ===<br />
<br />
==== Prevent Suspend-To-RAM (S3) when closing the LID ====<br />
This setting is not exposed in GNOME's ''System Settings'' or in ''dconf''. The current approach is to manage this on the level of [[Systemd]]. Change the variable '''HandleLidSwitch''' to '''ignore''' in {{ic|/etc/systemd/logind.conf}}<br />
<br />
{{hc|/etc/systemd/logind.conf|HandleLidSwitch&#61;ignore}}<br />
<br />
See the [[Power_Management#ACPI_events]] article for more information.<br />
<br />
{{note|Ensure that the '''HandleLidSwitch''' entry is uncommented or the setting will not take effect.}}<br />
<br />
==== No reaction on lid close ====<br />
<br />
When configuring the lid close events via [[Systemd#ACPI_power_management]], the settings may seem to have no effect. If you have an external monitor connected to your laptop, this is default GNOME behaviour. Disconnect the monitor and the settings should work, otherwise your {{ic|/etc/systemd/logind.conf}} may be incorrect.<br />
To change default behaviour open the {{ic|dconf-editor}} and change org -> gnome -> settings-daemon -> plugins -> xrandr -> default-monitors-setup to "do-nothing".<br />
<br />
==== Change Critical Battery Level Action (for Laptops) ====<br />
<br />
The ''System Settings'' panel only allows the user to choose between ''Suspend'' or ''Hibernate''. To choose another option such as ''Do Nothing'' open the {{ic|dconf-editor}} and navigate to -> org -> gnome -> settings-daemon -> plugins -> power. Edit the "critical-battery-action" value to "nothing".<br />
<br />
=== Switch back scrolling behavior ===<br />
If you do not like the new scrollbar behavior just put {{ic|<nowiki>gtk-primary-button-warps-slider = false</nowiki>}} under the {{ic|<nowiki>[Settings]</nowiki>}} section in {{ic|~/.config/gtk-3.0/settings.ini}}:<br />
<br />
{{hc|~/.config/gtk-3.0/settings.ini|<nowiki><br />
[Settings]<br />
gtk-primary-button-warps-slider = false<br />
...<br />
</nowiki>}}<br />
<br />
=== Autostarting / Automatic program launch upon logging in ===<br />
<br />
Specify which programs start automatically after logging in using {{ic|gnome-session-properties}}. This tool is part of the {{Pkg|gnome-session}} package.<br />
<br />
$ gnome-session-properties<br />
<br />
=== Editing applications menu ===<br />
<br />
{{pkg|alacarte}} provides a more complete menu editor for adding/editing menu entries.<br />
<br />
=== Inner padding in Gnome Terminal===<br />
To move the terminal output away from the window borders create the stylesheet {{ic|~/.config/gtk-3.0/gtk.css}} with the following setting:<br />
<br />
TerminalScreen {<br />
-VteTerminal-inner-border: 10px 10px 10px 10px;<br />
}<br />
<br />
=== Disable blinking cursor in Terminal ===<br />
Since Gnome 3.8 and the migration to gsettings and dconf the key required to modify in order to disable the blinking cursor in the Terminal differs slightly in contrast to the old gconf key. To disable the blinking cursor in Gnome 3.8 use:<br />
<br />
gsettings set org.gnome.desktop.interface cursor-blink false<br />
<br />
If you prefer dconf to the gsettings CLI then open {{ic|dconf-editor}} and expand expand org -> gnome -> desktop -> interface and untick the option labelled '''cursor-blink'''.<br />
<br />
=== Make new tabs inherit current directory in Gnome Terminal (3.8+) ===<br />
In Gnome 3.8, the behaviour of how current directories are tracked has changed. To restore this behaviour, you need to source the {{ic|/etc/profile.d/vte.sh}} file, put this in your {{ic|~/.bashrc}} or {{ic|~/.zshrc}} for zsh users:<br />
<br />
source /etc/profile.d/vte.sh<br />
<br />
For more information refer to the [https://wiki.gnome.org/action/show/Apps/Terminal/FAQ?action=show&redirect=Terminal%252FFAQ#How_can_I_make_new_terminals_start_in_the_working_directory_of_the_current_terminal.3F Gnome wiki]<br />
<br />
=== Move dialog windows ===<br />
The default configuration for dialogs will not allow you to move them which causes problems in some cases. To change this you will need to use gconf-editor and change this setting:<br />
<br />
/desktop/gnome/shell/windows/attach_modal_dialogs<br />
<br />
After the change you will need to restart the shell for it to take affect.<br />
<br />
=== GNOME shell extensions ===<br />
<br />
GNOME Shell can be customized with extensions. These provide features such as a dock or a widget for changing the theme.<br />
<br />
Many extensions are collected and hosted by [https://extensions.gnome.org/ extensions.gnome.org]. They can be browsed and installed simply activating them in the browser. More information about gnome shell extensions can be found [https://extensions.gnome.org/about/ here].<br />
<br />
See [[#When an extension breaks GNOME|when an extension breaks GNOME]] for troubleshooting information.<br />
<br />
=== Default Applications ===<br />
<br />
While one can right click any file and set the default applications in 'Preferences', the settings are actually saved in {{ic | $HOME/.local/share/applications/mimeapps.list}} and {{ic| $HOME/.local/share/applications/mimeinfo.cache}}<br />
<br />
For systemwide preferences create or edit the file {{ic|/usr/share/applications/mimeapps.list}}.<br />
<br />
{{tip|If you are making the change systemwide you may to create the {{ic|/usr/share/applications/mimeapps.list}} file yourself.}}<br />
<br />
==== Default file browser/replace Nautilus ====<br />
You can specify a different file manager in the ''mimeapps.list'' file as shown below:<br />
<br />
'''User only''': add the line {{ic|<nowiki>inode/directory=myfilemanager.desktop</nowiki>}} to {{ic|~/.local/share/applications/mimeapps.list}}<br />
<br />
'''Systemwide''': add the line {{ic|<nowiki>inode/directory=myfilemanager.desktop</nowiki>}} to {{ic|/usr/share/applications/mimeapps.list}}<br />
<br />
Where my filemanager.desktop is the correct .desktop file for the file manager of your choice.<br />
<br />
<br />
Alternatively you can trick GNOME into using another file browser by editing the {{ic|Exec}} line in {{ic|/usr/share/applications/nautilus.desktop}}. See the correct parameters in the {{ic|.desktop}} file of the file manager of your choice, e.g.:<br />
{{hc|/usr/share/applications/nautilus.desktop|<br />
2=[...]<br />
Exec=thunar %F<br />
OR<br />
Exec=pcmanfm %U<br />
OR<br />
Exec=nemo %U<br />
[...]<br />
}}<br />
<br />
==== Default PDF viewer ====<br />
In some cases when you have installed Inkscape or other graphic programs Evince Document Viewer might no longer be selected as the default PDF application. If it is not available in the '''Open With''' entry which would be the GUI solution, you can use the following user command to make it the default application again.<br />
<br />
xdg-mime default evince.desktop application/pdf<br />
<br />
==== Default terminal ====<br />
<br />
{{ic|gsettings}} (which replaces {{ic|gconftool-2}}) is used to set the default terminal. The setting affects ''nautilus-open-terminal'' (a Nautilus extension).<br />
To make [[rxvt-unicode|urxvt]] the default, run:<br />
<br />
gsettings set org.gnome.desktop.default-applications.terminal exec urxvtc<br />
gsettings set org.gnome.desktop.default-applications.terminal exec-arg "'-e'"<br />
<br />
{{Note|The {{ic|-e}} flag is for executing a command. When ''nautilus-open-terminal'' invokes {{ic|urxvtc}}, it puts a {{ic|cd}} command at the end of the command line so that the new terminal starts in the directory you opened it from. Other terminals will require a different (perhaps empty) {{ic|exec-arg}}.}}<br />
<br />
==== Default web browser for gnome-gmail-notifier ====<br />
<br />
To configure the web browser used by the AUR package {{AUR|gnome-gmail-notifier}}, open gconf-editor<br />
and edit the {{ic|/desktop/gnome/url-handlers/http/}} key. You may want to change {{ic|https/}}, {{ic|about/}}, and {{ic|unknown/}} keys while you are at it.<br />
<br />
=== Middle mouse button ===<br />
<br />
By default, GNOME 3 disables middle mouse button emulation regardless of [[Xorg]] settings ('''Emulate3Buttons'''). To enable middle mouse button emulation use:<br />
<br />
$ gsettings set org.gnome.settings-daemon.peripherals.mouse middle-button-enabled true<br />
<br />
=== Display dimming ===<br />
<br />
By default GNOME 3 has a ten second idle timeout to dim the screen regardless of the battery and AC state:<br />
<br />
gsettings get org.gnome.settings-daemon.plugins.power idle-dim-time<br />
<br />
To set a new value type the following<br />
<br />
gsettings set org.gnome.settings-daemon.plugins.power idle-dim-time <int><br />
<br />
where <int> is the value in seconds<br />
<br />
=== Changing hotkeys ===<br />
Certain hotkeys cannot be changed directly via the ''System Settings'' panel. In order to change these keys, use dconf-editor. An example of particular note is the hotkey Alt-Above_Tab. On US keyboards, this is Alt-`: is a hotkey often used in the [[Emacs]] editor. It can be changed by opening dconf-editor and modifying the ''switch-group'' key found in {{ic|org.gnome.desktop.wm.keybindings}}.<br />
<br />
It is possible to manually change the keys via an application's so-called accel map file. Where it is to be found is up to the application: For instance, Thunar's is at ~/.config/Thunar/accels.scm, whereas Nautilus's is located at ~/.config/nautilus/accels and ~/.gnome2/accels/nautilus on old release.<br />
<br />
The file should contain a list of possible hotkeys, each unchanged line commented out with a leading ";" that has to be removed for a change to become active.<br />
For example to replace the hotkey used by Nautilus to move files to the trash folder, change the line :<br />
; (gtk_accel_path "<Actions>/DirViewActions/Trash" "<Primary>Delete")<br />
to this :<br />
(gtk_accel_path "<Actions>/DirViewActions/Trash" "Delete")<br />
<br />
The file is regenerated regularly so do not comment the file. The uncommented line will stay but every comment you add will be lost.<br />
<br />
==== Hotkeys in Nautilus 3.4 and older ====<br />
Firstly, use '''dconf-editor''' to place a checkmark next to {{ic|can-change-accels}} in the key named ''org.gnome.desktop.interface.''<br />
<br />
We will replace the hotkey — a.k.a. keyboard shortcut, keyboard accelerator — used by Nautilus to move files to the trash folder.<br />
The default assignment is a somewhat-awkward {{ic|Ctrl+Delete}}.<br />
* Open Nautilus, select any file, and click '''Edit''' on the menu bar.<br />
* Hover over the ''Move to Trash'' menu item.<br />
* While hovering, press {{ic|Delete}}. The current accelerator is now unset.<br />
* Press the key that you wish to become the new keyboard accelerator.<br />
* Press {{ic|Delete}} to make the new accelerator be the Delete key.<br />
Unless you select a file or folder, ''Move to Trash'' will be grayed-out. Finally, disable {{ic|can-change-accels}} to prevent accidental hotkey changes.<br />
<br />
=== Screencast recording ===<br />
<br />
Gnome features the built-in possbility to create screencasts easily. Thereby Control+Shift+Alt+R keybinding starts and stops the recording. A red circle is displayed in the bottom right corner of the screen when the recording is in progress. After the recording is finished, a file named 'Screencast from %d%u-%c.webm' is saved in the Videos directory. In order to use the screencast feature you need to have installed the gst plugins which are:<br />
<br />
$ pacman -Qs gst<br />
<br />
=== Modify Keyboard with XkbOptions ===<br />
<br />
Using the '''dconf-editor''', navigate to the key named ''org.gnome.desktop.input-sources.xkb-options'' and add desired XkbOptions (e.g. 'caps:swapescape') to the list.<br />
<br />
See /usr/share/X11/xkb/rules/xorg for all XkbOptions and then /usr/share/X11/xkb/symbols/* for the respective descriptions.<br />
<br />
{{Note|To enable the {{ic|Ctrl+Alt+Backspace}} combination to terminate Xorg, use the {{Pkg|gnome-tweak-tool}} from [[official repositories]]. Within the Gnome Tweak Tool, navigate to ''Typing > Terminate'' and select the option {{ic|Ctrl+Alt+Backspace}} from the dropdown menu.}}<br />
<br />
=== Toggle keyboard layouts ===<br />
Since Gnome does not consider any configuration in {{ic|/etc/X11/conf.d/*.conf}} you have to set the command for layout switching either via the control center with the options ''Switch to previous source'' and ''Switch to next source'' or if you want to use Alt - Shift combination you have to use the Gnome-Tweak-Tool and set ''Typing -> Modifiers-only input sources -> select Alt-shift''. For more information see also the forum [https://bbs.archlinux.org/viewtopic.php?id=152127 thread].<br />
<br />
=== Other tips ===<br />
See [[GNOME Tips]].<br />
<br />
== Tracker (search program) ==<br />
The {{Pkg|tracker}} provides the Tracker program, an indexing application. You can configure it with {{ic|tracker-preferences}}, and monitor status with {{ic|tracker-control}}. Once installed, indexing should start automatically when you log in. You can explicitly start indexing with {{ic|tracker-control -s}}. Search settings can also be configured in the ''System Settings'' panel.<br />
<br />
== Totem (movie player) ==<br />
<br />
Totem is a movie player based on [[GStreamer]]. For information about adding codecs or hardware acceleration, see [[GStreamer]].<br />
<br />
== Empathy (integrated messaging) and Gnome Online Accounts ==<br />
<br />
Empathy, the engine behind integrated messaging, and all system settings based on messaging accounts will not show up unless the {{grp|telepathy}} group of packages or at least one of the backends ({{pkg|telepathy-gabble}}, or {{pkg|telepathy-haze}}, for example) is installed. You will also need to install the {{grp|telepathy}} group to add accounts in the ''GNOME Online Accounts'' interface found in the ''System Settings'' panel.<br />
<br />
These packages are '''not''' included in either the {{grp|gnome}} or {{grp|gnome-extra}} groups . You can install the Telepathy and optionally any backends with:<br />
<br />
# pacman -S telepathy<br />
<br />
Without telepathy, Empathy will not open the account management dialog and can get stuck in this state. If this happens -- even after quitting Empathy cleanly -- the {{ic|/usr/bin/empathy-accounts}} application can remain running and will need to be killed before you can add any new accounts.<br />
<br />
View descriptions of telepathy components on the [http://telepathy.freedesktop.org/wiki/Components Freedesktop.org Telepathy Wiki.]<br />
<br />
== Troubleshooting ==<br />
<br />
=== Cannot change settings in dconf-editor ===<br />
<br />
When one cannot set settings in {{pkg|dconf}}, it is possible their dconf user settings are corrupt. In this case it is best to delete the user dconf files in {{ic|~/.config/dconf/user*}} and set the settings in dconf-editor after.<br />
<br />
=== When an extension breaks GNOME ===<br />
<br />
When enabling shell extensions causes GNOME breakage, you should first remove the ''user-theme'' and ''auto-move-windows'' extensions from their installation directory.<br />
<br />
The installation directory could be one of '''{{ic|~/.local/share/gnome‑shell/extensions,}}''' '''{{ic|/usr/share/gnome‑shell/extensions,}}''' or '''{{ic|/usr/local/share/gnome‑shell/extensions}}'''. Removing these two extension-containing folders may fix the breakage. Otherwise, isolate the problem extension with trial‑and‑error.<br />
<br />
Removing or adding an extension-containing folder to the aforementioned directories removes or adds the corresponding extension to your system. Details on GNOME Shell extensions are available at the [https://live.gnome.org/GnomeShell/Extensions GNOME web site.]<br />
<br />
=== Extensions do not work after GNOME 3 update ===<br />
<br />
Locate the folder where your extensions are installed. It might be '''{{ic|~/.local/share/gnome-shell/extensions}}''' or '''{{ic|/usr/share/gnome-shell/extensions}}'''.<br />
<br />
Edit each occurrence of '''{{ic|metadata.json}}''' which appears in each extension sub-folder. <br />
<br />
{| border="0"<br />
| Insert: || '''{{ic|"shell-version": ["3.6"]}}'''<br />
|-<br />
| Instead of (for example): || '''{{ic|"shell-version": ["3.4"]}}'''<br />
|}<br />
<br />
'''"3.x"''' indicates the extension works with every Shell version. If it breaks, you will know to change it back.<br />
<br />
=== Remove Gnome Shell Extensions ===<br />
<br />
If you have trouble with uninstalling Gnome Extensions via https://extensions.gnome.org/local/, then probably they have been installed as system-wide extensions with {{ic|pacman -S gnome-shell-extensions}} before. To remove them, you have to be careful, because the following instruction removes all extensions from other user's, too.<br />
{{ic|pacman -R gnome-shell-extensions}}<br />
Following that, you refresh Gnome Shell by pressing ALT+F2 and entering {{ic|restart}}<br />
<br />
Then go to https://extensions.gnome.org/local/ again and have a look for your installed extensions list. It should have changed.<br />
<br />
All other extensions should be removable by pressing the red X icon to the right. If not, something may be broken. <br />
<br />
As a final step, you can remove them manually from {{ic|~/.local/share/gnome-shell/extensions/*}} and/or {{ic|/usr/share/gnome-shell/extensions}}. Restart Gnome Shell again and you should be fine.<br />
<br />
=== The "Windows" key ===<br />
By default, this key is mapped to the "overlay-key" to launch the Overview. You can remove this key mapping to free up your {{ic|Windows Key}} (also called {{ic|Mod4}}), which GNOME calls {{ic|Super_L}}, by utilizing {{ic|gsettings}}.<br />
<br />
Example:<br />
{{ic| gsettings set org.gnome.mutter overlay-key 'Foo';}}.<br />
You can leave out '''Foo''' to simply remove any binding to that function.<br />
<br />
{{Note| GNOME also uses {{ic|Alt+F1}} to launch the Overview.}}<br />
<br />
=== Keyboard Shortcut do not work with only conky running ===<br />
The gnome-shell keyboard shortcuts like {{ic|Alt+F2}}, {{ic|Alt+F1}}, and the media key shortcuts do not work if conky is the only program running. However if another application like gedit is running, then the keyboard shortcuts work.<br />
<br />
solution: edit .conkyrc <br />
<br />
own_window yes<br />
own_window_transparent yes<br />
own_window_argb_visual yes<br />
own_window_type dock<br />
own_window_class Conky<br />
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager<br />
<br />
=== Window opens behind other windows when using multiple monitors ===<br />
<br />
This is possibly a bug in GNOME Shell which causes new windows to open behind others.<br />
Unchecking "workspaces_only_on_primary" in desktop/gnome/shell/windows using gconf-editor solves this problem.<br />
<br />
=== Multiple monitors and dock extension ===<br />
<br />
If you have multiple monitors configured using Nvidia Twinview, the dock extension may get sandwiched in-between the monitors. You can edit the source of this extension to reposition the dock to a position of your choosing.<br />
<br />
Edit {{ic|/usr/share/gnome-shell/extensions/dock@gnome-shell-extensions.gnome.org/extension.js}} and locate this line in the source:<br />
<br />
this.actor.set_position(primary.width-this._item_size-this._spacing-2, (primary.height-height)/2);<br />
<br />
The first parameter is the X position of the dock display, by subtracting 15 pixels as opposed to 2 pixels from this it correctly positioned on my primary monitor, you can play around with any X,Y coordinate pair to position it correctly.<br />
<br />
this.actor.set_position(primary.width-this._item_size-this._spacing-15, (primary.height-height)/2);<br />
<br />
=== "Show Desktop" keyboard shortcut does not work ===<br />
<br />
GNOME developers treated the corresponding binding as bug (see https://bugzilla.gnome.org/show_bug.cgi?id=643609) due to Minimization being deprecated. To show the desktop again assign ALT+STRG+D to the following setting:<br />
<br />
System Settings --> Keyboard --> Shortcuts --> Navigation --> Hide all normal windows<br />
<br />
=== Unable to apply stored configuration for monitors ===<br />
<br />
If you encounter this message try to disable the xrandr gnome-settings-daemon plugin :<br />
<br />
$ dconf write /org/gnome/settings-daemon/plugins/xrandr/active false<br />
<br />
=== Lock button fails to re-enable touchpad ===<br />
<br />
Some laptops have a touchpad lock button that disables the touchpad so that users can type without worrying about touching the touchpad. It appears currently that although GNOME can lock the touchpad by pressing this button, it cannot unlock it. If the touchpad gets locked you can do the following to unlock it.<br />
# Start a terminal. You can do this by pressing {{ic|Alt+F2}}, then typing {{ic|gnome-terminal}} followed by pressing {{ic|Enter}}.<br />
# Type in the following command<br />
$ xinput set-prop "SynPS/2 Synaptics TouchPad" "Device Enabled" 1<br />
<br />
=== GDM and GNOME use X11 cursors ===<br />
<br />
To fix this problem, become root and put the following into {{ic|/usr/share/icons/default/index.theme}} (creating the directory {{ic|/usr/share/icons/default}} if necessary):<br />
{{hc|/usr/share/icons/default/index.theme|<nowiki><br />
[Icon Theme]<br />
Inherits=Adwaita<br />
</nowiki>}}<br />
<br />
Note: Instead of "Adwaita", you can choose another cursor theme (e.g. Human).<br />
<br />
=== Tracker & Documents do not list any local files ===<br />
<br />
In order for Tracker (and, therefore, Documents) to detect your local files, they must be stored in directories that it knows of. If your documents are contained in one of the usual XDG standard directories (i.e. "Documents" or "Music"), you should install {{Pkg|xdg-user-dirs}} and run:<br />
<br />
# xdg-user-dirs-update<br />
<br />
This will create all of the usual XDG home directories if they do not already exist and it will create the config file definining these directories that Tracker and Documents depend upon.<br />
<br />
=== Passwords are not remembered ===<br />
<br />
If you get a password prompt every time you login, and you find password are not saved, you might need to create/set a default keyring:<br />
<br />
Install {{pkg|seahorse}}. Open "Passwords and Keys" from the menu or run {{ic|seahorse}}. Select View > By Keyring. If there is no keyring in the left column (it will be marked with a lock icon), go to File > New > Password Keyring and give it a nice name. You will be asked to enter a password. If you do not give it a password it will be unlocked automatically even when using autologin, but passwords will not be stored securely. Finally, right-click on the keyring you just created and select "Set as default".<br />
<br />
=== Windows cannot be modified with Alt-Key + Mouse-Button ===<br />
<br />
Change the dconf-setting "org.gnome.desktop.wm.preferences.mouse-button-modifier" from <Super> back to <Alt>. It is not possible to change this with ''System Settings'' > "Keyboard" > "Shortcuts", you will find there only the regular keybindings. The developers of GNOME decided to change this from 3.4 to 3.6 because of this bug report https://bugzilla.gnome.org/show_bug.cgi?id=607797<br />
<br />
=== Gnome-shell 3.8.x fails to load with a black screen + cursor ===<br />
<br />
If you have a non-UTF8 language enabled, Gnome 3 can fail to load. Disable non-UTF-8 locales and perform a locale-gen until this is resolved.<br />
For more information see this bug report: https://bugzilla.gnome.org/show_bug.cgi?id=698952<br />
<br />
=== Gnome 3.10 UI elements scale incorrectly ===<br />
<br />
With 3.10 Gnome introduced HDPI support. If your displays EDID info does not contain the correct screen size, but the resolution is right, this can lead to incorrectly scaled UI elements. As a workaround you can open dconf-editor and find the key {{ic|scaling-factor}} in {{ic|org.gnome.desktop.interface}}. Set it to 1 to get the standard scale.<br />
<br />
=== Tear-free video with Intel HD Graphics ===<br />
Enabling the [[Intel _Graphics#Tear-free_video|Xorg Intel TearFree option]] is a known workaround to tearing problems on Intel adapters, however the way this option acts makes it redundant with the use of a compositor (adds up memory consumption and lowers performance, see [https://bugs.freedesktop.org/show_bug.cgi?id=37686#c123 the original bug report's final comment]).<br />
<br />
On the other hand, GNOME Shell uses Mutter as a compositor which has a tweak known to address tearing problems (see [https://bugzilla.gnome.org/show_bug.cgi?id=657071#c1 the original suggestion for this fix] and its mention in [https://bugs.freedesktop.org/show_bug.cgi?id=37686#c59 the Freedesktop bug report]): the line {{ic|1=CLUTTER_PAINT=disable-clipped-redraws:disable-culling}} must be appended to {{ic|/etc/environment}} and Xorg server restarted. This tweak solved tearing problems.<br />
<br />
== External links ==<br />
* [http://www.gnome.org/ The Official Website of GNOME]<br />
* [http://extensions.gnome.org/ Extensions for GNOME-shell]<br />
* Themes, icons, and backgrounds:<br />
** [http://art.gnome.org/ GNOME Art]<br />
** [http://www.gnome-look.org/ GNOME Look]<br />
* GTK/GNOME programs:<br />
** [http://www.gnomefiles.org/ GNOME Files]<br />
** [http://www.gnome.org/projects/ GNOME Project Listing]</div>Muffinmadhttps://wiki.archlinux.org/index.php?title=Python&diff=259499Python2013-05-29T14:31:54Z<p>Muffinmad: /* Python 2 */ fixed 'pac' instead of 'pacman' in virtualenv install command</p>
<hr />
<div>[[Category:Programming language]]<br />
[[de:Python]]<br />
[[zh-CN:Python]]<br />
{{Article summary start}}<br />
{{Article summary text|This article explains how to install and configure Python.}}<br />
{{Article summary heading|Related}}<br />
{{Article summary wiki|Python Package Guidelines}}<br />
{{Article summary wiki|mod_python}}<br />
{{Article summary wiki|Python VirtualEnv}}<br />
{{Article summary end}}<br />
<br />
[http://www.python.org Python] "is a remarkably powerful dynamic programming language that is used in a wide variety of application domains. Python is often compared to Tcl, Perl, Ruby, Scheme or Java."<br />
<br />
==Installation==<br />
<br />
There are currently two versions of Python: Python 3 (which is the default) and the older Python 2.<br />
<br />
===Python 3===<br />
<br />
Python 3 is the latest version of the language, and is '''incompatible with Python 2'''. The language is mostly the same, but many details, especially how built-in objects like dictionaries and strings work, have changed considerably, and a lot of deprecated features have finally been removed. Also, the standard library has been reorganized in a few prominent places. For an overview of the differences, visit [http://wiki.python.org/moin/Python2orPython3 Python2orPython3] and their relevant [http://diveintopython3.ep.io/porting-code-to-python-3-with-2to3.html chapter] in Dive into Python 3.<br />
<br />
To install the latest version of Python 3, [[pacman|install]] the {{Pkg|python}} package from the [[Official Repositories|official repositories]].<br />
<br />
If you would like to build the latest RC/betas from source, visit [http://www.python.org/download/ Python Downloads]. The [[Arch User Repository]] also contains good [[PKGBUILD]]s. If you do decide to build the RC, note that the binary (by default) installs to {{ic|/usr/local/bin/python3.x}}.<br />
<br />
===Python 2===<br />
To install the latest version of Python 2, [[pacman|install]] the {{Pkg|python2}} package from the [[Official Repositories|official repositories]].<br />
<br />
Python 2 will happily run alongside Python 3. You need to specify '''python2''' in order to run this version.<br />
<br />
Any program requiring Python 2 needs to point to {{ic|/usr/bin/python2}}, instead of {{ic|/usr/bin/python}}.<br />
<br />
To do so, open the program or script in a text editor and change the first line.<br />
<br />
The line will show one of the following:<br />
#!/usr/bin/env python<br />
or<br />
#!/usr/bin/python<br />
<br />
In both cases, just change {{ic|python}} to {{ic|python2}} and the program will then use Python 2 instead of Python 3.<br />
<br />
Another way to force the use of python2 without altering the scripts is to call it explicitely with python2, i.e.<br />
{{bc|python2 myScript.py}}<br />
<br />
Finally, you may not be able to control the script calls, but there is a way to trick the environment. It only works if the scripts use {{ic|#!/usr/bin/env python}}, it won't work with {{ic|#!/usr/bin/python}}. This trick relies on {{ic|env}} searching for the first corresponding entry in the PATH variable.<br />
First create a dummy folder.<br />
$ mkdir ~/bin<br />
Then add a symlink 'python' to python2 and the config scripts in it.<br />
$ ln -s /usr/bin/python2 ~/bin/python<br />
$ ln -s /usr/bin/python2-config ~/bin/python-config<br />
Finally put the new folder ''at the beginning'' of your PATH variable.<br />
$ export PATH=~/bin:$PATH<br />
Note that this change is not permanent and is only active in the current terminal session.<br />
To check which python interpreter is being used by {{ic|env}}, use the following command:<br />
$ which python<br />
<br />
A similar approach in tricking the environment, which also relies on {{ic|#!/usr/bin/env python}} to be called by the script in question, is to use a [[Virtualenv]]. When a Virtualenv is activated, the Python executable pointed to by {{ic|$PATH}} will be the one the Virtualenv was installed with. Therefore, if the Virtualenv is installed with Python 2, {{ic|python}} will refer to Python 2. To start, install Virtualenv.<br />
$ pacman -S python2-virtualenv<br />
Then create the Virtualenv.<br />
$ virtualenv2 venv # Creates a directory, venv/, containing the Virtualenv<br />
Activate the Virtualenv, which will update {{ic|$PATH}} to point at Python 2. Note that this activation is only active for the current terminal session.<br />
$ source venv/bin/activate<br />
The desired script should then run using Python 2.<br />
<br />
==Dealing with version problem in build scripts==<br />
Many projects' build scripts assume {{ic|python}} to be Python 2, and that would eventually result in an error - typically complaining that {{ic|print 'foo'}} is invalid syntax. Luckily, many of them call {{ic|python}} in the {{ic|$PATH}} instead of hardcoding {{ic|#!/usr/bin/python}} in the shebang line, and the Python scripts are all contained within the project tree. So, instead of modifying the build scripts manually, there is an easy workaround. Just create {{ic|/usr/local/bin/python}} with content like this:<br />
<br />
{{hc|/usr/local/bin/python|<nowiki><br />
#!/bin/bash<br />
script=`readlink -f -- "$1"`<br />
case "$script" in<br />
/path/to/project1/*|/path/to/project2/*|/path/to/project3*)<br />
exec python2 "$@"<br />
;;<br />
esac<br />
<br />
exec python3 "$@"<br />
</nowiki><br />
}}<br />
<br />
Where {{ic|<nowiki>/path/to/project1/*|/path/to/project2/*|/path/to/project3*</nowiki>}} is a list of patterns separated by {{ic|<nowiki>|</nowiki>}} matching all project trees.<br />
<br />
Don't forget to make it executable:<br />
<br />
# chmod +x /usr/local/bin/python<br />
<br />
Afterwards scripts within the specified project trees will be run with Python 2.<br />
<br />
==Integrated Development Environments==<br />
There are some IDEs for Python available in the [[Official Repositories|official repositories]].<br />
<br />
===Eclipse===<br />
<br />
Eclipse supports both Python 2.x and 3.x series by using the [[Eclipse#PyDev|PyDev]] extension.<br />
<br />
===Eric===<br />
For the latest Python 3 compatible version, [[pacman|install]] the {{Pkg|eric}} package.<br />
<br />
Version 4 of Eric is Python 2 compatible and can be installed with the {{Pkg|eric4}} package.<br />
<br />
These IDEs can also handle [[Ruby]].<br />
<br />
===Ninja===<br />
<br />
The Ninja IDE is provided by the package {{Pkg|ninja-ide}}.<br />
<br />
===Spyder===<br />
<br />
Spyder (previously known as Pydee) is a powerful interactive development environment for the Python language with advanced editing, interactive testing, debugging and introspection features. It focuses on scientific computations, providing a matlab-like environment. It can be installed with the package {{AUR|spyder}}<br />
<br />
== Getting easy_install ==<br />
<br />
The easy_install tool is available in the package {{Pkg|python-distribute}} or {{Pkg|python2-distribute}}.<br />
<br />
==Widget bindings ==<br />
The following [[wikipedia:widget toolkit|widget toolkit]] bindings are available:<br />
*{{App|[[TkInter]]|[[Tk]] bindings|http://wiki.python.org/moin/TkInter|standard module}}<br />
*{{App|[[pyQt]]|[[Qt]] bindings|http://www.riverbankcomputing.co.uk/software/pyqt/intro|{{Pkg|pyqt}}}}<br />
*{{App|[[pySide]]|[[Qt]] bindings|http://www.pyside.org/|{{Pkg|python2-pyside}}}}<br />
*{{App|[[pyGTK]]|[[GTK+]] bindings|http://www.pygtk.org/|{{Pkg|pygtk}}}}<br />
*{{App|[[wxPython]]|[[wxWidgets]] bindings|http://wxpython.org/|{{Pkg|wxpython}}}}<br />
To use these with Python, you may need to install the associated widget kits.<br />
<br />
==Old versions==<br />
Old versions of Python are available via the [[Arch User Repository|AUR]] and may be useful for historical curiosity, old applications that don't run on current versions, or for testing Python programs intended to run on a distribution that comes with an older version (eg, RHEL 5.x has Python 2.4, or Ubuntu 12.04 has Python 3.1):<br />
*{{AUR|python15}}: Python 1.5.2<br />
*{{AUR|python16}}: Python 1.6.1<br />
*{{AUR|python24}}: Python 2.4.6<br />
*{{AUR|python25}}: Python 2.5.6<br />
*{{AUR|python26}}: Python 2.6.8<br />
*{{AUR|python30}}: Python 3.0.1<br />
*{{AUR|python31}}: Python 3.1.5<br />
*{{AUR|python32}}: Python 3.2.3<br />
<br />
As of November 2012, Python upstream only supports Python 2.6, 2.7, 3.1, 3.2, and 3.3 for security fixes. Using older versions for Internet-facing applications or untrusted code may be dangerous and is not recommended.<br />
<br />
Extra modules/libraries for old versions of Python may be found on the AUR by searching for python(version without decimal), eg searching for "python26" for 2.6 modules.<br />
<br />
==More Resources==<br />
* [http://shop.oreilly.com/product/9780596158071.do Learning Python] is one of the most comprehensive, up to date, and well-written books on Python available today.<br />
* [http://www.diveintopython.net/ Dive Into Python] is an excellent (free) resource, but perhaps for more advanced readers and [http://diveintopython3.ep.io/ has been updated for Python 3].<br />
* [http://www.swaroopch.com/notes/Python A Byte of Python] is a book suitable for users new to Python (and scripting in general).<br />
* [http://learnpythonthehardway.org Learn Python The Hard Way] the best intro to programming.<br />
* [http://facts.learnpython.org facts.learnpython.org] nice site to learn python.<br />
* [http://stephensugden.com/crash_into_python/ Crash into Python] Also known as ''Python for Programmers with 3 Hours'', this guide gives experienced developers from other languages a crash course on Python.<br />
* [http://www.apress.com/book/view/9781590598726 Beginning Game Development with Python and Pygame: From Novice to Professional] for games<br />
<br />
==For Fun==<br />
Try the following snippets from Python's interactive shell:<br />
<br />
>>> import this<br />
<br />
>>> from __future__ import braces<br />
<br />
>>> import antigravity</div>Muffinmadhttps://wiki.archlinux.org/index.php?title=Wmii&diff=160667Wmii2011-09-19T10:52:18Z<p>Muffinmad: /* Keyboard layouts */ removed double http in link to xxkb</p>
<hr />
<div>[[Category:Dynamic WMs (English)]]<br />
{{i18n|Wmii}}{{DISPLAYTITLE:wmii}}<br />
<br />
[http://www.suckless.org/wmii/ wmii] (window manager improved 2) is a dynamic window manager for X11. It supports classic and dynamic window management with extended keyboard, mouse, and filesystem based remote control. It replaces the workspace paradigm with a new tagging approach. <br />
<br />
The following tips are intended to help the user get started with wmii. While wmii can be configured in almost any language, this article will focus on using the '''wmiirc''' configuration file, which is simply a shell script. Please see the [[ruby-wmii]] article to see how to configure wmii in ruby.<br />
<br />
==Installation==<br />
wmii is available from the '''extra''' repository. You can install it by issuing the following command:<br />
<br />
pacman -S wmii<br />
<br />
Alternatively, you can get the [http://aur.archlinux.org/packages.php?ID=3497 latest development version] which is available from the [[AUR]].<br />
<br />
Next you will need to edit your '''~/.xinitrc''' to enable you to start wmii with '''startx''':<br />
<br />
exec wmii<br />
<br />
To allow for starting wmii without logging off or killing the X session, add the following in the ~/.xinitrc<br />
until wmii; do<br />
true<br />
done<br />
Upon your first login, you will be greeted with the wmii welcome message, which also includes a short tutorial on wmii. Completing this tutorial will give you a good idea on how wmii works.<br />
{{Box Note|If the welcome message does not show up, make sure you have '''xmessage''' installed from the '''xorg-xmessage''' package. Then you can read the welcome by pressing $MODKEY-a and selecting 'welcome'.}}<br />
<br />
==Configuration==<br />
The easiest way to start configuring wmii, is to copy the default wmiirc file to your home directory and changing it to your needs. For version 3.9,<br />
mkdir ~/.wmii<br />
cp /etc/wmii/wmiirc ~/.wmii/<br />
<br />
Or just create ~/.wmii/wmiirc_local if you want only basic customization such as fonts, colors etc.<br />
<br />
For earlier versions,<br />
mkdir ~/.wmii/wmii-$VERSION<br />
cp /etc/wmii/wmiirc ~/.wmii/wmii-$VERSION/<br />
<br />
By editing this file, you can change things such as color, background, modkey, etc. Keep in mind that wmiirc uses tabbed indentation in case your editor of choice is configured to only produce spaces. Mixing the two indenting styles may cause unexpected behavior.<br />
====Configuration Variables====<br />
# Configuration Variables<br />
MODKEY=Mod1<br />
UP=k<br />
DOWN=j<br />
LEFT=h<br />
RIGHT=l<br />
Change Mod1 to Mod4 if you want to use Windows key instead of Alt. You can also change h, j, k, l, if you like.<br />
<br />
====Window Colors====<br />
# Colors tuples: "<text> <background> <border>"<br />
WMII_NORMCOLORS='#ffffff #000000 #ffffff'<br />
WMII_FOCUSCOLORS='#ffffff #5c0000 #ffffff'<br />
<br />
WMII_BACKGROUND='#333333'<br />
WMII_FONT='fixed'<br />
Colors of unselected window are in NORMCOLORS variable. Colors of selected window are in FOCUSCOLOR variable. You can change the background color (if you use transparent terminal) with the WMII_BACKGROUND variable.<br />
<br />
==== For Laptop Users====<br />
<br />
If you are using wmii on laptop, it may be convenient to display useful items such as battery charge percentage, wireless quality, and cpu frequency in the status bar.<br />
<br />
''note: this requires you to install acpi<br />
pacman -S acpi''<br />
<br />
# Status Bar Info<br />
status() {<br />
echo -n ' Wlan0:' $(iwconfig wlan0 | sed 's/ /\n/g' | grep Quality) '|' $(acpi -b | sed 's/.*, \{0,2\}\([0-9]\{1,3\}%\),.*/Bat: \1 | /') ' Core MHz:' $(cat /proc/cpuinfo | grep 'cpu MHz' | sed 's/.*: //g; s/\..*//g;') '|' $(uptime |<br />
sed 's/.*://; s/,//g') '|' $(date) <br />
}<br />
<br />
By default the status bar only shows date and an uptime pager (displays system load average for the last 1, 5, 15 minutes).<br />
<br />
==Usage==<br />
<br />
If you are not familiar with tiling WMs, it's not really easy to begin with it. You have to learn a few basic hotkeys to launch programs and place or resize windows. By default, the "Mod" key is Alt. Some default hotkeys are :<br />
* Mod+Enter -> Terminal<br />
* Mod+p -> wimenu : a menu appears, just type the beginning of the name of the application <br />
to open it.<br />
* Mod+d -> default layout : windows are divided on screen<br />
* Mod+s -> stacked layout : the selected window take all the screen, we just see the title <br />
bar of the others.<br />
* Mod+j -> select the window below<br />
* Mod+k -> select the window above<br />
* Shift+Mod+j -> move the window down<br />
* Shift+Mod+k -> move the window up<br />
* Mod+a -> Actions menu : choose "quit" to quit<br />
<br />
* N.B. For commonly used programs you can make use of ''history.progs'', Mod+p and up/down <br />
arrow keys to select previous entries.<br />
<br />
<br />
By default, only one column is used by the desktop (i.e. the entire screen). It's possible to use several columns with h and l :<br />
<br />
* Mod+Shift+h : move the selected window left<br />
* Mod+Shift+l : move the selected window right<br />
* Mod+h : select the column on the left<br />
* Mod+l : select the column on the right <br />
<br />
Columns are created automatically, with your placements of the windows. You can make them bigger or smaller, clicking beetween two columns.<br />
<br />
===Layouts===<br />
<br />
You begin in "default" layout : all windows take the same space. You can make them bigger or smaller by clicking in the little square in the title bar of a window.<br />
<br />
* "stacked" layout (Mod+s) : the selected window takes the entire column, but you can see <br />
the title bar of other windows.<br />
* "maximum" layout (Mod+m) : the selected window takes the entire column, you don't see <br />
other windows.<br />
* "fullscreen" layout (Mod+f) : the selected window takes runs in full screen.<br />
<br />
If you tend to use multiple clients in stacked view then binding the following allows you to remove all the title bars apart from the one you are viewing, regaining screen estate.<br />
Each client will be numbered in the top right with 1/3, 2/3 etc. <br />
Mod + s or Mod + d will return the view to standard layouts.<br />
* fn Key-$MODKEY-x {wmiir xwrite /tag/sel/ctl colmode sel +max} # rc.wmii.local version<br />
* Key $MODKEY-x<br />
wmiir xwrite /tag/sel/ctl colmode sel +max # wmiirc version<br />
<br />
====Floating layout====<br />
<br />
You can place your windows like a classic window manager. It's called floating layout. It's useful for some applications, like the Gimp, mplayer, vlc etc.<br />
<br />
* Mod+Shift+Space : Move selected window in floating layout.<br />
* Mod+Space : switch between floating layout and normal layout. <br />
<br />
In the floating layout, we can select a window with Mod+j and Mod+k. We can change dimensions of the window, by dragging, like in any other window manager. But we can use hotkeys for that as well :<br />
<br />
* Mod+Left click : move window<br />
* Mod+Right click : change dimensions of the window (you can use it in other layouts too)<br />
<br />
===Views and Tagging===<br />
Tagging in wmii is very similar to the concept of virtual desktops in other window managers. However, tagging is slightly more powerful because it makes it very easy to group windows in multiple ways concurrently. This is made possible by the fact that WMII easily allows each window to have multiple tags. This allows you to group applications for specific use cases and easily switch between them without having to tear down your previous environment by sending applications to another "Desktop".<br />
<br />
By default, when you first start up wmii you will see the word 'nil' in the lower left corner. You are at the 'nil' view. The first application you start (such as a terminal: Mod+Enter) will automatically be tagged with a "1" and you will be automatically switched to view "1". Views can be navigated or changed with built in keybindings:<br />
<br />
* Mod+Shift+2 : tag selected window to view "2"<br />
* Mod+2 : this switches you to view "2" where you can see all windows tagged with "2"<br />
<br />
It's the same thing for all numbers, from 0 to 9. But you can also use names :<br />
<br />
* Mod+t : views menu : you can select a tag with right and left keys, or type the name <br />
of the tag (or just a part of the name, if it was created).<br />
<br />
* Mod+Shift+t : this retags the currently selected window with whatever you type into <br />
the menu.<br />
<br />
* N.B If using plan9port a ''history.tags'' file is generated in .wmii-*/. You can use <br />
up/down arrow keys to recall previous entries for simple re-tagging/window viewing.<br />
<br />
You can tag windows with multiple views by using a '+' between the tag names :<br />
<br />
* Mod+Shift+t foo+bar+2 : this tags the currently selected window to the views "foo",<br />
"bar" and "2".<br />
You can remove a single tag from multi-tagged windows by selecting the one you wish to remove<br />
and using Mod+Shift+t, -tag ''name/number'' ie<br />
Urxvt is multi-tagged on views 1 2 3 and 4, if you jumped to 3 and typed exit, all instances of<br />
urxvt will be terminated, using Mod+Shift+t, -3 will only remove that single view.<br />
<br />
Tags can be set for specific applications in the wmiirc configuration file.<br />
<br />
# Tagging Rules<br />
wmiir write /tagrules <<!<br />
/Firefox.*/ -> ~+2<br />
/Gimp.*/ -> ~+3<br />
/.*/ -> sel<br />
/.*/ -> 1<br />
!<br />
<br />
With the above tag rules, firefox starts in floating mode (~) on view "2". Gimp starts in floating mode on view "3".<br />
<br />
{{Box Note | Applications need to spawn an X-window in order to be automatically assigned tags. Therefore, in order to launch your terminal based programs you will need to prepend something like ''urxvt -e <program>'' if want to make use of this feature.}}<br />
<br />
==WMII filesystem==<br />
<br />
WMII's filesystem is based on the [http://9p.cat-v.org 9P protocol]. Every element (windows, statusbar, ...) is represented as a file. This makes several cool things possible. For example you can display the song you're currently listening to in the statusbar (for example with MPD and MPC).<br />
<br />
{{Box Note|This filesystem is not permanent and you have to set up everything again after reboot. To make your changes "permanent" simply write the right commands into your wmiirc.}}<br />
<br />
You can access the filesystem with the ''wmiir'' command. For instance, you can list the root directory with ''wmiir ls /''<br />
<br />
client/<br />
colrules<br />
ctl<br />
event<br />
keys<br />
lbar/<br />
rbar/<br />
tag/<br />
tagrules<br />
<br />
You can use ''wmiir read'' to look into files: ''wmiir read /tag/sel/index''<br />
<br />
# ~ 1280 785<br />
~ 0x160000d 731 394 486 332 xterm:XTerm:~<br />
# 1 0 1280<br />
1 0x800003 0 785 opera:Opera:Editing Wmii - Preview - ArchWiki - Opera<br />
<br />
So this is the info for the '''sel'''ected (current) tag. As you can see, I've got one floating xterm and Opera running on this tag. The first number in this output indicates the column of the window. ~ is the floating column and 1 ist (obviously) the first column. The second column is the XServer-ID for the client. The next columns are the coordinates and the size of the window. The last column ist the titlebar of the window.<br />
<br />
You can create new files with ''wmiir create'':<br />
<br />
echo Arch is best | wmiir create /rbar/arch<br />
<br />
Now you should see "Arch is best" in your statusbar<br />
<br />
"wmiir create" reads from STDIN. So you can pipe any information you like into your statusbar. "wmiir write" works in a similar fashion but doesn't create new files.<br />
<br />
{{Box Note|Note for /rbar and /lbar:The elements in those status bars are in alphabetical order.}}<br />
<br />
You can remove files with rm or remove<br />
<br />
If you like to have a program on several tags you can use:<br />
echo "3+5+8" | wmiir write /client/0x800003/tags<br />
<br />
Now my Opera window appears on Tags 3,5 and 8.<br />
<br />
But there are easier ways to accomplish this ;)<br />
Just type MOD+shift+t and enter "3+5+8" and you get the same result for the currently selected client.<br />
<br />
{{Box Note| There's also the possibility to mount WMII's filesystem. Have a look at the [http://wmii.suckless.org/9p official documentation]. }}<br />
<br />
==Other nice stuff==<br />
<br />
===Terminal Title===<br />
If you would like to display the current directory in your terminal emulator's titlebar, add this to your .bashrc<br />
WMII_IS_RUNNING=`ps a | grep wmii | awk '/[^"grep"] wmii$/'`<br />
if [ -n "$WMII_IS_RUNNING" ]; then<br />
PROMPT_COMMAND='dirs | wmiir write /client/sel/label'<br />
fi<br />
With this you can shorten you shell prompt and have more horizontal space to type. This test prevents you from getting a "WMII_ADRESS not set" error when you spawn a console.<br />
<br />
===Weechat Highlight Notification===<br />
If you use weechat and want to know when you have been messaged without always having to look at the weechat window, you can use the ''launcher.pl'' plugin to send a notice to the bar. To get this working, you will need to create a script that sends your desired notice. Here is very simple example:<br />
<br />
#!/bin/bash<br />
echo :: NEW MESSAGE :: | wmiir create /lbar/alert<br />
sleep 8<br />
wmiir remove /lbar/alert<br />
<br />
Then start weechat and load the plugin.<br />
<br />
/perl load launcher.pl<br />
<br />
Then type the following command into weechat:<br />
<br />
/set plugins.var.perl.launcher.signal.weechat_pv = "/path/to/yourscript"<br />
<br />
<br />
Now, :: NEW MESSAGE :: will appear in the left corner of your bar whenever you have a message highlight. Make sure to place ''launcher.pl'' the perl/autoload directory so that it starts when weechat starts.<br />
<br />
===Mod4 on an old Thinkpad===<br />
<br />
Although Wmii defaults to Mod1, using Mod4 reduces conflicts in keybindings with many terminal applications. There is a snag for old Thinkpad users, however. They don't have a Mod4 key. To get one, another key has to be assigned to it using xmodmap. To do it, make an ''.Xmodmap'' file in your home directory and add this to it:<br />
keycode 64 = Super_L<br />
add Mod4 = Super_L<br />
remove Mod1 = Super_L<br />
<br />
You will need to replace 64 with whatever ''xev'' tells you is the keycode of the key you want to replace. In the above example, I replace left Alt (and use right alt for applications).<br />
<br />
===Nice fonts===<br />
Wmii now supports Xft, just prefix font name with 'xft'. For instance:<br />
export WMII_FONT='xft:Sans-9'<br />
<br />
===Keyboard layouts===<br />
You'd probably like to have its own keyboard layout for each window. However, most of such applications requires system tray while witray is only available in the [http://aur.archlinux.org/packages.php?ID=3497 development version of wmii]. [http://www.archlinux.org/packages/?q=xxkb xxkb] package helps to solve the problem. It has no UI by default. You only need to configure layouts in xorg.conf. Create /etc/X11/xorg.conf.d/20-keyboard.conf and put something like this into it:<br />
Section "InputClass"<br />
Identifier "Keyboard Defaults"<br />
MatchIsKeyboard "yes"<br />
Option "XkbModel" "pc101"<br />
Option "XkbLayout" "us,ru"<br />
Option "XkbOptions" "grp:ctrl_shift_toggle,compose:prsc"<br />
EndSection<br />
Replace layout, options and model to fit your needs. Add<br />
xxkb &<br />
into your wmiirc and it just works.<br />
[http://aur.archlinux.org/packages.php?ID=33298 xkblayout-state] can be used to put layout indicator into the status line:<br />
status() {<br />
echo -n label $(xkblayout-state print "%s") '|' $(date +"%a %b %d %H:%M")<br />
}<br />
<br />
===Note: Version 3.9.2-1===<br />
<br />
If you upgrade from wmii v3.6-4 to v3.9.2-1 you will have to insert any changes you made to your old ~/.wmii-3.5/wmiirc configuration file into the newer config file located at ~/.wmii/wmiirc_local. Note also that there are some slight format and variable name changes between the newer and older versions of /etc/wmii/wmiirc.<br />
<br />
This latest version has some significant enhancements such as easier window dimension changes with the mouse and better handling of small floating windows launched from tiled applications (especially OpenOffice).<br />
<br />
==Other Resources==<br />
* [http://wmii.suckless.org/ wmii] -- the official website of wmii<br />
* [[dmenu]] -- a simple application launcher which binds well with dwm and wmii<br />
* [http://wmii.googlecode.com/hg/doc/wmii.pdf user guide] -- latest wmii guide (pdf)<br />
* [http://eigenclass.org/hiki.rb?wmii+ruby ruby-wmii] -- Ruby configuration and scripting for wmii 3.1 and older<br />
* [https://github.com/sunaku/wmiirc ruby wmiirc] -- Ruby configuration and scripting for wmii 3.9 and newer<br />
* [http://pastebin.com/Xyn0mEjr Ben's wmiirc] -- Simple wmiirc with extra widgets (vol, mpd, mail, clock) and other modifications</div>Muffinmad