terminal – iTerm2 Cmd+click tries to download URL as it is a remote file

I’m using iTerm2 Build 3.3.12 on macOS Catalina (with Bash). Since I installed the Shell integration I can’t Cmd+click anymore on URLs in order to browse them. Instead, iTerm2 tries to download it like it is a file on the remote host, and obviously fails.

What can I do to reset this behavior? I don’t care about downloading remote files anyway.

command line – Internet Proxy Settings In Terminal

I have used terminal to install apps using the proxy of my office. Now when I am using mobile data, I cannot install or update any apps. I know it is using the old proxy in the terminal. how to change the proxy to default?? So that I can use my mobile data to install apps in the terminal.

I have changed the proxy in google chrome. so there is no problem.

Terminal “history” command brings back different results

In OSX’s terminal, I run the history command to find my recent commands. Often I notice recent commands will not show up, seemingly randomly. For example, I will log on one-day and notice my commands from the previous day are not showing in history (though they did they day before) but rather last week’s commands are there.
How do you troubleshoot this? Is it an error or I am understanding something incorrectly?

node.js – Discord.js snipe command not working, no errors on terminal

I’m trying to make a snipe command, and everytime I use the command the return message “I couldn’t find any last deleted messages.” is what I get even if there was a message that was deleted. There are no errors appearing on the terminal so I’m a little lost at what to do.

This is what the command looks like

const msg = bot.snipes.get(message.channel.id)
if(!msg)return message.channel.send("I couldn't find any last deleted messages.")

const embed = new Discord.MessageEmbed()
.setAuthor(msg.author)
.setDescription(msg.content)
if(msg.image)embed.setImage(msg.image)
message.channel.send(embed)

And I’ve defined the set with

bot.snipes = new Map();
bot.on('messageDelete', function(message, channel){
    bot.snipes.set(message.channel.id,{
        content: message.content,
        author: message.author.tag,
        image: message.attachments.first() ? message.attachments.first().proxyURL : null
    })
    })

Any help would be greatly appreciated, thank you very much!

terminal – Automating copying the dylib files

ALL,

I hope this is the right place to ask this question and not the specific Mac forum…

I am trying to create a script to automate the copying the dylib files from where they are built into the Framework folder of the Application Bundle.

I found this, but I can’t find where the Step 4 is done.

I have 2 Mac laptops – one with Xcode 9 and one with Xcode 5. And both doesn’t have anything like shown in the screenshot.

Could someone please help?

Thank you.

P.S.: It would be nice if someone can provide a full instruction on how to copy the dylib inside the Application Bundle, so that I can run it from the Terminal or a Finder.

My project structure is following:

myApp
|
———> myApp folder
|
——————–> Build
|
————> Products
|
————> MyApp.app
libmylib1.dylib
libmylib2.dylib

As it stands right now, I can execute the MyApp only from the Xcode.

I’d like to make it possible to execute it from the Terminal or Finder.

If there is another way – I’d also like to know how to do that.

apache – Catalina – perl not working with apache2; apache2 working with php and perl running from the Terminal

I cannot get perl cgi scripts running on my apache2. Safari displays the text of the script, instead of the intended output. Apache is running, and can run php scripts. Perl programs run from the Terminal. I am using the default installs of perl and apache2 on Catalina running on a 2019 Air.

  1. I uncommented the perl line in the AddHandler section of http.conf
  2. I added the .pl extension in AddHandler cgi-script
  3. I shtml to AddType
  4. I changed permissions on the file to:

chmod a+x /Library/WebServer/CGI-Executables/hello.pl,

as recommended in another AskDifferent question on the same problem
5. I did apachectl -k restart

Nothing has worked. Here’s my /etc/apache2/users/jrw file:

<Directory "/Users/jrw/Sites/">
AddLanguage en .en
AddHandler perl-script .pl
PerlHandler ModPerl::Registry
Options Indexes MultiViews FollowSymLinks ExecCGI
AllowOverride None
Require host localhost
</Directory>

The scripts are in /Library/WebServer/CGI-Executables. Do I need a symlink directing CGI-Executables to “cgi-bin”? That doesn’t seem to be necessary, because the url “localhost/cgi-bin” finds the script. It displays the text in the browser.
This may be irrelevant, but perl worked for me in Mojave. I upgraded Mojave to Catalina on my previous Air, which developed a glitch in the power controller. My present Air had the drive doubled from the old one. I have not tried to run perl since upgrading from Mojave to Catalina.
Thank you for any and all guidance.

Restore open Terminal sessions from Time Machine backup?

I just did a Time Machine restore of the full system on Catalina, and seems to have worked pretty well, with one exception – I had several Terminal windows open with bash history, but these haven’t been restored this time.

Where are these past terminal sessions stored? Could there be a way for me to restore these files specifically from some past Time Machine backup?

I did this once before with Chrome when it lost open windows and tabs; Chrome is a little temperamental when restoring open windows and tabs; in this case it restored some but not all; then, close the app and reopen it and all the original tabs appeared. Not so with Terminal, though (I closed and reopened the app and the lost windows don’t appear).

Wondering if anyone knows which files I could look for on a Time Machine backup and try restoring those specific files manually to get the sessions back.

golang – Why terminal in Ubuntu 16 cannot find go version even after setting up path?

I followed the below steps to set up a workspace for go in ubuntu 16.

1.Downloaded go 1.14 version for linux from https://golang.org/

2.Extracted it in the /usr/local using the command-

sudo tar -C /usr/local -xzf go1.14.4.linux-amd64.tar.gz

3.Added path in the .profile.rc by adding the line

PATH= "$PATH:/usr/local/go/bin"

4.Sourced this in the session with command –

source ~/.profile

5.Checked go version

But the terminal returns the error

The program ‘go’ is currently not installed. You can install it by typing: sudo apt install golang-go

Can anyone please explain where I am going wrong with this ?