3

My machine boots into command-line and then I run the following command to open a display with TWM window manager on it:

$ xinit /usr/local/bin/twm

On TWM, this is how I run apps: I left-click anywhere on the black screen and a menu shows up. Then I select xterm and on xterm command-line, I run my app for example:

$ opera

The problem is that for every app, I need a xterm to be opened first. I wonder if there is any other way by which I can open my apps without having to open xterm. Thanks.


I ended up compiling/installing version 2.6.7 of fvwm which is also suggested here. It is a cool window manager with many features.

Megidd
  • 1,519
  • 3
  • 32
  • 44
  • 2
    twm's [manual page](https://www.x.org/archive/X11R6.8.1/doc/twm.1.html) explains menus, and it comes with samples... – Thomas Dickey Jun 03 '17 at 01:34
  • @ThomasDickey Right, I think I can add options to menus with statements like this: `"Opera" f.exec "exec opera &"` – Megidd Jun 03 '17 at 01:54
  • 1
    Twm is one of the oldest window managers. Fvwm was one of the most powerful window managers in the 1990s. Today fvwm is still a contender but [there are many](https://en.wikipedia.org/wiki/Comparison_of_X_window_managers) [many](https://wiki.archlinux.org/index.php/window_manager) [many](http://www.xwinman.org/others.php) [more](https://www.gilesorr.com/wm/table.html). – Gilles 'SO- stop being evil' Jun 03 '17 at 22:20
  • @Gilles It's a whole lot of window managers, I'm curious which one would you recommend on such a [machine](http://www.dell.com/downloads/global/products/latit/en/spec_latit_d820_en.pdf) from 2005 – Megidd Jun 04 '17 at 10:23

1 Answers1

4

Define a menu in your .twmrc, like:

Menu "MyMenu"
{
    "Opera" f.exec "Opera"
}

Then bind it to your left mouse button instead of the default one:

Button1 = : root : f.menu "MyMenu"

Look at TWM(1) to see how to configure TWM according to you needs. You may also want to see examples of configuration at xwinman.org.

TWM lacks the feature of generating dynamic menus, so you'll need to define a menu for every set of apps you want to be accessible that way, or you can use the xdgmenumaker utility.

user230253
  • 446
  • 2
  • 6
  • I ended up compiling/installing version 2.6.7 of [fvwm](https://github.com/fvwmorg/fvwm) which is cool. It supports full-screen feature, and many more. – Megidd Jun 03 '17 at 03:18