Using APL symbols in Ubuntu, console only - keymapping

I have been trying unsuccessfully to setup the keymap on a console to program in APL. My machine is remote, hence I do not have Xorg installed.
How can I setup my keymap/charset to correctly produce APL symbols?

Related

How can I jump to function definitions using VS Code in SSH remote development

Okay I am new to Embedded Linux development.
Right now, I am trying to setup the development environment as efficiently as possible.
I have a python code running on a lightweight Linux based device, that is located remotely
So far I was able to setup my VS Code on my Windows system, in such a way that I can edit the files directly on the remote Linux device.
I followed the instructions below
https://code.visualstudio.com/docs/remote/ssh
https://code.visualstudio.com/docs/remote/ssh-tutorial
Now that I am able to edit my files directly, I face only one obstacle.
I find it hard to traverse to a function/method definition.
In my windows system, I could just Ctrl+LeftClick on a method/function, and it would take me there.
But here when I opened VS Code with the terminal running remotely, I have to do a Ctrl+F and search in the VS Code editor, which is like working on a notepad.
Does anyone know how to get around this?
On my main windows system, I am able to jump to method definitions quickly by Ctrl+LefClick-ing them.
Hope the question is clear enough.
Install the Python extension on the remote server and select the Python interpreter on the Linux device in VS code:
Press Ctrl+Shift+P to bring up the command palette and run the command Python: Select Interpreter.

How to configure Mabinogi to run in Lutris?

I'm attempting to play Mabinogi by Nexon on Linux Mint 20 (Ulyana) using Lutris. I've previously used Lutris to play Heroes of the Storm but otherwise don't have much experience with it (or with gaming on Linux, in general). There's no installer on the Lutris website for Mabinogi like there was for Heroes of the Storm, so I was on my own to try and figure everything out.
What I've tried
I started by downloading the Nexon Launcher Installer from their website. I configured Lutris to launch this executable using Wine within a simulated Windows environment. When it first launched I noticed several files were created ("drive_c", "Program Files", "Users", etc -- mimicking a Windows file system). The launcher installer ran without issue and I installed the launcher to "C:\Program Files (x86)\Nexon"
I then re-configured Lutris to try and launch the Nexon Launcher instead of the Nexon Launcher Installer. When I hit "Play" in Lutris, nothing happened. Running ps -ax | grep "Nexon" showed that it was theoretically running, but there was no window or visible UI even after several minutes of waiting. I checked the Lutris logs and noticed a message about a file missing (something like "10000.manifest.hash"). I Google'd this error and found plenty of people in Windows who had trouble running the Nexon Launcher with the same error, and the solution was to just install Mabinogi through Steam.
So next I downloaded the "Wine Steam" runner in Lutris and set this as the runner for Mabinogi, plugging in the app ID (212200). After Steam installed, launched, logged in, and downloaded Mabinogi I tried to launch the game. This time I saw a window pop up saying "Mabinogi is launching" and in the bottom-right the Nexon Game Security icon popped up, but then everything closed and the game never started.
Finally out of desperation I tried setting up a virtual computer using VirtualBox to play the game in its native Windows environment. I installed Windows 7 (the minimum required version according to the Nexon website). I downloaded Mabinogi through Steam on the virtual box. Upon trying to launch Mabinogi, I received the error error: "api-ms-win-crt-runtime-l1-1-0.dll is missing". I'm curious if this error is related to why I couldn't get Mabinogi working in Lutris.
Looking at a game that I had previously played in Lutris (Heroes of the Storm), I noticed a very similar DLL was listed in the "DLL overrides" section: "api-ms-win-crt-private-l1-1-0.dll". So I tried adding the runtime DLL to the overrides in Mabinogi with the same value ("n,b") - but this didn't work.
Looking at the Lutris logs when I try to launch Mabinogi through Wine Steam, there are several errors from \main\game-launch.js:109. I'm not sure if this JS script is part of Lutris of part of the Nexon Launcher, but it could provide some hints. Among the logs the following lines stand out as potentially meaningful:
...
ERROR: ld.so: object '/usr/$LIB/libgamemodeauto.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
...
fixme:d3d12_get_vk_physical_device: Could not find Vulkan physical device for DXGI adapter.
fixme:d3d12_device_caps_init_feature_options1: TotalLaneCount = 2560, may be inaccurate.
...
warn: OpenVR: Failed to locate module
...
What I don't know
I'm not familiar with using Wine and I've never written a Lutris installer. Up until now I've only ever run Linux binaries on Linux and Windows binaries on Windows. So there's a lot I don't understand, like: What's Vulkan? What's DXVK? How do "override DLLs" work? Do I need to provide alternative DLLs for anything I want to override? What does the value "n,b" mean in the DLL override?
I'm welcome to any help
After a lot of work and research, I've gotten as far as I can and figured out where the major road block lies. The simple answer is: You cannot run Mabinogi in Lutris
Mabinogi uses an anti-cheat system that runs in kernel mode (ring 0). Wine runs in user mode (ring 3) and therefore cannot run this anti-cheat program.
The only solution is to play Mabinogi within a virtual machine (e.g. VirtualBox), since VMs run on a hypervisor (which from my understanding is kind of like a "negative" ring number, but effectively ring 0)
If you want to try some other Nexon games, I got the Nexon Launcher working in Lutris / Wine fairly easily. The trick was to download the latest Nexon Launcher since the older one (linked on the Mabinogi website) isn't sending a valid request to download the manifest file so it gets a 403. The latest launcher can be downloaded here: https://games.nexon.net/nexonlauncher

