I recently installed fvwm on Fedora Core 3. Compilation and installation was succeful but, when I try to start fvwm, I get the following error:
Can’t open display
I first set the $DISPLAY variable (export DISPLAY:my_host:0.0) but the result is the same.
Any suggestoins are welcome. Thanks.
You must run fvwm as the user which is currently running X11. So presumably you’re still logged in as root, when actually you’ve already got an X11 instance running as another user.
– Thomas Adam
Yes, I am logged in as root but don’t have any other running instances of X11 as another user.
Why are you logging in as root? That instantly negates many security advantages Linux has over “the other” OS.
If you’re running Fedora Core, you probably have at least one of either xdm, kdm or gdm installed. Try running one of them from the command line and then log in from there.
Alternatively, put the line
exec & /usr/bin/fvwm(depending on where the fvwm executable is - if you built it yourself it’s probably in /usr/local/bin) in ~/.xinitrc, then type startx.
That seems an odd place for an ampersand. I’d write
exec /usr/bin/fvwm > $HOME/.fvwm.log 2>&1
or somesuch. The exec means you don’t get a useless bash process sitting waiting for fvwm to terminate and using up resources. There’s no point in running it in the background, since exec means there’s nothing for it to be in the background of. And putting the & after the exec means the exec command would try and run asynchronously and fail with no argument (because & is a command terminator) while the fvwm invocation runs synchonously - ie in the foreground of the shell - which defeats the point of either exec or &
Either that or you’re doing something devastatingly clever and I’m too thick to see it. I could be persuaded either way
Nope, Google agrees with you. I’d picked that line up from a site somewhere and never really questioned it. Thanks!