ConEmu to Linux via ssh, ***without*** cygwin - ansi

I am using ConEmu 150504 under Windows 10 Enterprise, release 21H2, and I am having some problems when connecting to a linux host via ssh.
There is no cygwin installation at all. Every Windows utility, including ssh, is a non-cygwin version. I mention this here because other similar questions that I have found involve the use of cygwin's ssh, but I want to make it clear that I am not using the cygwin version of ssh nor any other cygwin software.
From within my ConEmu window, I can successfully connect to my linux host, as follows ...
ssh myuserid#the.host.name.com
Once connected to my linux host, I want to use various curses-based and other console-based utilties, including emacs -nw. I have export TERM=xterm properly set in my linux shell, but I am only getting partial console capability.
By "partial", I mean that ANSI color codes are not being honored, and certain control characters are not being honored.
Is there some way to set up ConEmu so that it is totally, completely, 100-percent emulating full xterm capabilities and full ANSI character-code management?
Thank you in advance for any thoughts and suggestions.
PS: setting export TERM=xterm-color and export TERM=xterm-256color in linux don't help at all when I'm using ConEmu.

Related

Unix command line on PC using Ubuntu

I am new to these forums and to using Ubuntu and linux and UNIX. I really need some help here. I hope I haven't shot myself in the foot already. I have been trying to complete a UNIX carpentry lesson on the internet for an assignment. I am learning the basics about UNIX. I am not using a Mac, I am using a PC that I did not configure in any way (maybe that's my problem). I am using windows 10 on a lenovo and trying to the command prompt on Ubuntu to find my desktop where a file called "data-shell" is located. The problem: IT IS NOT FINDING THE DESKTOP. Upon further inspection, I have been looking through the location of my desktop and "data-shell" file and found it in the Users location under a number 12094, which I am assuming is the serial number for the computer. I have NEVER fiddled with the software at all with this computer as it cost me a lot of money, but I really do not want to be stopped in the tracks already. I have the following images numbered in the order that I discovered everything; they are posted here. I would really appreciate the help. P.S.: Since I am using a PC and not mac, I thought I had to use another command line like BASH or the terminal on my PCor doI just use Ubuntu? The UNIX shell is supposed to start with a $, right? Please correct me if I a wrong and thank you for your help
.
linux commands on windows can be ran via cmder or git bash (what i had used in past)
and in linux the desktop is at the path
/home/< username>/Desktop
whereas in windows its
C:\Users<username>\Desktop
both windows (DOS) and ubuntu/mac(linux) environment are entirely different you can directly run commands of one on the other environment, you do need to "setup" that env first if the command is not native to that.
Now, since its assignments that you are doing and all you need is bare-min linux env
you can give https://repl.it/ a try and create a new project in bash
Also, when you install Ubuntu on windows you dont get acces to windows like path, like "C:...", in ubuntu c:\ of windows is mounted to some other path in ubuntu
search on google how to access windows desktop from ubuntu shell after installing ubuntu inside of windows
When using Windows Subsystem for Linux (WSL), your C drive is located under /mnt/c.
Judging from the screenshot, you are user 12094, so you can either accept this, or you need to actually configure your machine. Also if you look in the screenshot you provided, there is a /home folder which I am betting is actually pointing to /mnt/c/, and your home folder will be under /home/12094, which is also the same as what is stored in $HOME.
To find the location of a file called data-shell, you can run the following linux command while in your home folder:
find $HOME -type f -name 'data-shell'
This command recursively searches for files in your home directory, with the name data-shell

How i can get Ubuntu terminal's list from Qt

