* [Qemu-devel] niggles
@ 2004-06-21 14:14 Bob Barry
2004-06-24 11:52 ` [Qemu-devel] Re: qemu - patch to restore tty flags Hetz Ben Hamo
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Bob Barry @ 2004-06-21 14:14 UTC (permalink / raw)
To: qemu-devel
[-- Attachment #1: Type: text/plain, Size: 947 bytes --]
I'm generally amazed and impressed by qemu, but I've noticed a couple of
user-unfriendly quirks which should be eliminated:
1 - If I su to root and invoke qemu without remembering to "xhost +" first,
the screen goes black, the keyboard is completely unresponsive, and
I cannot go to a terminal session or kill the X-server. Attached patch
vi.c.ckXauth.diff causes quemu to show error and exit gracefully instead
of locking the machine.
2 - After using qemu and exiting normally, if I try "su", I get:
asterix:msdos> su - toor
Password:
su: Authentication failure
Sorry.
I ran "env > ~/env_before_qemu" before running a qemu session, and
"env > ~/env_after_qemu" after exiting the session, and found the
before and after files identical. The host is Gentoo Linux, kernel 2.6.7.
Can someone suggest how to find (and restore) what's been changed?
Thanks,
Bob Barry
[-- Attachment #2: vl.c.ckXauth.diff --]
[-- Type: text/x-diff, Size: 735 bytes --]
--- /usr/portage/distfiles/cvs-src/qemu/vl.c 2004-06-21 07:26:53.000000000 +0200
+++ vl.c 2004-06-21 13:23:02.009842912 +0200
@@ -38,6 +38,8 @@
#include <sys/mman.h>
#include <sys/ioctl.h>
#include <sys/socket.h>
+#include <X11/Xlib.h>
+#include <X11/Xlibint.h>
#ifdef _BSD
#include <sys/stat.h>
#include <libutil.h>
@@ -2654,6 +2656,15 @@
if (nographic) {
dumb_display_init(ds);
} else {
+ Display *dpy;
+ dpy = XOpenDisplay(NULL);
+ if (!dpy) {
+ fprintf (stderr, "%s: unable to open display \"%s\".\n",
+ argv[0], XDisplayName(NULL));
+ exit (1);
+ } else {
+ XCloseDisplay(dpy);
+ }
#ifdef CONFIG_SDL
sdl_display_init(ds);
#else
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Qemu-devel] Re: qemu - patch to restore tty flags
2004-06-21 14:14 [Qemu-devel] niggles Bob Barry
@ 2004-06-24 11:52 ` Hetz Ben Hamo
2004-06-26 18:06 ` [Qemu-devel] qemu - patch to check X authorization Jim C. Brown
2004-06-26 18:11 ` [Qemu-devel] qemu - patch to restore tty flags Jim C. Brown
2 siblings, 0 replies; 6+ messages in thread
From: Hetz Ben Hamo @ 2004-06-24 11:52 UTC (permalink / raw)
To: bobb; +Cc: qemu-devel
Patch added to web page. Please update me for any changes..
Thanks,
Hetz
Bob Barry wrote:
> Hetz -
>
> The following patch restores the tty flags so that "su" works normally after a qemu session.
> The patch is against 20040624 CVS. It works on Gentoo x86 Linux, kernel 2.6.7; I can't test
> other architectures.
>
> Thanks,
>
> Bob Barry
>
>
> Patch "patch-qemu-restore-tty" restores the tty flags so that
> "su" works normally after a qemu session.
>
> The patch is against 20040624 CVS.
>
> My setup is Gentoo x86 Linux, kernel 2.6.7 - I can't check other
> distributions or architectures.
>
> Bob Barry <bobb@absamail.co.za>
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] qemu - patch to check X authorization
2004-06-21 14:14 [Qemu-devel] niggles Bob Barry
2004-06-24 11:52 ` [Qemu-devel] Re: qemu - patch to restore tty flags Hetz Ben Hamo
@ 2004-06-26 18:06 ` Jim C. Brown
2004-06-27 7:48 ` Bob Barry
2004-06-26 18:11 ` [Qemu-devel] qemu - patch to restore tty flags Jim C. Brown
2 siblings, 1 reply; 6+ messages in thread
From: Jim C. Brown @ 2004-06-26 18:06 UTC (permalink / raw)
To: bobb, qemu-devel
On Fri, Jun 25, 2004 at 09:12:19AM +0200, Bob Barry wrote:
> Hetz -
>
> The following has been submitted twice before, but seems to have
> passed unnoticed:
>
> If I "su" to root and invoke qemu without remembering to "xhost +" first,
> the screen goes black, the keyboard is completely unresponsive, and
> I cannot go to a terminal session or kill the X-server. The following patch
> causes qemu to display an error message and exit gracefully instead of
> locking the machine. The patch is against 20040625 CVS. It works on
> Gentoo x86 Linux, kernel 2.6.7; I can't test other distributions or architectures.
>
> Thanks,
>
> Bob Barry
>
That doesn't happen to me. When I try that, I get a few messages from Xlib
saying that it can't open the X server and then a message from SDL saying that
its quitting. I don't have the problem that you do.
Your patch requires that the user must have X and assumes that SDL uses X/Xv.
--
Infinite complexity begets infinite beauty.
Infinite precision begets infinite perfection.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] qemu - patch to restore tty flags
2004-06-21 14:14 [Qemu-devel] niggles Bob Barry
2004-06-24 11:52 ` [Qemu-devel] Re: qemu - patch to restore tty flags Hetz Ben Hamo
2004-06-26 18:06 ` [Qemu-devel] qemu - patch to check X authorization Jim C. Brown
@ 2004-06-26 18:11 ` Jim C. Brown
2 siblings, 0 replies; 6+ messages in thread
From: Jim C. Brown @ 2004-06-26 18:11 UTC (permalink / raw)
To: bobb, qemu-devel
On Thu, Jun 24, 2004 at 12:04:58PM +0200, Bob Barry wrote:
> Hetz -
>
> The following patch restores the tty flags so that "su" works normally after a qemu session.
> The patch is against 20040624 CVS. It works on Gentoo x86 Linux, kernel 2.6.7; I can't test
> other architectures.
>
> Thanks,
>
> Bob Barry
>
I don't see this problem. I can su fine after running qemu. I'm running kernel
2.4.26 and glibc 2.3.2 tho.
--
Infinite complexity begets infinite beauty.
Infinite precision begets infinite perfection.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] qemu - patch to check X authorization
2004-06-26 18:06 ` [Qemu-devel] qemu - patch to check X authorization Jim C. Brown
@ 2004-06-27 7:48 ` Bob Barry
2004-06-27 17:42 ` Jim C. Brown
0 siblings, 1 reply; 6+ messages in thread
From: Bob Barry @ 2004-06-27 7:48 UTC (permalink / raw)
To: jbrown106; +Cc: qemu-devel
Jim -
On Saturday 26 June 2004 20:06, you wrote:
> That doesn't happen to me. When I try that, I get a few messages from Xlib
> saying that it can't open the X server and then a message from SDL saying that
> its quitting.
That is the way it should work. Mine didn't. The patch makes mine behave like yours.
> I don't have the problem that you do.
Then your SDL must be different from mine. Qemu should not lock any system, so
the patch is beneficial for systems like mine, and there are probably a lot of them.
My SDL is libsdl-1.2.7 with a few Gentoo patches. Even if the SDL source is
patched to act like yours (and it should be), there will still be a lot of qemu users with
old SDL who should be accomodated.
> Your patch requires that the user must have X and assumes that SDL uses X/Xv.
If there are systems without X which can run qemu with SDL, then the patch code
should be excluded from them with "#ifdef". Are there such systems?
Thanks,
Bob Barry
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] qemu - patch to check X authorization
2004-06-27 7:48 ` Bob Barry
@ 2004-06-27 17:42 ` Jim C. Brown
0 siblings, 0 replies; 6+ messages in thread
From: Jim C. Brown @ 2004-06-27 17:42 UTC (permalink / raw)
To: bobb, qemu-devel
On Sun, Jun 27, 2004 at 09:48:31AM +0200, Bob Barry wrote:
> Jim -
>
> On Saturday 26 June 2004 20:06, you wrote:
> > That doesn't happen to me. When I try that, I get a few messages from Xlib
> > saying that it can't open the X server and then a message from SDL saying that
> > its quitting.
>
> That is the way it should work. Mine didn't. The patch makes mine behave like yours.
As you say below, it's an SDL bug and should be fixed.
>
> > I don't have the problem that you do.
> Then your SDL must be different from mine. Qemu should not lock any system, so
> the patch is beneficial for systems like mine, and there are probably a lot of them.
> My SDL is libsdl-1.2.7 with a few Gentoo patches. Even if the SDL source is
> patched to act like yours (and it should be), there will still be a lot of qemu users with
> old SDL who should be accomodated.
I have libsdl-1.2.2 .... the bug was clearly introduced in a later version.
Of course, we could have the configure script detect the SDL version, and if
that version is known to have this bug (and we are on an applicable platform)
then it could turn on the #DEFINE that would compile the patch. (I think
this was already suggested, in fact... can't remember.)
>
> > Your patch requires that the user must have X and assumes that SDL uses X/Xv.
> If there are systems without X which can run qemu with SDL, then the patch code
> should be excluded from them with "#ifdef". Are there such systems?
I know of only one - the windows port of qemu. You're right here though, a
few simple #ifdef's or #ifndef's would do the trick.
Of course, it could be trickier if someone decided to let qemu use the framebuffer
or the SVGAlib interface on Linux... (SDL supports this but apparently qemu
does not atm).
>
> Thanks,
>
> Bob Barry
>
>
> _______________________________________________
> Qemu-devel mailing list
> Qemu-devel@nongnu.org
> http://lists.nongnu.org/mailman/listinfo/qemu-devel
--
Infinite complexity begets infinite beauty.
Infinite precision begets infinite perfection.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2004-06-27 17:47 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-06-21 14:14 [Qemu-devel] niggles Bob Barry
2004-06-24 11:52 ` [Qemu-devel] Re: qemu - patch to restore tty flags Hetz Ben Hamo
2004-06-26 18:06 ` [Qemu-devel] qemu - patch to check X authorization Jim C. Brown
2004-06-27 7:48 ` Bob Barry
2004-06-27 17:42 ` Jim C. Brown
2004-06-26 18:11 ` [Qemu-devel] qemu - patch to restore tty flags Jim C. Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).