phpc.social is one of the many independent Mastodon servers you can use to participate in the fediverse.
A server for PHP programmers & friends. Join us for discussions on the PHP programming language, frameworks, packages, tools, open source, tech, life, and more.

Administered by:

Server stats:

800
active users

#iterm2

0 posts0 participants0 posts today

Seit einigen Monaten verwende ich auch #Ghostty als Terminal Client unter #macOS. Ein wenig „nervig“ sind nur die dauernden Updates.

Allerdings muss ich mich noch mit den Settings beschäftigen. Immer manuell die Fenster- und Schriftgröße anzupassen ist auch blöd. Bisher vermisse ich aber nix gegenüber #iTerm2.

Annoyed by iTerm2* having 5 tabs "Mark's Atari Shell"** and 2 "Mark's Evil Lisp"***, I finally did minimal research and added to .zshrc:

* (still no practical replacement, alas)
** (theme, Atari 8-bit font, white on blue)
*** (theme, light on dark, red or green)
**** (I like footnotes)

Tip of the day: Make #iTerm2 open links in incognito browser window by default:

1. Edit your iTerm2 profile Smart Selection: iTerm2 > Settings... > Profiles > [yourprofile] > Advanced > Smart Selection > Edit

2. Locate "HTTP URL" entry, select it and click "Edit Actions..."

3. Enter title "Open in Incognito", select action "Run Command..." and use the following command: open -na "Brave Browser" --args -incognito \0

4. Select Ok, Select Close

The above works with Chrome compatible browsers, too, replace "Brave Browser" with the name of the browser (for example "Google Chrome" to open the links with it). For Firefox (and compatibles) you can use: open -na "Firefox" --args -private-window \0

Similar thing is also possible for Safari but I believe it requires use of AppleScript and is thus beyond the scope of this toot.

Replied in thread

@eliteamdgamer @thelinuxcast That is unfortunate if true, but at least for now it's still far superior (for certain types of users, at least) than every other Linux terminal app I have tried. It proves that it is possible to make a multi-featured, more user-friendly cross-platform terminal app, so the question is why has no one else ever attempted it?

(The other question is why the #iTerm2 developer has never made his program cross-platform, iTerm2 blows every other terminal app out of the water as far as I am concerned but unfortunately it only works with MacOS. If there were something like WINE but that let you run GUI-based MacOS programs in Linux, I'd be using iTerm2 right now).

Replied in thread

@thelinuxcast Matt, for your episode please take a look at #WindTerm, it's probably not everyone's cup of tea but if you switched to #Linux from #MacOS and REALLY miss #iTerm2, this is probably about the closest equivalent you will find. I am not connected with it in any way, I just came across it after reading an article about it a month or two ago and I have been using it ever since.

Someone like you might hate it, because I have seen enough of your videos to know that you tend to look for #terminal app features that some of us just plain users would never need. But if you are coming from a MacOS (or even a Windows) environment, and especially if you are not a coder and only use a terminal app to perform administrative tasks on your servers, WindTerm might be the best choice.

The big thing I like about it (which is also a feature in iTerm2) is that you can have a right-side menu showing all your saved profiles/connections, and you can bring up any of them in a new tab simply by clicking on that connection. I am NOT saying WindTerm is perfect (WHY does it not close the tab when you exit a ssh session?) but for just regular users it just may be the best one out there, and sadly most users have never heard of it!

This is the article I found that turned me on to it:

WindTerm: A possible cross-platform alternative to the iTerm2 terminal emulator
twosortoftechguys.wordpress.co

Two "Sort Of" Tech Guys · WindTerm: A possible cross-platform alternative to the iTerm2 terminal emulatorWe’ve been Mac users for many years but let’s face it, Apple is starting to lose some of its shine. Sure, MacOS is better than Windows, but with each new version of MacOS it seems like …

We’ve been Mac users for many years but let’s face it, Apple is starting to lose some of its shine. Sure, MacOS is better than Windows, but with each new version of MacOS it seems like more features that used to work just don’t anymore. But this article is not about MacOS and its shortcomings. However, we mention that only because we’re starting to use Linux more often, and while you can find many good replacements for MacOS software to use on Linux, one of the applications we had a hard time finding a replacement for is iTerm2.  iTerm2 is described as “a terminal emulator for macOS that does amazing things.”  And over the years we have found it to be far superior to any other terminal emulator we’ve tried.

There is only one issue with iTerm2 – it’s only for MacOS.  The developer has never shown any desire to make it a cross-platform tool.  So, for those of us that use multiple platforms, it’s not easy to use iTerm2 in MacOS and then some other terminal emulator on other platform(s).  Terminal emulators tend to be a very personal choice anyway; a person who is a programmer will be looking for different features than a regular user who only uses a terminal to access his home servers.  People who love using a keyboard, and who have good memories and can remember keyboard shortcuts, will be looking for a very different terminal program than those who prefer to point and click, or who need all the help they can get to work with a program.  If you can barely remember the keyboard shortcuts to cut and paste text, you will not be happy with a terminal program that requires you to use such shortcuts to access all of its features.

This is where programs like iTerm2 and WindTerm shine.  You can use keyboard shortcuts if that makes you happy, but if you are more comfortable with using a mouse to select various features, those programs have you covered.  And, unlike iTerm2, WindTerm is cross-platform – there are versions that run on MacOS, Windows, and Linux.

WindTerm is described as “A Quicker and better SSH/Telnet/Serial/Shell/Sftp client for DevOps.”  But you don’t need to be a developer to appreciate it.  So why is it that you have probably never head of it before?  Well, we have a theory about that, and it is that they bury the download link and the installation instructions.  You need to go to their Releases page and scroll through the release notes and several graphics, none of which would be very interesting to most users, before you get to a section labelled “► Assets”, and then you may need to click on the “►” symbol to expose the actual download links.  Many potential users might miss this detail and just move on to another program.  And then for Linux users there is the additional complication of how to install the package – they left that little detail out of the instructions for the most recent versions, and you need to scroll all the way down to the section on version 2.4.0 to find those.  Be we assume you want a more recent version, so to save you the trouble of searching, here is how you install it in Linux.

First, on the Releases page, right click on the link for the “Linux Portable” version of the program and copy the URL.  We then suggest that you create a new directory named “WindTerm” in your user directory, or in a sub-directory if you prefer, and cd into it, and then use wget to download the program, for example:

wget https://github.com/kingToolbox/WindTerm/releases/download/2.6.0/WindTerm_2.6.1_Linux_Portable_x86_64.tar.gz

Then install it like this:

tar -xzvf WindTerm_2.6.1_Linux_Portable_x86_64.tar.gz && cd ./WindTerm_2.6.1 && chmod +x ./WindTerm && ./WindTerm

Both of the above examples are all one line, even if the blog formatting splits them into two or more lines. This assumes you are installing version 2.6.1; be sure to change the version number if there is a more recent version.

And that’s the other thing about WindTerm, it hasn’t been updated in the last couple of years. So while it is not really old, it also doesn’t seem to be undergoing any new active development.

When you first run WindTerm you will be presented with a popup asking where to put WindTerm’s profile directory.  It doesn’t really matter which location you choose but we would put it in the application directory.

After you make this selection and click OK, you are probably still running the install script, so you may want to Ctrl-C out of that and create an application icon before you go any further.  To do that, go into the WindTerm directory you created and inside that there should be another directory with the actual version name in it – on our system it’s at ~/WindTerm/WindTerm_2.6.1 – and inside that directory there is a file called windterm.desktop.  Copy that file to an appropriate place on your system, this may be somewhat distro-dependent but on Debian and Ubuntu based systems it seems that ~/.local/share/applications is the correct place.  Then open the copied file in a text editor (nano ~/.local/share/applications/windterm.desktop) and find the two lines that say Exec=/usr/bin/windterm and in both places change the path to the correct one (for example, /home/username/WindTerm/WindTerm_2.6.1/WindTerm).  Also there are two lines that say Icon=windterm but chances are your system’s icon theme doesn’t have a WindTerm icon, so you may want to point that to the path and filename of an actual icon file of your choosing (it probably must be in .png format).

Once you do this you should be able to start WindTerm as you would any other application, but chances are at some point you will get this annoying popup.  We will tell you how to get rid of it later but for now just answer “no” – in our experience answering “yes” would erase the current configuration!

After that you will see WindTerm’s main window:

The display may seem quite cluttered with panes to the right, left, and bottom of the main terminal area. But, any that you don’t use can be closed, either by clicking on the small X in the upper right corner of each panel, or by selecting “View” in the top menu bar, and then selecting “Panes”. You can select or deselect the various panes that appear. If you select “Bars” instead of “Panes” you can enable or disable certain bars, but be careful – the top choice is the Menu Bar, which is the bar you’re using, so if you disable that you lose the ability to turn it back on, or do much of anything else that you’d normally do from the top menu. If you pay attention you might notice that it shows a couple of keyboard shortcuts next to that option: Alt+W, Alt+M. What that means is if you first press Alt+W and then press Alt+M, it will toggle that top menu on or off, so if you do accidentally close it that is how you can bring it back.

One thing we have discovered about more advanced terminal emulators is that they all seem to have their little quirks and differences as to how you make connections. Unfortunately this is one case where some try so hard to make it easy for users that they actually make it more difficult. For example, if you want to set up any kind of ssh tunnel and you go looking on the web for examples, usually they will just show you an example ssh command that you enter in your system’s default shell. And when you are creating a new connection profile, iTerm2 will let you enter ssh commands verbatim if you like. But many of the newer terminal emulators make it more complicated by making you use checkboxes, dropdowns, and/or text fields to enter various ssh options. So instead of essentially cutting and pasting an example ssh command into your terminal emulator, you need to try and figure out how to translate those commands into the proper checkboxes, dropdown menu selections, and/or text fields. And if you’ve only ever set up ssh connections using checkboxes and dropdowns, what do you do if you ever need to use a different terminal emulator that has different checkboxes and dropdowns, or none of those?

I wish I could tell you that WindTerm makes this easy, but it really doesn’t. Setting up a basic SSH connection profile (WindTerm calls it a session) isn’t difficult; you just click on Session in the top bar, then New Session (or press Alt+N) and a popup window will let you enter the details for your ssh connection.

In the popup that appears, select the SSH tab, then enter your host address in the Host field, and the name of what you’re connecting to in the Label field. For most servers that is all you need to enter on that screen, although you can change some other things such as the port number used if that’s non-standard. But once you have that filled out, you may be wondering, where do I put the user name? And that’s where things start to get a little, well, strange. What you do is click the Connect button and a new pane will pop up where you can use “OneKey” to log in, or you can click the Account tab and then a field will appear where you can enter your user name, and there is a checkbox to “Auto login next time” that you will probably want to check unless you are in an insecure environment.  Then click “Continue”:

Then if this is the first time you have created a new session, you will probably get this popup asking you to enter a master password that will be used when you want to perform certain operations in WindTerm.  Unless you are in an insecure environment, you might want to leave both fields empty and just click OK, so you aren’t bothered by this again.

Then yet another box pops up asking for your password. You can fill that in and login that way if you like:

However, if you want to use key exchange you can click the Public Key tab, and it will ask you for the path to your identity file. Click the “…” and it will open the file picker dialog and let you choose the file. For nearly all users this will be .ssh/id_rsa so select that and click Continue and you will be logged in, and you new session will appear in the Session pane if you have it visible.

Just about every other terminal manager we have ever used knows where to find the identity file but WindTerm will ask you to enter it for every session you create. Fortunately you only need to do this once for each session you create, as long as you remember to check that “Auto login next time” checkbox.

Your saved sessions all appear in the Session pane on the right hand side of the screen.  Clicking on a session will start that session in a new tab, the same as would happen if you clicked on an item in iTerm2’s Profiles pane on a Mac.  Note that you can create, remove, or rename folders (called Session Groups in WindTerm), or not use any Session Groups at all if that’s your preference.  You create a new Session Group by right-clicking on any session and selecting “Move to…”; you can specify an existing Session Group or create a new one.  You can right click on a folder or session to remove or rename it. The screenshot below also shows how panes can be closed to give a less cluttered look:

Creating ssh tunnels is also, well, interesting. In iTerm2 you would just create a new profile for each tunnel (at least that is how we would do it) and enter the ssh command and its options. In WindTerm you need to already have a session for making a basic ssh connection to the target server, as described in the previous paragraph. You then click on “Tunnels” in the top menu bar (next to the magnifying glass icon on the right hand side) and then in the dropdown you click “Tunnel Settings” Or you can press Ctrl+T followed by Ctrl+U.

That will bring up the Tunnel Settings popup, and you can create new tunnels by clicking the small + near the bottom left of the popup. Under Type you can create Dynamic, Local, or Remote forwarding tunnels.

Dynamic tunnels are commonly used to set up a SOCKS5 proxy, but unfortunately there is a bug in WindTerm, in that if you create a Dynamic proxy and then try to use it with your web browser, and you tell your browser to use the proxy for DNS lookups, you won’t be able to connect to anything because for some reason the DNS lookups do not pass through WindTerm. That has not been an issue with any other terminal emulator we have tried.

Fortunately there is a workaround, though it’s not pretty. What you do is create a new session, but instead of selecting a SSH session you select the Shell tab at the top of the new session dialog. In the Label field add a descriptive name for your tunnel. Then simply click Connect. Then you go into the Tool item in the top menu bar and select Triggers (or hit Ctrl+T twice). In the popup box that appears, click the + in the lower left corner to create a new trigger. The name and description can be whatever you want, but set the type (in the dropdown menu) to Event: After Connection and click the Create button.

In the next screen select “Send Text” in the dropdown and a text field will appear, in that text box you put your full ssh (or autossh if you have that installed and want to use it) command and add the \n characters at the end so it will enter the command you type. So for example you could enter something like

/usr/bin/ssh user@example.com -D 9876\n

to set up a regular SOCKS proxy on port 9876. Or if you have autossh installed, then something like

/usr/bin/autossh -M 0 user@example.com -D 9876\n

to make the tunnel attempt to stay connected even if there is a temporary outage. Note you should use the correct paths to ssh and/or autossh on your system. Then, click the Sessions tab at the top of the dialog and you should see switch icons next to all your saved settings. Click the one next to the new shell session you just created, that has the descriptive name for your tunnel. Then click the OK button.

What will happen now in any time you start that shell session, it will run that ssh command and open the proxy. And for whatever reason, DNS lookups that go through the proxy work if you do it this way.

You can have up to four sessions open automatically any time you start WindTerm (well, sort of). Go to Session in the top menu bar, then Preferences, then Settings. You will see a box pop up where you can select “A specific set of sessions” to run at startup, and you just click that option and select the sessions you want in the dropdowns.

Why only four sessions? Only the developers know. And the worst part is they don’t all actually start, only the first one does. For the rest it brings up the sessions in tabs, but they don’t actually make a connection when you click on the tabs. That is bad if you are trying to use WindTerm to start a tunnel or proxy automatically at startup. iTerm2 will start sessions in tabs that you have set to open at startup. And we haven’t found any way to change that behavior in WindTerm, unfortunately.

There is a place on WindTerm’s GitHub site where they have several short how-to documents with accompanying animated gif’s that show how to use many of WindTerm’s features. They are shown in reverse chronological order here. The only problem is that, at least on our systems, the animations go by so fast it is hard to see what they are doing, If you search online there are many ways to slow down an animated gif, but we found that if we let one of them loop through about three or four times we finally caught the gist of it. At least they made the effort to actually create some user-friendly documentation.

We said we’d tell you how to get rid of that annoying “Reimport Shell Sessions” popup that pops up every time you start WindTerm, if it appears in the version of WindTerm you are using.  The solutions are found in issue #2287 in WindTerm’s bug tracker. There are two solutions shown and only one of them is valid on any given system. One is that open ~/.wind/profiles/default.v10/user.config in a text editor and find the setting “terminal.reimportShellSessions” and change the value of that setting to 2 (so it reads “terminal.reimportShellSessions” : 2). But if that setting does not exist, DO NOT CREATE IT or you will lose your entire configuration! Instead, go to the directory where you saved WindTerm when you installed it, and in there go into the /global directory and find the file wind.config and open that in a text editor. In there you should find a setting, “terminal.reimportShellSessions”: true, and if so change the “true” to “false“, being careful not to accidentally delete the comma at the end of the line. Whichever setting you change, save the changed file and when you next start WindTerm the annoying popup should be gone!

https://twosortoftechguys.wordpress.com/2024/09/11/windterm-a-possible-cross-platform-alternative-to-the-iterm2-terminal-emulator/

#000000 #2287 #iTerm2 #Terminal #TerminalEmulator #WindTerm

iterm2.comiTerm2 - macOS Terminal ReplacementiTerm2 is a replacement for Terminal and the successor to iTerm

Well I will just thow this out there, take it or leave it. Many #MacOS users, especially those who have moved to or also use #Linux, have asked if there is anything equivalent to or better than #iTerm2 . You might take a look at #WindTerm (github.com/kingToolbox/WindTer) UNLESS you have a thing about not using completely open source code (github.com/kingToolbox/WindTer). Depending on the features you value it may or may not be a suitable replacement for, or supplement to iTerm2.
#terminal

GitHubGitHub - kingToolbox/WindTerm: A professional cross-platform SSH/Sftp/Shell/Telnet/Serial terminal.A professional cross-platform SSH/Sftp/Shell/Telnet/Serial terminal. - kingToolbox/WindTerm

@therealahall I am in kind of the same situation, I am starting the process of transitioning from a #Mac to a #Linux system running #Ubuntu 24.04 (but I also installed #QuickEMU so I can run a different distro or even Windows or @MacOS in a virtual machine if I really want to). Some things seem to work fine but differently enough to be maddening, for example I run Firefox on both systems and have it configured pretty much the same (so links open in new tabs) but if I send a link to Firefox in MacOS from another application it opens the link in a new tab AND brings Firefox to the foreground. In Ubuntu it still opens the link in a new tab but Firefox remains in the background, so I think nothing has happened and click the link several times (each time opening yet another tab that I don't see) until it dawns on me that this is Linux and I have to click the Firefox icon in the dock.

In MacOS I an used highlighting a media file or image or text file in Finder and hitting the spacebar and having it display in QuickLook. In whatever Ubuntu's equivalent of Finder is, that doesn't happen.

For a terminal program I am using #Tabby but while it is pretty good it is no #iTerm2. Again it's little things that just work in iTerm2 that don't in Tabby. I have heard there are better programs, I would like to find one that lets you display your profiles in a sidebar like iTerm2 does (so you can just double click` on one to open a new tab using that profile).

For Mastodon I am trying #Tuba but what I don't like about it is it doesn't save your place in the (home) timeline so you can go back to reading where you left off, reading oldest to newest.

For a #RSS reader I am trying Fluent Reader (in place of Vienna in MacOS), it is okay but I wish that in Magazine View it would give you the choice to display the full text of articles, like Vienna does. Also it doesn't have an option to let you undo a "mark all read" operation in case you do that by mistake.

In place of Little Snitch I am using #OpenSnitch, it seems to work quite well other than that it doesn't honor the system theme.

I use #Joplin in place of Apple Notes and highly recommend it, I have been using it now for quite some time.

I use #Timeshift and #BackInTime instead of Time Machine to do backups, don't really get why you're supposed to use Timeshift for system backups and BackInTime for home directory backups but they seem to work so I am okay with them. If you are looking for something that looks more like Time Machine there is #Cronopete but I am not sure if it is still being actively developed.

At the moment it just seems like there are a bunch of small annoyances (such as notification sounds not being loud enough in some applications even though the system sound volume is all the way up). In time I am sure I will work through several of them (and already have done so with some, such as finding the Gnome extension that puts system notifications up on the upper right of the screen instead of the middle, and another that actually makes them stay on the screen long enough to be read!) but I have several things I am trying to get done at once so for the moment getting Ubuntu fully configured is kind of on the back burner. Anyway, if you find any apps you think do a great job of replacing equivalent MacOS apps I would be interested in hearing about them!

#iTerm2 users

I'm still looking for a way to disable the dimming of other commands & output when you click one. (the grayed out stuff in this pic)

I REALLY hate this, and would love it if someone could tell me how to make it stop.

Otherwise I'm just going to switch to Kitty or something, because this is frustrating me more every day.