OpenBSD window managers - window-managers

I am getting started with OpenBSD (using VirtualBox) and would like to know how one can try and choose between the window managers FVWM, TWM and CWM.
In order to run a specific window manager:
Is there some configuration file to modify?
Or some specific command to run?
There is a lot of information on the net, but nothing clear in what I read.

The simplest way to run X on OpenBSD is with the xenodm display manager. Enable it at boot :
# rcctl enable xenodm
# rcctl start xenodm
After that, you can customize your X session by creating a $HOME/.xsession script to start your window manager. Example with FVWM :
export ENV=$HOME/.kshrc
exec fvwm
See xinit manpage and FAQ for the X Widnow System.

Related

Problems with running Qt on CentOS 7

from PyQt5.QtGui import QGuiApplication
app = QGuiApplication([])
When starting, it gives an error
qt.qpa.screen: QXcbConnection: Could not connect to display
Could not connect to any X display.
Tell me how to fix this? I could not find it.
Looks like the DISPLAY environment variable is not set. Are you running this from a graphical session? If you are running this over SSH you need to use X11 forwarding.
Assuming it is enabled on the server, you need to run ssh with the -X option.
You can find more information about this on ssh man page.

The clock of computer restarted and CentOs can't boot GUI

My computer's clock has been restarted, after this restarting I turn on my computer and waited for my CentOS to boot. but I face a black page which contains :
****An error ocurred during the file system check.
**** Dropping you to a shell; the system will reboot
****when you leave the shell.
****Warning -- SELinux is active
****Disabling security enforment for system recovery.
**** Run 'setenforce 1' to reenable. Give root password for maintenance (or type Control-D to continue):
I typed my password and I face #root line in the very black page.
I really need my CentOs work in GUI . Please help me.
If you have access to a root shell, try this command: "fsck -a" It will try to automatically fix error on your filesystem.

How to start a GUI software on a remote Linux server via SSH?

I am trying to open Matlab software installed in remote Linux server from my Windows 7 PC. I am using SSH secure shell to connect with the Linux server. After successful connection, I am able to see and access the folders under my user account. I am able to start Matlab software using the following command in the SSH secure shell window:
[sushma#scorpio home]$ matlab
On doing so the following message gets displayed on the SSH secure shell window:
MATLAB is selecting SOFTWARE OPENGL rendering.
No protocol specified
< M A T L A B (R) >
Copyright 1984-2015 The MathWorks, Inc.
R2015b (8.6.0.267246) 64-bit (glnxa64)
August 20, 2015
From the above message it seems that the software is running. I want to access the GUI of the software.
Give a try to ssh -X
From ssh manual:
-X Enables X11 forwarding. This can also be specified on a per-host basis in a configuration file.
X11 forwarding should be enabled with caution. Users with the ability to bypass file permissions on the remote host (for
the user's X authorization database) can access the local X11 display
through the forwarded connection. An attacker may then be able to perform activities such as keystroke monitoring.
For this reason, X11 forwarding is subjected to X11 SECURITY extension restrictions by default. Please refer to the ssh
-Y option and the ForwardX11Trusted directive in ssh_config(5) for more
information.
-Y Enables trusted X11 forwarding. Trusted X11 forwardings are not subjected to the X11 SECURITY extension controls.
steps that worked for me:
connect to the server by using the ssh -X flag
execute Matlab with matlab & (you should see Matlab opening on your local machine)
check within Matlab with the command opengl info if either software or hardware opengl is being used (if you're having trouble loading opengl go to step 2 and execute matlab -softwareopengl &)
run your gui script with run <script>
If the script is supposed to run independent of your ssh connection, I suggest to use the program tmux and repeat step 2-4 inside a tmux session

putty + xming: cannot connect to Xserver in Windows 7

I am trying to use putty and XMing to run programs from my Fedora 20. I used this configuration before on other machines and I was able to run GUI programs on Linux and display them in my windows 7. But this time I have trouble and get the "cannot connect to X server" error when I try to launch kwrite and kdesvn which are GUI programs in Fedora 20. The connections were good. And the XMing server was running and the X11 forwarding was enabled in putty, like the instruction here.
From my another Fedora 20 machine, I was able to connect to and run GUI programs from the target machine with ssh -X and the same username. So I am thinking the settings of the target machine was right.
Then what else I can try? how to figure out where the problem is?
Ensure that X11 forwarding is enabled in /etc/sshd_config.
X11Forwarding yes
Ensure in your home directory that you have an .Xauthority file. Permissions should be set 0600. If the file does not exist create it.
touch ~/.Xauthority
chmod 0600 ~/.Xauthority
As was previous stated first make sure that X11 forwarding is enabled in PuTTY.
Config > Connection > SSH > X11 > Enable X11 Forwarding. Based on your question it appears you already did this. Make sure you save this config.
I had a problem much like this, what happened to me was that my DISPLAY was being set elsewhere. If you can, try opening a new settion via putty from the same Windows machine using another user and then checking the display and testing your GUI programs
Another thing would be to use your own user but remove any custom work you may have done in your configuration, login fresh, check the DISPLAY and then test X
Did you enable X11 in putty?
It's under SSH | X11 | Enable X11 Forwarding
Then save the putty profile and click on session | save | open
Should work perfectly after you make those changes.

In-memory GUI session for UI automation

I'm automating web-UI testing using Selenium. All our existing non-UI related tests are executed through CLI by SSHing into the machine, and it would be great if there's a way to execute these UI tests through CLI by having an X-session run in memory. Is there such a thing in Linux?
There is, its called xfvb.
Sure. You can run a VNC server and have your browser display on that. Like so
noufal#sanitarium% vncserver
Warning: sanitarium:1 is taken because of /tmp/.X1-lock
Remove this file if there is no X server sanitarium:1
New 'X' desktop is sanitarium:2
Starting applications specified in /home/noufal/.vnc/xstartup
Log file is /home/noufal/.vnc/sanitarium:2.log
noufal#sanitarium% /usr/bin/env DISPLAY=sanitarium:2 /usr/bin/firefox --ProfileManager --no-remote
Xlib: extension "RANDR" missing on display "sanitarium:2.0".
will run a browser on the VNC
If you want to see it, you can do something like
noufal#sanitarium% vncviewer sanitarium:2

Resources