Sublime Forum

Preferences->Browse Packages does nothing on Pixelbook Linux

#1

I am on a Google Pixelbook (ChromeOS) using their Linux subsystem
uname -a
Linux penguin 4.14.67-07156-gc116f2c8c400 #1 SMP PREEMPT Sun Sep 9 14:28:13 PDT 2018 x86_64 GNU/Linux

I believe they use the Wayland display server protocol.

When I do Preferences->Browse Packages, nothing happens.

0 Likes

#2

What do you expect to happen? I haven’t tried the subsystem yet.

0 Likes

#3

I expect to be able to browse packages.

0 Likes

#4

Yes, but specifically? On traditional desktop OSs, that command opens the OS file browser to the Packages directory. What do you expect to do on ChromeOS? Where is Packages directory located? Is that location accessible to the file browser?

These aren’t trick questions, I just don’t have a Chromebook that supports crostini. It is entirely likely that the Sublime devs don’t, either.

1 Like

#5

I don’t think “on ChromeOS” is a correct way of putting it. I am running a Linux version of Sublime Text. When I do Help->Documentation, the Linux version of Chromium pops up and I am at http://www.sublimetext.com/docs/3/ . So there is a capability to launch another Linux program from within Sublime Text under “Linux on ChromeOS”.

What “OS file browser” would Preferences->Browse Packages be looking for that it can’t find and is not reporting that it can’t find it? Google has an odd way of describing this “crostini” capability, making it seem like any Linux program runs in some isolated situation, separate and disconnected/unreachable from any other Linux program you have installed. But that doesn’t appear to be the case. As far as I can see, running on this Linux subsystem on a ChromeOS PC is identical to as if I was running Sublime text on Ubuntu. You have /bin /boot /dev /etc /home (and /home/username) /lib /lib64 /media /mnt /opt /proc /root /run /sbin /srv /tmp /usr /var . But you don’t get all the same programs pre-installed so Sublime Text may be expecting a certain program, not finding it ,but also not reporting that it wasn’t found, that is, doing a “naive launch”.

0 Likes

#6

The “Browse Packages…” menu item is defined as follows:

{
    "command": "open_dir",
    "args": {"dir": "$packages"},
    "caption": "Browse Packages…",
    "mnemonic": "B"
},

The two obvious points of potential failure are the open_dir command and the $packages variable. When you run sublime.packages_path() in the Sublime terminal, what is the output? Does window.run_command("open_dir", {"dir": "/"}) do anything? If not, can you get it to work with some dir argument?

0 Likes

#7

FThanks for the info about the OS file browser. I installed the XFE file manager and now I do get an action from Preferences->Browse Packages. Although for some reason it is launching Audacious (an audio player), not XFE.

sublime.packages_path()
gives:
‘/home/“google username”/.config/sublime-text-3/Packages’


window.run_command(“open_dir”, {“dir”: “/”})

brings up Audacious


I notice that the Preferences-> Package and other menu options, bring up a too small window, probably related to Wayland acting differently than the normal X stuff.

0 Likes

#8

I installed Nautilus and now Preferences->Browse Packages brings up Nautilus and it is looking at the $HOME/.config/sublime-text-3/Packages directory.

Thanks for the help!

1 Like

#9

Just for others that run into a similar problem (on ChromeOS or not, because I had a similar problem on my Linux desktop), the issue of something like Audacious or something else opening when you pick this menu item from Sublime’s menu is caused by the fact that the app’s desktop file indicates that it handles the inode/directory filetype.

You can confirm if something is awry by using xdg-mime query default inode/directory to see what application is used by default to open folders, to see if this is the issue. If you don’t see something that is supposed to open folders (e.g. Nautilus or Thunar), this is the problem.

If so, you can use xdg-mime default SOMETHING inode/directory to change the default application (replace the SOMETHING as appropriate).

Note that the above assumes that whatever window manager you use doesn’t have a more direct configuration method for this.

3 Likes