# Ubuntu – Setting LANG for SublimeText from Unity

12.04launcherlocaleunity

I am trying to run SublimeText with the package control addon and each time I open it using the Unity launcher I receive this error.

So far I have tried following the instructions provided by Ubuntu Community Help, setting it in all of the mentioned places and then restarting has not fixed the problem.

I've also followed the steps found on the package control github page to no avail.

This does work when I am launching SublimeText from the command line so I am guessing it is a Unity specific problem, does anyone know how to set LANG correctly when launching SublimeText from Unity?

I installed using the 64-bit SublimeText3 .deb found here, http://c758482.r82.cf2.rackcdn.com/sublime-text_build-3059_amd64.deb

Package Control was installed using the simple method found here, https://sublime.wbond.net/installation

• I installed sublimetext using the ppa method and Package control with the "simple method" described here, it works out of the box with Ubuntu 13.10 (Unity).

To reproduce your problem I tried to force LANG-C to start sublimetext by modifying the .desktop file. I think you could try the same tweak to start it by this time forcing LANG=en_US.UTF-8:

sudo gedit /usr/share/applications/sublime-text.desktop


And copy the following lines into the file:

[Desktop Entry]
Version=1.0
Type=Application
Name=Sublime Text
GenericName=Text Editor
Comment=Sophisticated text editor for code, markup and prose
Exec=bash -c "LANG=en_US.UTF-8 /opt/sublime_text/sublime_text %F"
Terminal=false
MimeType=text/plain;
Icon=sublime-text
Categories=TextEditor;Development;Utility;
StartupNotify=true
Actions=Window;Document;

X-Desktop-File-Install-Version=0.21

[Desktop Action Window]
Name=New Window
Exec=bash -c "LANG=en_US.UTF-8 /opt/sublime_text/sublime_text -n"
OnlyShowIn=Unity;

[Desktop Action Document]
Name=New File
Exec=bash -c "LANG=en_US.UTF-8 /opt/sublime_text/sublime_text --command new_file"
OnlyShowIn=Unity;