Code Monkey home page Code Monkey logo

Comments (7)

luixal avatar luixal commented on July 18, 2024 1

Hi!

I'm too lazy to create the settings window so... I'm using an ugly workaround.

If you have a look at the code, you'll notice line 94 at extention.js showing the command run when an item is clicked. The terminal run is this:

x-terminal-emulator -e ssh <item>

where item is the entry in the ~/.ssh/config file.

My favourite terminal (right now, at least) is Tilix so I just created a symbolic link so x-terminal-emulator launches tilix:

sudo ln -s /usr/bin/tilix /usr/bin/x-terminal-emulator

Hope this helps you! :)

from gnome-shell-extension-ssh-quick-connect.

ibrokemycomputer avatar ibrokemycomputer commented on July 18, 2024 1

@careca1970 @luixal Finally! I Added a setting for a custom SSH start command.

I also used VSCode's "terminal" command to launch the default terminal command on most distros so this should work "out of the box" for most ppl now.

Thank you for the suggestion!

from gnome-shell-extension-ssh-quick-connect.

ibrokemycomputer avatar ibrokemycomputer commented on July 18, 2024

This is a WIP
https://github.com/ibrokemycomputer/gnome-shell-extension-ssh-quick-connect/tree/ssh-PATH

If I dont get to it at least the base is there :)

from gnome-shell-extension-ssh-quick-connect.

ibrokemycomputer avatar ibrokemycomputer commented on July 18, 2024

I definitely don't recommend making a symlink like that as, and this is completely unresearched/a hunch, it seems like it will cause other programs to break or other unobvious issues to emerge that would stump novice *nix users immediately or when making "seeming normal/standard" upgrades/updates in the future.

I'll try to get to the setting thing soon!

from gnome-shell-extension-ssh-quick-connect.

luixal avatar luixal commented on July 18, 2024

Totally agreed.

It's just a dirty hack that works for me at the moment as I don't have any command called like that :)

from gnome-shell-extension-ssh-quick-connect.

ibrokemycomputer avatar ibrokemycomputer commented on July 18, 2024

Alright, this should work by default on most distros now. See

/**
* Huge shoutout to the VSCode devs for the inspiration here
*
* @returns String Terminal command to use
*
* @see https://github.com/microsoft/vscode/blob/dce493cb6e36346ef2714e82c42ce14fc461b15c/src/vs/platform/externalTerminal/node/externalTerminalService.ts#L281-L292
*/
getTerminalCommand() {
const file = Gio.File.new_for_path('/etc/debian_version');
const isDebian = file.query_info('standard::*', 0, null)?.get_size() > 0;
const DESKTOP_SESSION = GLib.getenv('DESKTOP_SESSION');
const SSH_COMMAND = ' -e ssh';
let LINUX_TERMINAL = 'xterm';
if (isDebian) {
LINUX_TERMINAL = 'x-terminal-emulator';
} else if (DESKTOP_SESSION === 'gnome' || DESKTOP_SESSION === 'gnome-classic') {
LINUX_TERMINAL = 'gnome-terminal';
} else if (GLib.getenv('COLORTERM')) {
LINUX_TERMINAL = GLib.getenv('COLORTERM');
} else if (GLib.getenv('TERM')) {
LINUX_TERMINAL = GLib.getenv('TERM');
}
return LINUX_TERMINAL + SSH_COMMAND;
}
}
for the fix. I'll update the extensions site with a new zip soon.

I'm also in the middle of adding a setting for it so you'd be able to add whatever command you want :) Probably wont get that added until next week though.

from gnome-shell-extension-ssh-quick-connect.

ibrokemycomputer avatar ibrokemycomputer commented on July 18, 2024

BTW, the terminal start command should work more "unviversally" right now.

Letting it be customizable will come soonish. (Its not hard, I just need to "do it" lol)

from gnome-shell-extension-ssh-quick-connect.

Related Issues (18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.