Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions app/src/lib/editors/linux.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,31 +18,31 @@ interface ILinuxExternalEditor {
const editors: ILinuxExternalEditor[] = [
{
name: 'Atom',
paths: ['/snap/bin/atom', '/usr/bin/atom'],
paths: ['/snap/bin/atom', '/usr/bin/atom', '/var/run/host/usr/bin/atom'],
},
{
name: 'Neovim',
paths: ['/usr/bin/nvim'],
paths: ['/usr/bin/nvim', '/var/run/host/usr/bin/nvim'],
},
{
name: 'Visual Studio Code',
paths: ['/usr/share/code/bin/code', '/snap/bin/code', '/usr/bin/code'],
paths: ['/usr/share/code/bin/code', '/snap/bin/code', '/usr/bin/code', '/var/run/host/usr/bin/code'],
},
{
name: 'Visual Studio Code (Insiders)',
paths: ['/snap/bin/code-insiders', '/usr/bin/code-insiders'],
paths: ['/snap/bin/code-insiders', '/usr/bin/code-insiders', '/var/run/host/usr/bin/code-insiders'],
},
{
name: 'VSCodium',
paths: ['/usr/bin/codium', '/var/lib/flatpak/app/com.vscodium.codium'],
paths: ['/usr/bin/codium', '/var/lib/flatpak/app/com.vscodium.codium', '/var/run/host/usr/share/vscodium-bin/bin/codium'],
},
{
name: 'Sublime Text',
paths: ['/usr/bin/subl'],
paths: ['/usr/bin/subl', '/var/run/host/usr/bin/subl'],
},
{
name: 'Typora',
paths: ['/usr/bin/typora'],
paths: ['/usr/bin/typora', '/var/run/host/usr/bin/typora'],
},
{
name: 'SlickEdit',
Expand All @@ -57,7 +57,7 @@ const editors: ILinuxExternalEditor[] = [
// Code editor for elementary OS
// https://github.com/elementary/code
name: 'Code',
paths: ['/usr/bin/io.elementary.code'],
paths: ['/usr/bin/io.elementary.code', '/var/run/host/usr/bin/io.elementary.code'],
},
]

Expand Down
7 changes: 6 additions & 1 deletion app/src/lib/shells/linux.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,12 @@ export function parse(label: string): Shell {
}

async function getPathIfAvailable(path: string): Promise<string | null> {
return (await pathExists(path)) ? path : null
if (process.env.FLATPAK_HOST !== 'undefined') {
path = "/var/run/host".toString().concat(path)
return (await pathExists(path)) ? path : null
} else {
return (await pathExists(path)) ? path : null
}
}

function getShellPath(shell: Shell): Promise<string | null> {
Expand Down