Skip to content

Instantly share code, notes, and snippets.

@aleliaert
Last active August 25, 2025 16:54
Show Gist options
  • Select an option

  • Save aleliaert/3b08705fdf2337d1924a63e9a4255712 to your computer and use it in GitHub Desktop.

Select an option

Save aleliaert/3b08705fdf2337d1924a63e9a4255712 to your computer and use it in GitHub Desktop.
Configure i3 window manager on Ubuntu 22 Amazon Workspaces

i3 on Ubuntu 22 Amazon Workspaces

This took some experimentation. At the time of this Gist creation, could not find all the needed clues on the web.

Prep

Is suggested to have and verify SSH access into your Workspace in case of trouble. Otherwise a workspace rebuild might be needed, which takes time and runs the risk of losing data in your root and home volumes that changed since last AWS-initiated backup.

Note one nuance of ssh into a workspace - will need leading domain name prefix such as mydomain\myusername.

Install i3

Below assumes you wwant dmenu

sudo apt-get install i3 dmenu

Configure i3 to start DCV agent launcher

This was the hard part to discover. Without this step, can intermittently get white or black screens of disappointment upon client connecting.

Add this to a valid i3 config at $HOME/.config/i3/config:

exec_always --no-startup-id "/usr/lib/x86_64-linux-gnu/dcv/dcvxdgagentlauncher --log-level=info --session-id=console"

Please refer to i3 docs on getting a valid config. I snatched one from its git repo.

Configure gdm to start i3 session

Per general internet guidance.

First make a backup, to give yourself an easy way to roll back via an SSH session.

sudo cp /var/lib/AccountsService/users/$(whoami) sudo cat /var/lib/AccountsService/users/$(whoami).backup

Then make an edit under [User] to remove any Session= line, and add XSession=i3. Could be cool and use sed but will give you a vi command:

sudo vi /var/lib/AccountsService/users

Resulting file should look like:

[User]
XSession=i3
Icon=/home/YOUR_USERNAME/.face
SystemAccount=false

[InputSource0]
ibus=mozc-jp

[InputSource1]
xkb=us

Reboot and enjoy

sudo reboot

Sleuthing

What you can inspect for sleuthing, or educational value:

  • Process tree when default Gnome3 window manager is running
  • Process tree via ssh into host when i3 is having issues. Example: ps -aux --forest
  • File /etc/xdg/autostart/dcvagentlauncher.desktop and witness Exec command
  • File /var/log/syslog is where i3 output goes via gdm
  • Files under /var/log/dcv can also show you how various agents are running, or not running
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment