Error with output setup in /home/user/.config/sway/config, possible solutions welcome

I’ve been running Sway happily for a few months, and while I can back myself out of most issues I would like a second opinion if this is solvable or requires a fresh install

I was trying to get HDMI screen-sharing working using the output functionality in /home/user/.config/sway/config, following the directions of Sway Edition - General Conversation! - #122 by Elloquin? but more verbose as res/pos didn’t seem to work compared to resolution/position

Unfortunately I pasted the entire output name instead of just specifying the device(port?), leaving an extra ‘Samsung Electric Company SAMSUNG 0x00000100’ in the config file where it didn’t belong.
This means I can’t access any functionality beyond that point in the file (very early on, only mod+hjkl and arrows appear to work) which is an issue since I’ve no shortcuts on the desktop, no way to open terminal, and no way to access the config file and restore functionality. (mod+return, mod+o, mod+d: all disabled by my slip up)

Is there any method/exploit the Sway masters can think of to open a terminal or file editor with the little functionality provided. The only boxes that come up include “toggle details”, “reload sway” (which refreshes the WM into the exact same issue), “exit sway” (which kicks me back to login where if I login I return to the empty desktop). I still have the USB used to install Endeavour if that has some debugging or partition editor tool.

No real screenshot as I can’t access grimshot but here’s what I can give visually

Ctrl+alt+f3 → log in → nano /path/to/your/config - correct the error, save → reload/log out or reboot.


Thank you, this will at least let me backup everything. I must’ve created more than 1 problem for myself as fixing the config file didn’t restore the sway shortcuts or waybar, and
swaymsg -t get_outputs
Now returns
[swaymsg/main.c.417] Unable to retrieve socket path
so I have something else to work on.
Either way I can access/backup data if a fresh install is needed, thanks for the help. Didn’t know about virtual terminals


Perhaps you could grab the default config and replace? Never used sway, but should be straight forward.


1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.