Linux on Power SDK QEMU Debugging with GDB

I'm checking out the Linux on Power SDK and want to have a setup using QEMU (Setup 2 from the tutorial page).
So far I've got the SDK, advance toolchain cross compiler and qemu-user-space-emulator all installed on Ubuntu 16.04. The whole process was quite painstaking since the user guide and all other infos often don't refer to the correct package locations and names or redirect to dead links.
I've got a "Hello world" project that I can run with the QEMU setting as described in the user guide but I cannot figure out how to get a debug build and step through the process running in QEMU using GDB. I have to add I'm not too familiar with Eclipse and using QEMU other than virtualizing a whole guest system.
Having command line debugging access is a first step but in the end I want it controllable from the IDE (setting breakpoints on lines, etc.).
Has anybody found any better documentation or knows if this is possible at all?

Remote development of Visual C++ applications from Linux

Remote development on Linux from Windows is easily doable via SSH.
However, what about the other way? I need to build and debug my Visual C++ application on Windows, but I want to work on a Linux system.
Cross-compiling via MinGW doesn't work because of MSVC-specific libraries
Ubuntu on Windows is a good start, but I'd like to work on a real Linux system
RDP/VNC or something like that doesn't help either, because than I'd work on Windows again
So does a virtual machine
Maybe something like Powershell on Linux + SSH to the Windows Powershell?
I regularly develop Visual C# applications remotely from Linux, not MSVC for the most part, but, like you, I wanted to find a way to build and debug Windows-targeted applications and libraries on remote Windows machines without working directly in the box using RDP, Visual Studio, etc.
It's difficult to answer this question without more information about the development and debugging tools you prefer to use on Linux for the types of applications you develop. I'll try to provide a general overview and update the answer for details you add about your workflow.
Cygwin, similar to MinGW's MSYS, provides a Unix-like environment for Windows. Most importantly, Cygwin, unlike MinGW/MSYS, includes an implementation of the OpenSSH server that enables us to connect to the Windows box over SSH from Linux (or any other device with an SSH client, really). We can install the sshd package using Cygwin's setup utility. After connecting, Cygwin drops us into a Bash shell by default. With this capability, we can:
Execute remote commands and scripts over SSH.
Edit files using our favorite *nix command-line text editor (Vim, Emacs, etc.)
Mount remote filesystems locally using SSHFS (if Windows shares are unavailable).
Forward or tunnel ports if needed.
The availability of a general-purpose shell makes almost anything possible. We can execute batch files, PowerShell scripts, and native Windows executables from Cygwin's shell environment in addition to Linux scripts and Cygwin programs.
For example, we could run msbuild from the SSH session command line to build our VC++ application or we could configure our local GUI editor or IDE running in Linux to execute msbuild over SSH when we click the "build" button.
We could set up a similar environment in recent versions of Windows using the Windows Subsystem for Linux ("WSL", Bash on Windows). I personally prefer Cygwin for greater portability and ease of configuration. Cygwin's sshd can run as a Windows service, and, as an established project, Cygwin integrates very well with Windows systems (user accounts, filesystems, Windows APIs, etc.).
Working with Code
We can choose from several workflows depending on our tools and comfort-level with the command-line:
Completely text-based—all work performed through the SSH session
Use local tools on files mounted in a remote filesystem
Use local tools and synchronize files
I use the first approach. I'm a heavy Vim user, so I connect to Windows machines over SSH to do my work on the command-line using the tools and environment provided by Cygwin. The availability of tools typically found on Linux simplifies many tasks that are hard to do from the default Windows console. We can write shell scripts to automate tasks that Visual Studio might normally do for us. For example, I wrote a wrapper script around mstest that reads the XML test results and outputs them in a format that's easy to read in a terminal.
If we prefer to use a GUI editor or IDE, we can mount the remote code locally so tools can read and write files as if they were part of the Linux machine's local filesystem. We likely still need to use SSH to execute commands needed to build the projects, but many editors allow us to configure this command as the project's "build" action.
Sometimes a remote filesystem is too slow for effective editing. In these cases, we can synchronize files between the Linux development machine and the Windows host using a tool like rsync or the editor's "upload on save" feature (over SFTP, for example), if available.
Debugging
Everything works pretty well until we try to find a way to debug our applications. As of now, there is no reasonable substitute for Visual Studio's debugger when working with Visual C++ projects. We can debug managed C# applications running on the CLR using MDbg, but no comparable tool exists for C++ programs.
We can try to use gdb (from MinGW, Cygwin, etc.) for basic, low-level debugging of native binaries, like reading memory addresses, but the debugger does not yet support reading Microsoft's debugging symbols, so the debugging experience is very limited. Microsoft began documenting the PDB format a couple years ago, so we may see some compatibility in the future. Even so, it will take a long time to produce a satisfactory alternative to Visual Studio's excellent debugging tools.
For debugging, RDP is currently our best—and probably, only—option. For a more native-feeling experience, we can run Visual Studio using rdesktop (or other RDP client) and seamlessrdp to create a single-window RDP session of the Visual Studio IDE instead of a full desktop which integrates with whatever window manager we're using on Linux.
Sometimes we can get around launching a full Visual Studio debugging session for simple debugging scenarios by adding tracing to our application that outputs values to the console or to a log file. In many cases, this is faster than starting the debugger anyway.
We can also try to use Eclipse's CDT debugger configured for the Visual C++ toolchain. This may enable us to perform remote debugging using an Eclipse instance on the Linux machine. I have never tried this approach, and I expect there may be some issues when the application is linked against Microsoft's libraries.
I don't know all your requirements, but maybe you could use a gdbserver on Windows (from MinGW) and remote debug from VSCode on Linux - or any other environment you like. You can find more details in this post here. (Watch out, VSCode prevents you from running gdb unless it’s signed as mentioned in the first link.)
There is also a Native Debug VSCode extension that could be helpful.
Another solution I can think of is to use Visual Studio Online (free for small teams up to 5 persons) as build server.
As you have said, the other way around is pretty easy and nowadays even officially supported by Visual Studio 2017.
Most probably, the VS remote debugging tools for Windows wont be helpful for you.

Testing Linux shell script in or from Windows environment, without jumping from window to windows

I'm usually using VM/linux to run scripts, copying script using putty
or writing them directly there, but some times too many opened windows is not that comfortable..
I was recently trying to run shell script, using RUN option in Notepad++
to use build in Ubuntu in win10 anniversary, but can't really manage to get the right syntax to do it.. and didn't find any plugin to do so..
I would appreciate if anyone can put me to the right path in this one.
I found that it is also possible to do it using sygwin, by C:\cygwin\bin\bash --login -c "command.sh" but again its an extra software piece... and bit far from natural Linux environment, and slight different paths etc..
there is also a solutions to run some shell IDE using X11 using Xming, to work with Linux VM without switching between the opened windows. but in this case Question is the where can I find a proper shell IDE for linux, capable to run shell scripts directly from it, without living the IDE window, like all other IDE's do ?
any real solution would be appreciated.
It will NOT replace a pure Linux environment but, it is a closest I've seen
https://www.tutorialspoint.com/execute_bash_online.php

Resources