Skip to content
Advertisement

Pause programmatically video player mpv

I would like to know if there is a way to send a message to a running process on linux ? For example, is it possible to programmatically “pause” a video launched with mpv. Answer To control mpv remotely (eg from another terminal session) you can also start it with the option and control it by issuing commands like this:

Python Wlan Manager

Is there a way in python to check whether a Wlan router is accessible? Something like I give as input the SSID and the password and get as response if it has worked or not? Answer Check out the wireless library.

Limit Qlistview to 1 selected item at most

I try to compel the program to select the 1st item(and only it) in the QListview if user’s selection is more 1 and includes the 1st item. The selectionMode flag is multiselection, which means user can select several items in the listview. Below is my code: in the constructor: But this code does not work. It only deselects the last

How do we compile kernel code in C?

I am new to C and Linux. I am trying to compile the below code but it gives some fatal error while compiling. Any help on fixing this appreciated. Here is the code measurecpu.c: I am trying to compile it this way: I get this error: Answer I am trying to compile it this way gcc -c -O2 -W -Wall

bash script version of forfiles

I’m currently converting a DOS batch script to a shell script and while I have 99% of it working, one part I cannot figure out how to convert over. In the batch file, I have a line that looks like How would I write that for a shell script? Answer Try this, this will delete files without prompting To be

Linux scheduling. (pthreads)

I’m trying to play around with threads and so far, with the code below, I’m doing fine. I want also want to print the current index of the executing thread but I’ve encountered some problems. I’m trying to print the current executing thread along with “Hello world!”. But, the output is this… So far, I’ve already tried issuing What can

How do I configure QT5 without Xlib

I am trying to configure (and build) QT5 static. I want it to draw to the framebuffer and use webkit. I searched the docs but I didn’t find anything on how I can do this without X. Does anyone know a way of doing this ? Answer Building Qt statically is totally orthogonal to the platform selection. Depending on your

Advertisement