# xconsole failure in 8.0



## bigearsbilly (Jan 3, 2010)

I can't get xconsole working, 
"Couldn't open console"

the permissions seem OK:


```
crw-------  1 billy  wheel    0,   6 Jan  3 22:30 /dev/console
```

using xdm, release 8.0.
It used to work fine on 7.1 but I seem to remember
a /dev/xconsole??

any ideas?
xterm -C the same:


```
$ xterm -C
xterm: cannot open console: Operation not permitted
```

even if I `chmod 666 /dev/console`
(yes I know the chmod is only till reboot)

???


----------



## bigearsbilly (Jan 13, 2010)

blimey doesn't anyone else keep tabs of console messages?

anyway, it seems to be issues with ioctl TIOCCONS

I just setuid my xconsole binary.
crap solution but there you go.


----------



## LateNiteTV (Jan 13, 2010)

couldnt you just use sudo so you dont have suid bit?


----------



## bigearsbilly (Jan 14, 2010)

I suppose I could, but it's more hassle.
It's only my home machine so I ain't worried.


anyway when I did an *su* and run xconsole it still didn't work.


----------



## bunkerbsd (Mar 20, 2012)

This problem still exists in FreeBSD 9.0.  As noted, the problem is that the TIOCCONS ioctl(2) doesn't do what xconsole expects it to.

Rather than *setuid* the program, I modified the source to USE_FILE instead of USE_PTY (as under "#ifdef ultrix" but with "/dev/console") and uncommented the /dev/console line in /etc/fbtab.

As an aside, building xconsole gives a warning about the definition of openpty(3); this happens because configure tells it to look for util.h but FreeBSD wants libutil.h instead.


----------



## fonz (Mar 20, 2012)

Thanks for the info and suggestions (complaining is one thing, proposing a fix is another). Feel free to contact the port maintainer!

Fonz


----------



## bigearsbilly (Apr 30, 2012)

I was just wondering if the OP submitted a patch?

I would be willing to investigate and have a look at submitting myself if not.


----------

