Use xinitrc to launch single C program

347 views Asked by At

My goal is to launch a C program and only a C program with X.

I can't use the startx as a wrapper trick, so I'm using xinitrc.

When I used xinitrc to start lxterminal, it works flawlessly. So just:

#!/bin/sh
lxterminal

However, replacing lxterminal with my c program causes the connection to the X server to be lost:

#!/bin/bash
./c.exe #also tried full path

Also, any attempt at launching lxterminal and having it run the command to execute my c program have also failed, with x crashing/failing. I've tried the --command option and the -e option.

Anyone have any idea as to how to do this?

UPDATE: So after it fails, if I issue a shutdown now, and use ctrl-d to continue, it starts up lxterminal with the specified command and my c program runs. wtf?

UPDATE 2: After doing that shutdown nonsense, now it just boots and works as intended. I have no idea what happened.

0

There are 0 answers