I have a RaspberryPi and want to display an image fullscreen without xserver – so write it directly to the framebuffer. No problem here. But setting it fullscreen doesn’t work. yields: So I use resulting in If I now use fbi to display an image, or just fill the framebuffer /dev/urandom >> /d…
Tag: linux
Get the PID of a process started with sudo via ssh
I need the process id of a process (here sleep 20) started remotely via SSH and sudo. date is inserted to illustrate the duration of the SSH connection. Without connection there is also no process on my remote machine, of course. On a second machine the last, complete command works fine: Any suggestion why th…
Python how to pass in an optional filename parameter when running a script to process a file
I have a python script that processes an XML file each day (it is transferred via SFTP to a remote directory, then temporarily copied to a local directory) and stores its information in a MySQL database. One of my parameters for the file is set to “date=today” so that the correct file is processed…
Protect website files on linux hosting server
l have a website that is hosted in linux server, and my root is (/home/MyAccountName). My website allows users to upload there c++/c code, compile, and execute it. The problem is: The executed user’s program will have all the owner permissions (read – write -execute). so if the user’s code i…
Sed command in linux
How do I extract URL’s from a file? My file name is URL_name.txt This file has a lot of url inside. It looks like this: Here is my idea, I want to remove everything before URLs then I can remove everything after URL. How do I use sed command deal with it? The output should be http://www.google.com/ http…
check if a file is jpeg format using shell script
I know I can use file pic.jpg to get the file type, but how do I write an if statement to check it in a shell script? E.g. (pseudo code): Answer Try (assumes Bash v3.0+, using =~, the regex-matching operator): If you want to match file’s output more closely: This will only match if the output starts wit…
compile error in VeridisBiometricSDK_5.0_Linux sample: MatchingExample
I try to use VeridisBiometricSDK_5.0_Linux which is free Biometric library which has samples I tired to compile MatchingExample by doing exactly what the Readme file said : make MatchingExample.cpp but I have this error result: To compile use: make For example: make AsyncCaptureExample The output will be gene…
How can I check (and delete) if the last line (that contains the last occurence of a string) has a comma as last character?
I’ve been looking all over the internet but had no result. I’m trying to build a package generator (in shell/bash) and that respective package contains (one or more) json files. When browsing through a json file, if the user wants to delete one of the steps I must first take into consideration wha…
‘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: eve…
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 te…