Difference between revisions of "Gnome Setup"

From Alpine Linux
Jump to: navigation, search
(Add a link to community repo)
(Add the mesa-dri-swrast package)
 
(5 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{Draft|It doesn't produce the result expected YET}}
 
 
= Initial setup =
 
= Initial setup =
 
Start by booting up Alpine (see [[Installation|these]] instructions on how to do that)<BR>
 
Start by booting up Alpine (see [[Installation|these]] instructions on how to do that)<BR>
 
When you Alpine is up and running, do the initial setup.
 
When you Alpine is up and running, do the initial setup.
{{Cmd|setup-alpine}}
+
{{Cmd|# setup-alpine}}
{{Cmd|setup-xorg-base}}
+
{{Cmd|# setup-xorg-base}}
  
= Install packages =
+
 
Install basic desktop system and gnome packages. For Alpine Linux 3.3 and later, these packages are in the [[Enable_Community_Repository|community]] repo.<BR>
+
= Enable Community Repository =
 +
[[Enable Community Repository|How to Enable the Community Repository]]
 +
 
 +
= Installing packages =
 +
Install basic desktop system and gnome packages. As of right now, these are in the testing repo.<BR>
 
This might take a few minutes depending on your network speed.  
 
This might take a few minutes depending on your network speed.  
{{Cmd|apk add alpine-desktop gnome-base lxdm}}
+
{{Cmd|# apk add gnome}}
 +
<BR>
 +
 
 +
If you want to you can also install additional GNOME apps for a more complete GNOME experience with:<BR>
 +
{{Cmd|# apk add gnome-apps}}
 
<BR>
 
<BR>
Lxdm is a display manager.  You can use a different one such as slim by replacing {{Cmd|lxdm}} with {{Cmd|slim}}
 
  
== Optional packages ==
+
== Setting up udev ==
=== Video and Input packages ===
+
You'll have to enable udev in order for GNOME to function properly.
You <u>might</u> also want to install a package suitable for your video chipset and input devices.<BR>
 
For example, if you have an Sis video chipset install 'xf86-video-sis', for Intel video chipset install 'xf86-video-intel'.<BR>
 
{{Cmd|apk add xf86-video-sis}}
 
and / or
 
{{Cmd|apk add xf86-input-synaptics}}
 
  
If you are running a virtual machine (i.e in VirtualBox or VMware) you probably also want these video drivers:
+
{{Cmd|# apk add udev }}
{{Cmd|apk add xf86-video-vmware}}
+
{{Cmd|# rc-update add udev }}
 +
{{Cmd|# rc-update add udev-trigger }}
 +
{{Cmd|# rc-update add udev-settle }}
  
Run 'apk search xf86-video*' to see available xf86-video packages.<BR>
+
== Setting up Xorg ==
Run 'apk search xf86-input*' to see available xf86-input packages.<BR>
+
Even when using GNOME Wayland you'll still need a setup Xorg for XWayland.
  
=== acpid ===
+
=== Video packages ===
If you installed your Alpine Linux as a VirtualBox or VMWare guest you might find it handy be able send ACPI shutdown.<BR>
 
{{Cmd|rc-update add acpid}}
 
  
= Configure xorg-server (optional) =
+
{{cmd|$ apk search xf86-video}}
You can configure xorg-server and make your modifications
 
{{Cmd|Xorg -configure}}
 
This will result in `/root/xorg.conf.new`. You can modify this file to fit your needs.<BR>
 
(When finished modifying and testing the above configuration file, move it to `/etc/X11/xorg.conf` for normal usage.)
 
  
== udev ==
+
Then install the driver matching to your card, e.g. if you have an Intel iGPU:
Adding udev might help you with some finicky hardware like touchpads.
 
{{Cmd|apk add udev
 
/etc/init.d/udev start && /etc/init.d/udev-postmount start
 
rc-update add udev sysinit
 
rc-update add udev-postmount default
 
}}
 
Adding evdev might also be necessary, for example if the keyboard doesn't work in X...
 
{{Cmd|apk add xf86-input-evdev}}
 
  
= Create user accounts =
+
{{cmd|# apk add xf86-video-intel}}
Create a normal user account.
 
{{Cmd|adduser ncopa}}
 
  
Optionally, give that user sudo permissions in /etc/sudoers.
+
Also add the mesa-dri-swrast package:
  
= Start your desktop =
+
{{cmd|# apk add mesa-dri-swrast}}
Start lxdm and log in with your new user.
 
{{Cmd|rc-service lxdm start}}
 
  
Once you have verified that it actually works you can make lxdm start up at boot:
+
=== Input packages ===
{{Cmd|rc-update add lxdm}}
 
  
Or if using slim:
+
Usually libinput is the best choice, as it's integrated best with GNOME and offers advanced functionality (e.g. palm rejection for touchpads).
  
{{Cmd|rc-service slim start}}
+
{{cmd|# apk add xf86-input-libinput}}
  
and once confirmed as working enable it at boot:
+
= Starting your desktop =
{{Cmd|rc-update add slim}}
+
Start GDM and login with your user. You need a user other than root for this to succeed, since GDM will refuse starting if no user accounts (meaning accounts with a UID >= 1000) are available.
 +
{{Cmd|rc-service gdm start}}
 +
 
 +
Once you have verified that it actually works you can make gdm start up at boot:
 +
{{Cmd|rc-update add gdm}}
 +
 
 +
= Enabling terminal apps =
 +
If you want to use the gnome-terminal/other terminal applications you will need to install bash. If you want a typical bash setup also enable bash completion:
 +
{{cmd|# apk add bash}}
 +
{{cmd|# apk add bash-completion}}
  
 
= Troubleshooting =
 
= Troubleshooting =
If you are unable to login, check /var/log/lxdm.log, there may be output there from X to indicate failed modules, etc.
+
If you are unable to login, check /var/log/gdm/greeter.log, there may be output there from X to indicate failed modules, etc.
<BR>
 
If you are unable to login, or you see an error "Failed to execute login command", you should check ~/.xinitrc with your preferred text editor (vi, nano, etc) and ensure that it is set to boot into gnome.  To do this, the 'exec' line (usually the last line in the file) should read "exec gnome-session".
 
If ~/.xinitrc does not exist, create it and add the exec line.  this command will do it:
 
  
{{Cmd|touch ~/.xinitrc && echo "exec gnome-session" >> ~/.xinitrc}}  
+
If logging in from GDM returns to logging screen, try {{cmd|# apk add bash}} (bug report: #10953 sorry cannot link yet)
  
 
[[Category:Desktop]]
 
[[Category:Desktop]]

Latest revision as of 15:58, 20 July 2020

Initial setup

Start by booting up Alpine (see these instructions on how to do that)
When you Alpine is up and running, do the initial setup.

# setup-alpine

# setup-xorg-base


Enable Community Repository

How to Enable the Community Repository

Installing packages

Install basic desktop system and gnome packages. As of right now, these are in the testing repo.
This might take a few minutes depending on your network speed.

# apk add gnome


If you want to you can also install additional GNOME apps for a more complete GNOME experience with:

# apk add gnome-apps


Setting up udev

You'll have to enable udev in order for GNOME to function properly.

# apk add udev

# rc-update add udev

# rc-update add udev-trigger

# rc-update add udev-settle

Setting up Xorg

Even when using GNOME Wayland you'll still need a setup Xorg for XWayland.

Video packages

$ apk search xf86-video

Then install the driver matching to your card, e.g. if you have an Intel iGPU:

# apk add xf86-video-intel

Also add the mesa-dri-swrast package:

# apk add mesa-dri-swrast

Input packages

Usually libinput is the best choice, as it's integrated best with GNOME and offers advanced functionality (e.g. palm rejection for touchpads).

# apk add xf86-input-libinput

Starting your desktop

Start GDM and login with your user. You need a user other than root for this to succeed, since GDM will refuse starting if no user accounts (meaning accounts with a UID >= 1000) are available.

rc-service gdm start

Once you have verified that it actually works you can make gdm start up at boot:

rc-update add gdm

Enabling terminal apps

If you want to use the gnome-terminal/other terminal applications you will need to install bash. If you want a typical bash setup also enable bash completion:

# apk add bash

# apk add bash-completion

Troubleshooting

If you are unable to login, check /var/log/gdm/greeter.log, there may be output there from X to indicate failed modules, etc.

If logging in from GDM returns to logging screen, try

# apk add bash

(bug report: #10953 sorry cannot link yet)