How to Add Another Keyboard Layout (Arabic for instance) Alongside the Default us, on Virtual Console? - layout

OS: arch linux
kernel: 6.1.x86_64
Virtual Console
As far as System Administrators concern, when dealing with bunch of servers on a Virtual Console environment (vconsole), sometimes it troubles them when they wish to toggle between two, or more, keyboard layout. For example, us layout for terminal commands and configuration, and Arabic|Spanish|Turkish for documenting their session for their peers.
The issue here is how to configure none X-window-manager (virtual console) to toggle between two different keyboard layouts.
To get rid of confusing, I've discovered that the virtual console keymap handled by kdb, is different than the keyboard layout used by DE/WMs, which is handled by XKB.
I've tried to use options between the two systems but that was just a waste of time.

Related

How to write key input in assembly?

I'm trying to make a keyboard driver for windows & linux as a project, I was looking to simulate the actual process of writing a key (meaning not using anything such as windows messages), and after move on to the waiting for input from keyboard which I found alot of tutorials for.
Anyone know hot to do this for Windows & Linux? (running intel proc win10 64bit & kali linux amd proc 64bit)
You cannot have the same driver on Windows and on Linux. You'll need to make two different, unrelated, programs and you have to design them differently (because Windows and Linux have different architectures for drivers).
BTW, on Linux, with a graphical desktop, a display server (such as Xorg or Wayland) is running. That server is the only program handling the physical keyboard. You might consider working with it.
The actual notion of keyboard driver is too broad to make a concrete sense. On Linux, you could patch the kernel, patch the display server, improve the window manager, etc... There is no need, and not much interest, in coding that stuff in assembler.
Notice that on Linux, with a graphical desktop, the keyboard layout is handled in the display server, not in kernel code (so the kernel is sending key events with keycodes close to scancodes, not characters; the Xorg server sends keyboard events with similar keycodes to e.g. the window manager). Read more about the X Window System protocols and architecture and e.g. EWMH. The graphical layers are very complex (both on Linux and on Windows), many millions of lines of code.

How does xTerm communicate with the XWindows session that contains it?

