How do you run PureOS in text-only or with a different WM?

I’ve always been attracted to a “text-only” Linux workstation, or minimal, tiling window manager like i3wm.

What I’m not sure about, and this is perhaps a basic Linux question, is how to

  1. Run PureOS without booting into GNOME, and, more advanced,
  2. Install an alternate window manager like i3wm and make it the default

I use I3 and love it. It’s been a while, but I believe you only need to “apt install i3”. After that, the i3 option should show up on the login screen as a wm option after login. It took quite some time for me to figure out how to configure the system for gestures and natural scrolling on the librem 15, but by asking a bunch of dumb questions here, I got everything figured out. Many of the differences come from the default gnome environment being wayland and i3 using xorg.

Speaking of wayland, I wonder if anyone can comment on running sway (an i3 workalike for wayland) on PureOS. I notice the sway packages are not available in amber at the moment. I’m not sure I’m comfortable moving my main work laptop to byzantium just to try switching to sway. Is it sway a reasonable option on amber or should I just keep waiting?

1 Like

I’m a long(ish) term i3 user and when I switched to wayland I’ve also switched to sway (i3 clone for wayland). By coincidence sway is also home base for wlroots which is used by purism for their phosh window manager (on librem5 phone).
What I use when I switched to sway is

  • No GDM (session manager) - I simply use tty login and start sway from .bash_profile (conditionally, only on tty1 login shell)
  • seamless migration - just copy over .config/i3wm/config to .config/sway/config (you can keep i3 one, sway will use it when sway/config is noyt found)
  • replace dmenu with bemenu
  • use swayidle for swaylock (auto-lock and dpms off)
if [ "x$WAYLAND_DISPLAY" = "x" -a $(tty) = "/dev/tty1" ]
  export QT_QPA_PLATFORM=wayland
  export SDL_VIDEODRIVER=wayland
  export GTK_THEME=Adwaita:dark
  /usr/bin/gnome-keyring-daemon -sd
  exec sway

mozilla is commented out because… don’t remember, i think my internet banking was not working properly in native wayland mode, may need to try again.

1 Like

You’re right, of course: I just installed i3 from the package manager. I had to do a search, because I assumed it was called i3wm. :joy:

Found this thread in which you commented, too. Will give it a read.

I’m still looking into the basics of “how do I turn this laptop text-only?” (i.e. don’t boot into the desktop environment…)

To (perhaps) answer my own question: Looks like PureOS has systemd, and so the way to tell the system to boot in non-graphical mode is^1:

sudo systemctl set-default

(as opposed to the current default of

Tested: this does, indeed work. Laptop boots to text-only login prompt.

Observation: the systemctl command above just sets a symlink in /lib/systemd/system/, and, if you look in that directory, there are all sorts of interesting .target files in there, including symlinks for the various runlevels. I don’t know enough about using systemd to grok the details, but I reckon you could do other interesting things with this.

Any alternatives, or considerations I’m missing, do let me know. :nerd_face:

yes you can, eg. you can create services for sleep target and have some tasks to be done before entering and after leaving the sleep state. Also you have session (not system) -level services and targets so you can add some services to start in your session or seat either explicitly (as pre-started service) or on-demand (as socket activated service) - eg. those which are usually started by DM/WM

$ systemctl --user list-units '*.service'
  UNIT                                  LOAD   ACTIVE SUB     DESCRIPTION                        
  at-spi-dbus-bus.service               loaded active running Accessibility services bus         
  dbus.service                          loaded active running D-Bus User Message Bus             
  evolution-addressbook-factory.service loaded active running Evolution address book service     
  evolution-calendar-factory.service    loaded active running Evolution calendar service         
  evolution-source-registry.service     loaded active running Evolution source registry          
  gvfs-daemon.service                   loaded active running Virtual filesystem service         
  gvfs-metadata.service                 loaded active running Virtual filesystem metadata service
  pulseaudio.service                    loaded active running Sound Service                      

$ systemctl --user list-units '*.socket'
  UNIT                     LOAD   ACTIVE SUB       DESCRIPTION                                                             
  dbus.socket              loaded active running   D-Bus User Message Bus Socket                                           
  dirmngr.socket           loaded active listening GnuPG network certificate management daemon                             
  gpg-agent-browser.socket loaded active listening GnuPG cryptographic agent and passphrase cache (access for web browsers)
  gpg-agent-extra.socket   loaded active listening GnuPG cryptographic agent and passphrase cache (restricted)             
  gpg-agent-ssh.socket     loaded active listening GnuPG cryptographic agent (ssh-agent emulation)                         
  gpg-agent.socket         loaded active listening GnuPG cryptographic agent and passphrase cache                          
  p11-kit-server.socket    loaded active listening p11-kit server                                                          
  pulseaudio.socket        loaded active running   Sound System                                                            

user-level config is at ~/.config/systemd/user/

$ ls -1 .config/systemd/user/