Jump to content

Native external script editor on a Windows Viewer running on Linux with wine.


Coffee Pancake
 Share

You are about to reply to a thread that has been inactive for 579 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

Ok .. So this might be useful to 1 other person ...

If you're running a Windows SL viewer on Linux with wine (which totally works!) here is the hackery required to use a linux native external script editor.

  • Install your choice of SL viewer on Wine as normal.
  • Navigate to the folder into which the viewer was installed (in my case "~/.wine/drive_c/Program Files/CatznipBeta") and create a file called "wine_helper_external_script_editor.sh" with the following contents and chmod +x.
 #!/bin/bash
echo LSL_EDITOR=$LSL_EDITOR
echo LSL_FILE=$LSL_FILE
"$LSL_EDITOR" "$LSL_FILE"
  • Set the external editor debug setting to the following
L:\bin\bash -c "LSL_EDITOR=/usr/bin/kate LSL_FILE=$(echo '/home/coffea/.wine/drive_c')$(echo -e '%s' | cut -c3- | sed 's/\\/\//g' ) ./wine_helper_external_script_editor.sh"
  • Change the drive letter L to whatever drive wine has mapped to system root.
  • Change LSL_EDITOR to whatever you like for an editor
  • Edit '/home/coffea/.wine/drive_c' so it points to the root of the wine "C" drive with the viewer. Full path only ~ will not work !

There is some logic in the viewer that helpfully mangles the contents of this debug setting before it's executed, this is the only way I could make it work without editing the viewer code. I spent better part of a day going down a bash rabbit hole trying to come up with something the viewer could execute without needing an external helper script .. and failed.

This isn't guaranteed to work with every editor .. when I try a Linux native VSCode, it core dumps even though it all works from a terminal.

 

OrIJ7Z6.png

Repost on Reddit - https://www.reddit.com/r/secondlife/comments/10zxd1h/native_external_script_editor_on_a_windows_viewer/

 

Edited by Coffee Pancake
  • Thanks 3
Link to comment
Share on other sites

  • Coffee Pancake changed the title to Native external script editor on a Windows Viewer running on Linux with wine.
You are about to reply to a thread that has been inactive for 579 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...