AwesomeWM: Difference between revisions

From Alpine Linux
(Added the "Enable "alpine/v3.7/community" Repository" section, added login as root to the "install D-Bus" section.)
No edit summary
Line 2: Line 2:
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 Alpine is up and running, do the initial setup.
When Alpine is up and running, do the initial setup.
{{Cmd|setup-alpine}}
{{Cmd|# setup-alpine}}


= Enable "alpine/v3.7/community" Repository =
= Enable Community Repository =
In order to install the awesome package (see "Install packages" below), you need to enable the alpine/v3.7/community repository:
In order to install the awesome package (see "Install packages" below), you need to enable the community repository for your version. Uncomment the {{ic|http://<url>/alpine/<version>/community}} line in {{ic|/etc/apk/repositories}}. For example:
{{Cmd|vi /etc/apk/repositories}}
 
Scroll down and delete the ''#'' symbol from the beginning of this line:
{{cat|/etc/apk/repositories|<nowiki># /etc/apk/repositories
{{Cmd|<nowiki>#http://dl-cdn.alpinelinux.org/alpine/v3.7/community</nowiki>}}
#/media/sdb/apks
Save and quit (press ''esc'', then type '':wq'', press ''enter'').
http://mirror.csclub.uwaterloo.ca/alpine/v3.8/main
http://mirror.csclub.uwaterloo.ca/alpine/v3.8/community
#http://mirror.csclub.uwaterloo.ca/alpine/v3.8/testing
</nowiki>
}}


= Install packages =
= Install packages =
Install awesome, feh, aterm as basic desktop system.<BR>
Install awesome, feh, aterm as basic desktop system.<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 awesome feh aterm}}
{{Cmd|# apk add awesome feh aterm}}
If aterm is not recognized by apk (Alpinelinux 3.2.x or above) instead of it you can install lxterminal.<BR>
If aterm is not recognized by apk (Alpinelinux 3.2.x or above) instead of it you can install lxterminal.<BR>
On the same version of Alpinelinux (3.2.x or above) you have to install the package lua otherwise awesome will not start
On the same version of Alpinelinux (3.2.x or above) you have to install the package lua otherwise awesome will not start
{{Cmd|apk add lua}}
{{Cmd|# apk add lua}}
Add other apps on need, eg. firefox, gnumeric, xchat, gimp, pidgin, geany, vim, etc.<BR>
Add other apps on need, eg. firefox, gnumeric, xchat, gimp, pidgin, geany, vim, etc.<BR>
For Alpinelinux 2.6.x add additional pkgs
For Alpinelinux 2.6.x add additional pkgs
{{Cmd|apk add cairo-gobject pango}}
{{Cmd|# apk add cairo-gobject pango}}


== Optional packages ==
== Optional packages ==
Line 26: Line 30:
You <u>might</u> also want to install a package suitable for your video chipset and input devices.<BR>
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>
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}}
{{Cmd|# apk add xf86-video-sis}}
and / or  
and / or  
{{Cmd|apk add xf86-input-synaptics}}
{{Cmd|# apk add xf86-input-synaptics}}


Run 'apk search xf86-video*' to see available xf86-video packages.<BR>
Run 'apk search xf86-video*' to see available xf86-video packages.<BR>
Line 35: Line 39:
=== acpid ===
=== acpid ===
If you installed your Alpine Linux as a VirtualBox or VMWare guest you might find it handy to be able send ACPI shutdown.<BR>
If you installed your Alpine Linux as a VirtualBox or VMWare guest you might find it handy to be able send ACPI shutdown.<BR>
{{Cmd|rc-update add acpid}}
{{Cmd|# rc-update add acpid}}


= Configure xorg-server =
= Configure xorg-server =
On most systems, xorg should be able to autodetect all devices. However you can still configure xorg-server by hand by launching:
On most systems, xorg should be able to autodetect all devices. However you can still configure xorg-server by hand by launching:
{{Cmd|setup-xorg-base}}
{{Cmd|# setup-xorg-base}}


= Create user accounts =
= Create user accounts =
Create a normal user account.
Create a normal user account.
{{Cmd|adduser ncopa}}
{{Cmd|# adduser ncopa}}


Optionally, give that user sudo permissions in /etc/sudoers. When doing so, it is important to use the command: {{Cmd|visudo}} This ensures that only one user is changing the file at any given time.  Visudo has two modes: Command mode and Insert mode.  To edit the file, use the arrows to navigate to the appropriate line and enter Insert mode by pressing the 'i' key.  To save and exit, enter Command mode by pressing the 'Esc' key, then ':w' + 'enter' to save, and finally ':q' + 'enter' to quit.
Optionally, give that user sudo permissions in /etc/sudoers. When doing so, it is important to use the command: {{Cmd|# visudo}} This ensures that only one user is changing the file at any given time.  Visudo has two modes: Command mode and Insert mode.  To edit the file, use the arrows to navigate to the appropriate line and enter Insert mode by pressing the 'i' key.  To save and exit, enter Command mode by pressing the 'Esc' key, then ':w' + 'enter' to save, and finally ':q' + 'enter' to quit.


Logout from root and login into new created account.
Logout from root and login into new created account.


= Start your desktop =
= Start your desktop =
{{Cmd|echo 'awesome' >> /home/<newuser>/.xinitrc}}
{{Cmd|# echo 'awesome' >> /home/<newuser>/.xinitrc}}
{{Cmd|mkdir /home/<newuser>/.config}}
{{Cmd|# mkdir /home/<newuser>/.config}}
{{Cmd|cp -r /etc/xdg/awesome  /home/<newuser>/.config}}
{{Cmd|# cp -r /etc/xdg/awesome  /home/<newuser>/.config}}
{{Cmd|vi /home/<newuser>/.config/awesome/rc.lua}}
{{Cmd|# vi /home/<newuser>/.config/awesome/rc.lua}}
Replace instances of xterm with aterm or (if 3.2.x or above use lxterminal instead)
Replace instances of xterm with aterm or (if 3.2.x or above use lxterminal instead)


Start awesome.
Start awesome.
{{Cmd|startx}}
{{Cmd|# startx}}


= Troubleshooting =
= Troubleshooting =
Line 63: Line 67:
D-Bus problems:
D-Bus problems:


{{Cmd|D-Bus library appears to be incorrectly set up; failed to read machine uuid: Failed to open "/var/lib/dbus/machine-id": No such file or directory}}
{{Cmd|# D-Bus library appears to be incorrectly set up; failed to read machine uuid: Failed to open "/var/lib/dbus/machine-id": No such file or directory}}


If startx fails and returns an error about D-Bus failed to read machine uuid, as shown above, proceed as follow:
If startx fails and returns an error about D-Bus failed to read machine uuid, as shown above, proceed as follow:


Install dbus from apk (you must be logged in as root, as for the step below)
Install dbus from apk (you must be logged in as root, as for the step below)
{{Cmd|apk add dbus}}
{{Cmd|# apk add dbus}}


Login or su to root account then launch the follow command (Note: sudo is not working for this step):
Login or su to root account then launch the follow command (Note: sudo is not working for this step):
{{Cmd|dbus-uuidgen > /var/lib/dbus/machine-id}}
{{Cmd|# dbus-uuidgen > /var/lib/dbus/machine-id}}


Now if startx is launched it should load correctly the desktop
Now if startx is launched it should load correctly the desktop

Revision as of 21:17, 7 December 2018

Initial setup

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

# setup-alpine

Enable Community Repository

In order to install the awesome package (see "Install packages" below), you need to enable the community repository for your version. Uncomment the http://<url>/alpine/<version>/community line in /etc/apk/repositories. For example:

Contents of /etc/apk/repositories

# /etc/apk/repositories #/media/sdb/apks http://mirror.csclub.uwaterloo.ca/alpine/v3.8/main http://mirror.csclub.uwaterloo.ca/alpine/v3.8/community #http://mirror.csclub.uwaterloo.ca/alpine/v3.8/testing

Install packages

Install awesome, feh, aterm as basic desktop system.
This might take a few minutes depending on your network speed.

# apk add awesome feh aterm

If aterm is not recognized by apk (Alpinelinux 3.2.x or above) instead of it you can install lxterminal.
On the same version of Alpinelinux (3.2.x or above) you have to install the package lua otherwise awesome will not start

# apk add lua

Add other apps on need, eg. firefox, gnumeric, xchat, gimp, pidgin, geany, vim, etc.
For Alpinelinux 2.6.x add additional pkgs

# apk add cairo-gobject pango

Optional packages

Video and Input packages

You might also want to install a package suitable for your video chipset and input devices.
For example, if you have an Sis video chipset install 'xf86-video-sis', for Intel video chipset install 'xf86-video-intel'.

# apk add xf86-video-sis

and / or

# apk add xf86-input-synaptics

Run 'apk search xf86-video*' to see available xf86-video packages.
Run 'apk search xf86-input*' to see available xf86-input packages.

acpid

If you installed your Alpine Linux as a VirtualBox or VMWare guest you might find it handy to be able send ACPI shutdown.

# rc-update add acpid

Configure xorg-server

On most systems, xorg should be able to autodetect all devices. However you can still configure xorg-server by hand by launching:

# setup-xorg-base

Create user accounts

Create a normal user account.

# adduser ncopa

Optionally, give that user sudo permissions in /etc/sudoers. When doing so, it is important to use the command:

# visudo

This ensures that only one user is changing the file at any given time. Visudo has two modes: Command mode and Insert mode. To edit the file, use the arrows to navigate to the appropriate line and enter Insert mode by pressing the 'i' key. To save and exit, enter Command mode by pressing the 'Esc' key, then ':w' + 'enter' to save, and finally ':q' + 'enter' to quit.

Logout from root and login into new created account.

Start your desktop

# echo 'awesome' >> /home/<newuser>/.xinitrc

# mkdir /home/<newuser>/.config

# cp -r /etc/xdg/awesome /home/<newuser>/.config

# vi /home/<newuser>/.config/awesome/rc.lua

Replace instances of xterm with aterm or (if 3.2.x or above use lxterminal instead)

Start awesome.

# startx

Troubleshooting

D-Bus problems:

# D-Bus library appears to be incorrectly set up; failed to read machine uuid: Failed to open "/var/lib/dbus/machine-id": No such file or directory

If startx fails and returns an error about D-Bus failed to read machine uuid, as shown above, proceed as follow:

Install dbus from apk (you must be logged in as root, as for the step below)

# apk add dbus

Login or su to root account then launch the follow command (Note: sudo is not working for this step):

# dbus-uuidgen > /var/lib/dbus/machine-id

Now if startx is launched it should load correctly the desktop

Screenshot

awesome-01.png