In my app i want to open ssh in terminal-emulator for user. Now i'am using QProcess like this:
QProcess _localhostConnection;
_localhostConnection.start(QString("gnome-terminal"), QStringList("--command=ssh 127.0.0.1"));
But the problem is there can be no gnome-terminal on another computer. Another computer has Ubuntu. How can i get installed terminal's list in Qt on Ubuntu?
Try calling x-terminal-emulator instead. Almost all Debian-based systems use the update-alternatives package (in conjunction with virtual packages like x-terminal-emulator) to bookkeep programs with similar functions, such as Internet browsers, editors, command shells, et cetra. Calling x-terminal-emulator will launch the default terminal emulator set by the user.
Read more about update-alternatives here: https://manpages.ubuntu.com/manpages/xenial/en/man1/update-alternatives.1.html
However, hardcoding --command=ssh 127.0.0.1 isn't very wise if you are aiming to support all terminal emulators. XTerm, for example, won't accept that parameter syntax.

Execute this command line in Windows

I'm trying to connect my firebase auth to an expo project.
I'm following the main docs of each library. I'm stucking on this step.
I'm not able in windows to exeute this command line openssl rand -base64 32 | openssl sha1 -c.
I've tried with the specific https://code.google.com/archive/p/openssl-for-windows/downloads but I don't know how to reproduce the same line.
Any help would be great, thanks in advance.
You need to install openssl. It is usually available on Linux (which I think that article might have been written for). There are some Windows binaries available at here. Alternatively, you could setup a WSL session, and run the command from there.
that is a linux command. Therefore a linux terminal is needed.
there are at least 2 ways to get this done
using virtual machine with ubuntu or some other operating system that uses a linux terminal aka shell (which I doubt you know about)
OR
installing a linux emulator (windows 8+ since it's from the windows store)
assuming you would prefer option 2, go to the windows store, search "Kali" and you will find an app called Kali. install it and if an error shows up, here's a nice video here that talks about solving that error and you would have a kali terminal on your windows computer (your command would work there)

Error while opening Rstudio throught Terminal

I am working with Unix and from now on I need to use the University server to run some packages in R.
1.I assessed the server by ssh
2.I downloaded miniconda
3.source ~/.bashrc
4.Downloaded Rstudio
5. conda install -c r rstudio
And when I am trying to open Rstudio I am receiving the following error
'QXcbConnection: Could not connect to display'
Any help will be super useful.
Depending you your platform and your university's security policy this may or may not work
https://unix.stackexchange.com/questions/12755/how-to-forward-x-over-ssh-to-run-graphics-applications-remotely
In short you need to explicitly enable X11 forwarding (though I was under the impression that it is on by default). Also you need to run an X11 server, there are a few on windows and MacOS. If the above does not help, it is most likely due to a security policy and you may want to speak to your university's SysAdmin

Why does configure.sh think win32 is Unix?

I'm trying to build an application from source in windows that requires some Unix tools. I think it's the apparently standard ./configure; make; make install (there's no INSTALL file). First I tried MinGW but got confused that there was no bash, autoconf, m4, or automake exes in \bin. I'm sure I missed something obvious but I installed Cygwin anyways just to move forward. For some reason when I run
sh configure.sh
I get:
platform unix
compiler cc
configuration directory ./builds/unix
configuration rules ./builds/unix/unix.mk
My OS has identity problems. Obviously the makefile is all wrong since I'm not on unix but win32. Why would the configure script think this? I assume it has something to do with Cygwin but if I remove that I can't build it at all. Please help; I'm very confused.
Also is it possible to build using MinGW? What's the command for bash and is mingw32-make the same as make? I noticed they're different sizes.
Everything is fine. When you are inside CygWin, you are basically emulating an UNIX. sh runs inside CygWin, and thus identifies the OS correctly as Unix.
Have a look at GCW - The Gnu C compiler for Windows
Also, you might be interested in this help page, that goes into some detail about the minimal system (MSYS), such as how to install, configure et. c.
That should help you get bash, configure and the rest to work for MinGW as well.
From the Cygwin home page
Cygwin is a Linux-like environment for Windows. It consists of two parts:
A DLL (cygwin1.dll) which acts as a Linux API emulation layer providing substantial Linux API functionality.
A collection of tools which provide Linux look and feel.
Since configure is using the Cygwin environment, it is interacting against the emulation layer and so it is just like it's working on a Unix environment.
Have you tried building the application and seeing if it works?

Resources