I want to script opening chromium in kiosk mode under Linux (openSUSE 12.3) and XWindows, while controlling which monitor chromium appear in. I also need to have this script be run outside of a standard xterm, e.g. via ssh into the machine where chromium AND the display will run (i.e. I want the application to appear on one of the displays of the machine I'm connecting to, not the machine I'm connecting from).
I can do everything I want by hand in xterm on the target machine, but I won't be running these scripts in xterm. Somehow, the xterm environment is special: it knows how to talk to the containing XWindows session, and in fact knows which actual monitor it is hosted on. For example:
When I ssh into the machine and try to run an XWindows GUI on the target machine's display, it (reasonably) complains "Can't open display". However, even when I set the DISPLAY environment variable to the same value I see in xterm, I still get the error (although it now includes the current DISPLAY value). I've also tried setting DISPLAY to a variety of permutations on ":X.Y", where X and Y are small integers, but again to no avail.
If I run chromium in --kiosk mode from xterm, it takes over the monitor that currently contains the xterm window. If I drag xterm to my other monitor then chromium will launch in that monitor. I want that control when I launch chromium from my script, but can't figure out the background magic.
For window manipulation, I've seen suggestions to use wmctrl or devilspie, but I'm a bit nervous about depending on tools that haven't been updated in years. I'd also prefer to have chromium launch in the right place right off the bat, rather than having it appear in the wrong place and then be moved. And neither app can help me launch the app remotely.
So, here are the questions. First, how does xterm tell chromium how to connect to the right XWindows session and monitor? Second, how do I simulate that from a completely separate ssh connection? (Again: it's more than just the DISPLAY variable.)
Thanks,
Dan
You can't open X client on the target machine's display because of permissions: not anyone that can ssh into a machine may "take ownership" of it's screen. These are things controlled by xset -- read up on it.
As for the display: I assume that the specific monitor is controlled by the second part of the DISPLAY environment. At least that's what I remember from reading about X. I've never actually worked in a multi-monitor X environment.
Xterm is not special. Your mouse pointer is. Chromium will appear on the monitor your mouse pointer happens to be in. This is probably the default behaviour of your window manager.
Chromium does not respect the usual window position requests. You cannot tell Chromium where to appear, you must tell your window manager where to place the Chromium window. Methods of doing that, if they exist, totally depend on what window manager you have.
If you ssh to your machine as the user that has started the X session, you should have no problem connecting to that session.

How to simultaneously run multiple window managers (esp. xmonad) for VNC

I'll start with a little background. A small project of mine has been to try to use my Android tablet as an external monitor for my laptop using a VNC client (vnc4server). There are two main options for doing this that I have seen. The simplest is to use xrandr and widen the screen, creating a section just for the tablet. However, this can cause some graphics issues if I understand correctly, although it has the benefit of permitting windows to cross displays. The other option is to run a separate desktop session for the VNC server.
I have chosen to go the route of a second desktop as the session can live and die without significantly affecting my main session and can in theory be tailored specifically to the tablet. A little tool called x2vnc allows me to connect to the VNC server in a similar manner to the more popular Synergy and use it like a n external monitor. I also have the nice little benefit of being able to easily and cleanly switch from landscape to portrait using xrandr.
This brings me to my current issue. So far, I have only been able to reliably use plain x-windows. Although this is entirely functional, I would prefer something more complete. Although xstartup examples have been posted for a variety of window managers, none of these seem to run properly. I suspect all of these are for headless systems. Gnome/Unity are each unforgivably slow and seem to conflict with my existing session. I also feel that these are a little too cluttered for my ten inch tablet. On the other hand, Xmonad simply crashes as soon as I try to open a second window in addition to not updating the graphics properly.
I would like to know anything that will lead me in the direction of a better stable desktop environment. This includes configuration tips and alternate window managers.
I am currently running Ubuntu 12.04 with gnome-xmonad (recently Unity). My xstartup is plain x-window-manager. I have tried any readily available examples for gnome and xmonad that I have been able to find.

is there a way to pause gnome from other tty?

To run a virtual machine on my computer and to have more resources for it, I'd like to pause gnome. The idea is to go on other tty pause gnome from it and run my virtual machine with lower ram for the host than necessary with the use of gnome.
I did not found anything, I supposed it is not possible. But I'd like to be sure. That's why I ask the question here
My OS is linux mint 13.
Have a good day.
There isn't any way currently to freeze a process to disk on Linux and remove it from RAM, and even if there was, what you call GNOME is made up of many processes and programs that are all running at the same time so trying to co-ordinate what processes you needed to freeze would be tricky
If you want to have more resources for your VM, you could sign out of Gnome and use another Desktop Environment while you use the virtual machine. If you used window maker you would save hundreds of megabytes of ram. Window Maker only uses a few megabytes, and takes very little disk space.
If you do use Window Maker, then it is a little confusing at first. To access your applications, right click on the desktop, to get a menu. There is an application dock on the side of the screen, but by default it only holds an xterm launcher.
If your application is not in the applications menu, then you will need to start it using xterm. When is icon appears, drag it to the dock, and you will be able to launch it from there. To edit the application menu you need to right click on the desktop and select Configure Window Maker.

Will I be able to successfully run this Ubuntu (linux) setup in Virtualbox?

Have 4 DVI output. Seems I hopefully will have driver support on this. Details are sketchy online about supporting 4 outputs, but seems possible.
My question is from the Linux group and Virtualbox pros.... Will the seamless method of VirtualBox allow me to use all 3 of my monitors for multiscreen. I'd like to stick with Ubuntu and run Visual C# and other tools from my VirtualBox. Compiz effects are just too amazing to want Aero Glass.
What do you think, will my system be able to use the multiple monitors with VirtualBox and this graphics card? I've googled for hours and am still searching for answers.
Edit:
I tried virtualbox last night. Pretty slick, though I had an error in installing Visual C#NET. However, it wouldn't let you drag between multiple screens??? Is this something the host must resolve, or does the guest session need to have special settings for multiple monitors? Haven't been able to find anything in google supporting multiple monitors with virtualbox.
You should be able to configure your screens just fine. Don't know the exact details for an ATI setup, but you should be able to use Xinerama to create a single large virtual desktop, and then just run VirtualBox (though honestly, I prefer KVM, which runs on modern CPUs which provide native virtualization support) full-screen on one of those monitors. You would then be able to have three screens dedicated to Ubuntu, and the forth dedicated to Windows.
You might want to look into the non-Xinerama method of multiple displays. Each display is then treated as its own screen (so you'd have :0.0, :0.1, :0.2, and :0.3 for your X displays). You cannot move applications between the screens, but you get four independent desktops. I personally find that more useful than the idea of a single stretched desktop over multiple displays; when I used a laptop as my primary system, that's what I did, and when I get a second monitor for my computer, I'll likely return to that means of doing things. You'll have to investigate the specifics for such a setup with ATI, but the X server supports it, so it's just a matter of looking at your ATI driver's documentation to put the pieces together.

Resources