Disabling the linux virtual console completely - linux-kernel

I have a raspberry pi, which listens on the network and plays videos on hdmi when told.
This is accomplished with omxplayer, without X11.
I want to make the screen completely back at all times except when omxplayer is showing something. By default there were a getty, linux debug output, a blinking cursor, a raspberry logo etc showing on the hdmi output. I have managed to disable everything with several cmdline.txt options.
However, it feels like a whole bunch of workarounds. I would like to disable the text output to the screen altogether in linux, like disabling the virtual terminal and the console altogether. Just like there is nothing on the 3.5mm sound output by default I don't want anything on the hdmi. Is this possible?

You have to recompile the kernel.
After enabling CONFIG_EXPERT, you can disable CONFIG_VT.

Check out this question for details on how to disable the VT console.
For my specific system (i.MX6), getty was still being initialized on tty1 so I had to disable it on startup:
systemctl stop getty#tty1.service
systemctl disable getty#tty1.service
You can also disable the framebuffer through a bootloader option. I'm not sure which bootloader the RPi uses but you can look into the fbcon parameter.
The default might be fbcon=map:1 in which case you should to map it to a different fbdev device. This should remove the VT console entirely.

Related

Can I detect when my webcam is used by a program on Mac OS?

Is there a way to detect when a webcam is being used.
When I join a video call or use Photo Booth, the leds on my Logitech C920 (usb) webcam turn on, I would like to be able to detect that so I can automatically change the color of my "smart" lights.
Either through command line or something that I code, I have done some research but haven't found anything that seems to work.
You can use the is-camera-on-cli package from the CLI.
Example:
$ is-camera-on
✔ Camera is on

raspberry pi3 can not launch application on primary HDMI Display, can launch on remote using ssh -x

I had built console core image for raspberry Pi3, and I am able to boot the Rpi3 successfully using SD card.
I have created an electron app which is able to launch on remote display over ssh.
However when I launch the application on Monitor connected through HDMI Cable, It gives following error
Can not open Display :0.0
I have seen many people asking this question for not able to launch on remote display, which works fine in my case.
Can anyone help in this?
With console core, you don't have an X server running to display on.
You can upgrade your system to include the X installation -- search for 'install pixel desktop' -- or you could just refresh the card with the lite or full image.
If you set the Pi to auto login to the pi account, you can start your application on login by adding it to the bottom of .xinitrc. You could also start it from a remote ssh, displaying on the local display, by setting DISPLAY=:0 in the environment before you start. You'll need to explore the world of X Windows authentication to make this work. See the man page for the xhost command, for instance.
(This is an expansion of LetoThe2nd's comment, which probably should have been an answer instead.)
Console core image means that there is no xserver running, and hence no display :0. Try getting started with core-image-x11 maybe, or whatever suits the RasPi.

VLCKit-based app prevents screensaver

I've recently built a simple Swift macOS app based upon VLCKit; its purpose is mainly to play IP camera streams via RTSP in a window that stays always visible on screen (i.e. to monitor a gate).
Given the purpose of the app, I keep the streaming playing all the time, except when the user minimizes it in the Dock (meaning that I only call mediaPlayer?.stop in viewDidDisappear).
The app works very well, but I've recently discovered that, unless it is minimized (and, as a consequence, the playback is already stopped), something prevents the screensaver from running.
I've tried subscribing to all NSNotificationCenter com.apple.screensaver.* notifications, and I've realized that when the playback is running, none of them is fired; if I minimize the app and stop the playback, everything behaves normally (screensaver starts after the regular delay, all the com.apple.screensaver notifications are properly detected).
I've also tried running pmset -g to check if my app was listed as preventing sleep, but it's not.
My impression, but I might be wrong, is that my instance of VLCMediaPlayer by default prevents the screensaver launch.
I know that in the VLC Mac app the screensaver can be manually prevented via an advanced setting, but I can't seem to be able to find a parameter to set in my code to tell VLCKit to stop blocking the screensaver.
To your knowledge, by default VLCKit prevents the screensaver from running? Is there a way to alter that behavior?
Please let me know if you need any further detail... and thanks in advance!
In VLC, there are options called "--disable-screensaver" and "--no-disable-screensaver". By default, "--disable-screensaver" is used.
If you want to enable screensaver just do this:
NSArray *options = #[#"--no-disable-screensaver"];
_mediaPlayer1 = [[VLCMediaPlayer alloc] initWithOptions:options];
What else options available in your VLC lib? pass option "--help" to your VLC and it will list all available options.
What is the full list of options? https://wiki.videolan.org/VLC_command-line_help/
It turned out VLCKit does actually prevent the screensaver from running by default, and that it doesn't use libvlc to do so, so the libvlc option "--no-disable-screensaver" I was at one point trying to pass was not respected.
The solution was to comment out a UpdateSystemActivity() function call on line 1409 of VLCMediaPlayer.m, as suggested to me here.

Is it possible to check status or turn on/off HDCP on Mac OSX?

Is it possible to programatically check status or turn on/off HDCP on Mac OSX? Is there any official Apple documentation on this? I have seen elsewhere someone commented that it is not possible to turn off HDCP in OSx. I am ok with that but I need some definite proof that it is true.
I also know that you can't turn it off. Once I tried to hook the output of a Mac to my device where I have the full control. Then I specified in the EDID of my device that I accept no HDCP protected data. By this way, your source should switch off if the HDCP is not a must on its side. However, that didn't work and I get no output from Mac.

How to put monitor on standby and not let it wake up

I have 3 monitors, but I don't need them all turned on all the time. I can just shut them down with power button, but I want to use their standby mode, like Windows does when we let PC idle for a while - it shuts down monitors, HDD, etc.
But of course, I wanna keep using PC and let just that monitor on standby. Others must remain on and that one doesn't wake up even with me using PC.
Is it possible to do that? It would be great to have a shortcut like Winkey+1, 2, 3 etc to shut down and wake up each monitor.
An existing app with this feature is not likely to exist, but is there a Windows API function that can control monitor state, for each monitor in a MultiMonitor system?
The display control panel applet calls SetDisplayConfig to start or stop forced projection on a particular target
You can probably use MS Detours or some other API hooking tool to inspect the usage pattern of the API while using the applet to adjust display settings.
You'll want to try Display Fusion. You should be able to do what you're asking for using Monitor configurations.
I know I'm late on this but use DDC to control your display. You can easily create hotkeys that send a command via DDC to the display to turn-off. This would be equivalent to turning off the display using the button. Works like a charm for me. The only trick is that DDC command specs vary across monitor manufacturers but its not hard to find the right codes to send with the help of google.
Ready made tools also exist for this; search for anything that is related to DDC or EDID and you should find.
Be aware though that this does not remove the display from Windows which means that apps may find their way onto displays that are off and you will be looking for them.

Resources