Skip to content

Tag: linux

FTP From Local Desktop to Server As Sudo User

I have a file on my desktop that I need to FTP to a server. As I’ve been navigating this server, I need to login with initial credentials to access the box and then needed to run sudo -u [username] ksh to access the folder I need. (No password) In Filezilla however, I only enter credentials once and the…

Segmentation fault (core dumped) C linux

So i have to make a program that execution results are similar to those after using command who and who am i in linux. the problem is that both functions inside if(strcmp… and in else… are working when separated. The main issue is that i have to have them both in one file, and it just not work. Wh…

How to execute sh command set in shell variable?

I have this linux command: candump -l -e -x -s 0 -n 10 any,0~0,#FFFFFFFF 2> /dev/null > /tmp/can.log & It works correctly when I run it directly in shell. I want to add it in my script with this method: When I execute my script I get this error: SIOCGIFINDEX: No such device I have tested these scrip…

global hotkeys using xlib

I’m trying to get my C application to execute certain tasks when the ctrl+k button is pressed(OR CTRL SHIFT K not sure yet), documentation is a bit sccarce but I was able to find a cpp example and tried to mimic that code: I understand the keypresses are captured by the XGrabKey function, the xnext even…