mirror of
https://github.com/parchlinux/wikibackup.git
synced 2025-02-22 20:05:44 -05:00
154 lines
3.9 KiB
Markdown
154 lines
3.9 KiB
Markdown
|
---
|
|||
|
title: GNOME Desktop Environment
|
|||
|
description:
|
|||
|
published: true
|
|||
|
date: 2024-10-01T11:10:56.171Z
|
|||
|
tags: gnome
|
|||
|
editor: markdown
|
|||
|
dateCreated: 2024-10-01T10:43:58.594Z
|
|||
|
---
|
|||
|
|
|||
|
# What is GNOME?
|
|||
|
> GNOME (/(ɡ)noʊm/) is a desktop environment that aims to be simple and easy to use. It is designed by The GNOME Project and is composed entirely of free and open-source software.
|
|||
|
|
|||
|
|
|||
|
### Screenshot of Gnome in Parch Linux
|
|||
|
|
|||
|

|
|||
|
|
|||
|
## Moving from another Desktop to Gnome
|
|||
|
|
|||
|
For installing Gnome on Parch Linux you need to install our meta package.
|
|||
|
|
|||
|
```bash
|
|||
|
sudo pacman -S parch-gnome-meta
|
|||
|
```
|
|||
|
this would install a minimal gnome session with parch customization on Parch Linux.
|
|||
|
|
|||
|
### enabling the display manager
|
|||
|
if you are moving from KDE or other desktops (by default parch uses sddm in all editions except Gnome) you need to disable your old login manager and then enable GDM .
|
|||
|
|
|||
|
```bash
|
|||
|
# disabling old login manager (sddm)
|
|||
|
sudo systemctl disable sddm
|
|||
|
|
|||
|
#enabling GDM
|
|||
|
sudo systemctl enable gdm
|
|||
|
```
|
|||
|
|
|||
|
|
|||
|
## Tips and Tricks
|
|||
|
|
|||
|
### Enabling numlock on GNOME startup
|
|||
|
|
|||
|
You need to run this command in terminal for enabling this behavior:
|
|||
|
```bash
|
|||
|
gsettings set org.gnome.desktop.peripherals.keyboard numlock-state true
|
|||
|
```
|
|||
|
|
|||
|
To remember the last state:
|
|||
|
```bash
|
|||
|
gsettings set org.gnome.desktop.peripherals.keyboard remember-numlock-state true
|
|||
|
```
|
|||
|
|
|||
|
|
|||
|
### Redirect certain URLs to specific web browsers
|
|||
|
|
|||
|
This shows how to use Chromium for certain types of URLs while maintaining Firefox as default browser for all other tasks.
|
|||
|
|
|||
|
Make sure pcre is installed, to use pcregrep.
|
|||
|
|
|||
|
Setup custom xdg-open:
|
|||
|
```
|
|||
|
/usr/local/bin/xdg-open
|
|||
|
```
|
|||
|
```
|
|||
|
#!/bin/bash
|
|||
|
DOMAIN_LIST_FILE=~/'domains.txt'
|
|||
|
OTHER_BROWSER='/usr/bin/chromium-browser'
|
|||
|
BROWSER_OPTIONS='' # Optional, for command line options passed to browser
|
|||
|
XDG_OPEN='/usr/bin/xdg-open'
|
|||
|
DEFAULT_BROWSER='/usr/bin/firefox'
|
|||
|
|
|||
|
if echo "$1" | pcregrep -q '^https?://'; then
|
|||
|
matching=0
|
|||
|
while read domain; do
|
|||
|
if echo "$1" | pcregrep -q "^https?://${domain}"; then
|
|||
|
matching=1
|
|||
|
break
|
|||
|
fi
|
|||
|
done < "$DOMAIN_LIST_FILE"
|
|||
|
|
|||
|
if [[ $matching -eq 1 ]]; then
|
|||
|
"$OTHER_BROWSER" $BROWSER_OPTIONS ${*}
|
|||
|
exit 0
|
|||
|
fi
|
|||
|
|
|||
|
"$DEFAULT_BROWSER" ${*}
|
|||
|
exit 0
|
|||
|
else
|
|||
|
"$XDG_OPEN" ${*}
|
|||
|
fi
|
|||
|
```
|
|||
|
|
|||
|
Configure domains for redirect to Chromium:
|
|||
|
|
|||
|
```
|
|||
|
$HOME/domains.txt
|
|||
|
```
|
|||
|
```
|
|||
|
stackexchange.com
|
|||
|
stackoverflow.com
|
|||
|
superuser.com
|
|||
|
www.youtube.com
|
|||
|
github.com
|
|||
|
```
|
|||
|
Setup xdg-open web as desktop application:
|
|||
|
```
|
|||
|
$HOME/.local/share/applications/xdg-open-web.desktop
|
|||
|
```
|
|||
|
```
|
|||
|
[Desktop Entry]
|
|||
|
Version=1.0
|
|||
|
Name=xdg-open web
|
|||
|
GenericName=Web Browser
|
|||
|
Exec=xdg-open %u
|
|||
|
Terminal=false
|
|||
|
Type=Application
|
|||
|
MimeType=text/html;text/xml;application/xhtml+xml;application/vnd.mozilla.xul+xml;text/mml;x-scheme-handler/http;x-scheme-handler/https;
|
|||
|
StartupNotify=true
|
|||
|
Categories=Network;WebBrowser;
|
|||
|
Keywords=web;browser;internet;
|
|||
|
Actions=new-window;new-private-window;
|
|||
|
```
|
|||
|
```
|
|||
|
$ update-desktop-database $HOME/.local/share/applications/
|
|||
|
```
|
|||
|
Set xdg-open web as default Web application in GNOME settings: Go to GNOME Settings > Details > Default Applications and set Web to xdg-open web
|
|||
|
|
|||
|
|
|||
|
### Custom GNOME sessions
|
|||
|
It is possible to create custom GNOME sessions which use the GNOME session manager but start different sets of components (Openbox with tint2 instead of GNOME Shell for example).
|
|||
|
|
|||
|
Two files are required for a custom GNOME session: a session file in ```/usr/share/gnome-session/sessions/``` which defines the components to be started and a desktop entry in `/usr/share/xsessions` which is read by the display manager. An example session file is provided below:
|
|||
|
```
|
|||
|
/usr/share/gnome-session/sessions/gnome-openbox.session
|
|||
|
```
|
|||
|
```
|
|||
|
[GNOME Session]
|
|||
|
Name=GNOME Openbox
|
|||
|
RequiredComponents=openbox;tint2;gnome-settings-daemon;
|
|||
|
```
|
|||
|
And an example desktop file:
|
|||
|
```
|
|||
|
/usr/share/xsessions/gnome-openbox.desktop
|
|||
|
```
|
|||
|
```
|
|||
|
[Desktop Entry]
|
|||
|
Name=GNOME Openbox
|
|||
|
Exec=gnome-session --session=gnome-openbox
|
|||
|
```
|
|||
|
|
|||
|
|
|||
|
|