Sublime Forum

Prevent new instances of sublime from opening

#1

I’ve been using Sublime Text 2/3 for a while now, but there’s one thing that still bugs me that perhaps you all can help me with.

In Debian 6.0 - Whenever I open a file (.txt, .sql, etc) using Sublime Text, Linux opens a new instance of Sublime Text with all of the tabs from my previous session included. Is there a way to force Sublime Text to open new files in the existing Sublime Text window? This may be linux configuration and not a Sublime config, but I’m not savvy enough in Linux to know.

Can anyone help?

0 Likes

#2

How can I disable “Image Preview” function?

0 Likes

#3

I just want to use the hex view function, and operating system always supports image preview function. How can I disable “Image Preview” function?

0 Likes

#4

I have the same but.

To add more information: Something a new instance of sublime text is opened, sometimes it’s the same.
I always boot ST from CLI, with “subl .”. And here, sometime it open just one new windows (this is what I want).
And sometimes it opened 3 + 1 windows. 3 == the number of actual open windows. 1 == the new folder.
So I end with 7 ST3. :frowning:

0 Likes

#5

I had a very similar issue on Max OSX. I would always open sublime by clicking the icon in my dock. Then whenever I would open a file by typing subl file.txt from the command line, or if git would automatically open a file, or if I clicked a file in Finder and it opened in sublime, a new instance of sublime would appear in my dock with all the same windows and tabs as the one I already had open.

I finally figured out that the issue was that I had one copy of sublime in my downloads folder and one in my applications folder. The icon in my dock was linked to the copy in my downloads folder, but the one in applications was the default. So whenever something else tried to open sublime, it would open the one in my applications folders.

I fixed it by removing sublime from my dock, opening the version in my applications folder, and then keeping that one in my dock.

1 Like

#6

I also get the same issue. Could you give me any suggestions ?

0 Likes

#7

I’m also having this issue. It seems to be specific to Debian (I’m on Debian 9), as my Fedora 23 and Ubuntu 16.04 installations (on other machines) appear to function correctly.

I’m not exactly sure how Sublime attempts to opens new files in an existing process, but maybe some package is missing from Debian or some linux setting is configured differently on Debian. Could anyone shed some light on this?

0 Likes

#8

I presume it’s related to dbus – in the Sublime console logs I see “Unable to connect to dbus” at the very top. I’ll see if I can figure out why. I already have dbus running.

ventrue@haven-unleashed:~$ sudo service dbus status
● dbus.service - D-Bus System Message Bus
   Loaded: loaded (/lib/systemd/system/dbus.service; static; vendor preset: enabled)
   Active: active (running) since Sat 2018-04-21 11:17:22 PDT; 7min ago
     Docs: man:dbus-daemon(1)
 Main PID: 610 (dbus-daemon)
    Tasks: 1 (limit: 11673)
   CGroup: /system.slice/dbus.service
           └─610 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation
0 Likes

#9

Okay, the solution’s pretty straightforward. Install dbus and dbus-x11 onto your machine. You’ll need to restart your machine if dbus wasn’t installed/active ahead of time.

0 Likes

Running from command line always opens new window