Skip to content
Advertisement

‘unshare’ does not work as expected in C api

This sequence of commands works: However, the corresponding C program does not work as expected (it seems it does not unmount the previous /proc, and also it provides EBUSY trying to unmount the devpts): I omitted here error checking for readability I think that unshare or unmount does not work as expect: even if it returns zero, it seems that

Protractor Js run to linux machine

I have protractor tests in my angular project, and when I would like run it i catch next exception log: And before it I see browser window with next url: data:,. UPD protractor.conf.js UPD2 If I use seleniumAddress: ‘http://localhost:4444/wd/hub’, I catch next exception: Help me please run this test in my pc. Thanks a lot. Answer If you want to

How to read from serial device in C++

I’m trying to figure out how I should read/write to my Arduino using serial communication in Linux C++. Currently I’m trying to read a response from my Arudino that I “trigger” with I’ve tried looking at the response from my Arduino in my terminal, by using the following command: This is working as it should. Now I want to do

ls command ignore specific directory [bash]

Tree: ls : Ignore specific file: ls -I c.txt : Ignore specific directory: ls -I Tests : (does not work – Tests directory should not appear) Answer The “man page” for the ls command explains that the -I flag accepts a pattern. So you can use a wildcard in your command: See: man ls or the commands online man page

Getting number of pattern matches in VTE search

I’m developing a GTK+ 3.0 application that uses VTE widget, how can I get the number of occurrences for the search regex or at least get the current text in terminal and process that? I’m using VTE 2.91 and Vala. Answer Vte.Terminal.get_text() will get you the currently visible text in the terminal for processing. I’m not sure that that includes

Module not found when I do a modprobe

I am trying to install this module: https://github.com/mkottman/acpi_call I did a make, make install. I then saw acpi_call.ko is in /lib/modules/4.3.3-5-default/extra/. When I do a modprobe acpi_call I get modprobe: FATAL: Module acpi_call not found in directory /lib/modules/4.3.3-5-default Tried putting acpi_call.ko in /lib/modules/4.3.3-5-default but got the same result. I would like to make it persistent so that when I reboot,

How to cross-compile with SDL 2 from Linux for Windows

I tried to compile a simple C++ program that uses SDL 2 with the mingw-w64-g++ compiler on my Arch Linux (64bits). For this I downloaded SDL2-devel-2.0.4-mingw.tar.gz from here prog.cpp: Makefile: Now making gives the error: Why undefined reference to `SDL_main’ ? Although I specified -lSDL2main ? What did I do wrong? 🙁 Answer Okay, it was because of the main

Advertisement