Sublime Forum

Running from command line always opens new window

#1

Whenever I run subl from the command line, it always opens a new window, even if I have a window open in a folder containing said file. There are a few threads here on similar issues (Prevent new instances of sublime from opening, Opening file from Linux cmd line always opens new window) but none of the solutions work for me (dbus-x11 is already installed).

This does appear to be related to dbus, as running “qdbus com.sublimetext.three” returns “Service ‘com.sublimetext.three’ does not exist.” if the window was opened from the command line. However, when launching from the desktop icon, I see

/
/cmdline

My user preferences are

{
	"font_size": 10,
	"hot_exit": false,
	"ignored_packages":
	[
		"Vintage"
	],
	"remember_open_files": false,
	"translate_tabs_to_spaces": true,
	"word_separators": "./\\()\"':,.;<>~!@#$%^&*|+=[]{}`~?",
    "open_files_in_new_window": false
}

My operating system is pop os 19.04. I did not have this issue previously on a different Ubuntu 18.04 machine. Any help would be greatly appreciated.

0 Likes

#2

I can only assume it’s distribution related, as you said it worked fine on ubuntu 18.04. Sublime Text 4 no longer uses dbus for the command line, instead using named pipes, which should be more reliable.

0 Likes

#3

Yes, it appears to have been solved by updating to PopOS 20.04 (just released). Thanks for the help.

0 Likes