Twm: Difference between revisions

From Alpine Linux
(Created a page for twm window manager)
 
m (Lowercase title. Move things around a bit. Simplify directions a bit. Use cat and pkg templates. Trivial grammar improvements.)
Line 1: Line 1:
{{DISPLAYTITLE:twm}}
[[File:VirtualBox Alpine with twm.png|thumb|alt=A depiction of Alpine Linux interface with twm window manager|A depiction of Alpine Linux interface with twm window manager]]
[[File:VirtualBox Alpine with twm.png|thumb|alt=A depiction of Alpine Linux interface with twm window manager|A depiction of Alpine Linux interface with twm window manager]]


twm (Tab Window Manager) is the standard window manager for the X Window System since version X11R4.
twm (Tab Window Manager) is the standard window manager for the X Window System since version X11R4.
== Prerequisites ==
* [[Installation|Install]] Alpine Linux
* [[Setting_up_a_new_user#Creating_a_new_user|Create a user account]] (optional but recommended)
* [[Repositories#Enabling_the_community_repository|Enable the Community repository]]
* [[Alpine_setup_scripts#setup-xorg-base|Install Xorg]]


= Installation =
= Installation =
1. Run
{{Cmd|# setup-xorg-base}}
2. Type
{{Cmd|# cd}}
to go to home directory.
In home directory create a file named ".xinitrc":
In home directory create a file named ".xinitrc":
{{Cmd|# vi .xinitrc}}
{{Cmd|vi ~/.xinitrc}}
Or, if you prefer nano text editor
Or, if you prefer nano text editor
{{Cmd|# nano .xinitrc}}
{{Cmd|nano ~/.xinitrc}}


3. Write to file:
Write to file:
{{Cmd|exec twm}}
{{cat|~/.xinitrc|exec twm}}
Save the file.
Save the file.


4. Install twm
Install twm
{{Cmd|# apk add twm}}
{{Cmd|# apk add {{pkg|twm|arch=}}}}


You will also need xterm to open apps:
If doing no further configuration, you will also need xterm to open apps:
{{Cmd|# apk add xterm}}
{{Cmd|# apk add {{pkg|xterm|arch=}}}}


5. Start the X window manager
Start the X window manager
{{Cmd|# startx}}
{{Cmd|startx}}


You will be greeted with a black screen. Hold left mouse button and select "XTerm". Type in a program name to launch it.
You will be greeted with a black screen. Hold left mouse button and select "XTerm". Type in a program name to launch it.


= Keyboard layout =
= Keyboard layout =
Your keyboard layout will be back to US default. If you use an alternative layout (e.g. Colemak), that might be a problem.
The keyboard layout defaults to US qwerty. If you use an alternative layout (e.g. Colemak) you can install setxkbmap:
 
{{Cmd|# apk add {{pkg|setxkbmap|arch=}}}}
To switch to another layout first install setxkbmap:
{{Cmd|# apk add setxkbmap}}


Then switch to another layout (example for colemak):
Then switch to another layout (example for colemak):
{{Cmd|# setxkbmap us -variant colemak}}
{{Cmd|setxkbmap us -variant colemak}}

Revision as of 03:20, 15 January 2024

A depiction of Alpine Linux interface with twm window manager
A depiction of Alpine Linux interface with twm window manager

twm (Tab Window Manager) is the standard window manager for the X Window System since version X11R4.

Prerequisites

Installation

In home directory create a file named ".xinitrc":

vi ~/.xinitrc

Or, if you prefer nano text editor

nano ~/.xinitrc

Write to file:

Contents of ~/.xinitrc

exec twm

Save the file.

Install twm

# apk add twm

If doing no further configuration, you will also need xterm to open apps:

# apk add xterm

Start the X window manager

startx

You will be greeted with a black screen. Hold left mouse button and select "XTerm". Type in a program name to launch it.

Keyboard layout

The keyboard layout defaults to US qwerty. If you use an alternative layout (e.g. Colemak) you can install setxkbmap:

# apk add setxkbmap

Then switch to another layout (example for colemak):

setxkbmap us -variant colemak