From owner-freebsd-questions@FreeBSD.ORG Wed May 23 09:14:14 2012 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 11EFF106564A for ; Wed, 23 May 2012 09:14:14 +0000 (UTC) (envelope-from cpghost@cordula.ws) Received: from mail-gh0-f182.google.com (mail-gh0-f182.google.com [209.85.160.182]) by mx1.freebsd.org (Postfix) with ESMTP id BA6068FC15 for ; Wed, 23 May 2012 09:14:13 +0000 (UTC) Received: by ghbz22 with SMTP id z22so1408406ghb.13 for ; Wed, 23 May 2012 02:14:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-originating-ip:in-reply-to:references:date :message-id:subject:from:to:cc:content-type :content-transfer-encoding:x-gm-message-state; bh=P2DH0akYvQmnzSf38qxMqkn3RDgG1OI41GZ4W5Psldk=; b=gMYAiXBWvUMiSVnjgH6loyvEs7muW3QZfy/CXexzH3/eC764/iDWE5TYihBpZ6yyxn ZwaG4DCPezgUN20v2HP3xAATcqj8ialwotcbRU6LJTuw3bs1hvP9gzqMYsJUCu5QoO1S RczuE6gz3Fz4SKsinFLmb53QVoBSQ5XYGrqbdj2Bl6b5JeMvsm+leJhgFygP1ISTNzx4 LnMkGLLMmxYl7aK9yPEnvbEkLq5Qqg1nf9GOfZaUC/755NXaxBt9w8AklUY+Oqik04tH CBSqRQmaohb/2v6QJu4tpDxf5/qoVBpz9zlQ9OdqLRd6atekqz/pW2XQWtjjZhAu+KpB N0Yw== MIME-Version: 1.0 Received: by 10.42.157.200 with SMTP id e8mr5814187icx.46.1337764452844; Wed, 23 May 2012 02:14:12 -0700 (PDT) Received: by 10.231.167.10 with HTTP; Wed, 23 May 2012 02:14:12 -0700 (PDT) X-Originating-IP: [93.221.178.66] In-Reply-To: <20120522104441.f05a2f88.freebsd@edvax.de> References: <201205181149.q4IBndvU028665@hera.homer.att.com> <4FB64022.6010206@bananmonarki.se> <4FBB4B8C.3000806@bananmonarki.se> <20120522104441.f05a2f88.freebsd@edvax.de> Date: Wed, 23 May 2012 11:14:12 +0200 Message-ID: From: "C. P. Ghost" To: Polytropon Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Gm-Message-State: ALoCoQkysdfShKS6FTdPsZlMj/05eBHryUOwInbp/R5lzOHas7Ssr/UI1h7qjRAKLhHwnpXJwrmo Cc: freebsd-questions@freebsd.org, Bernt Hansson Subject: Re: Mouse stopped working in X X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2012 09:14:14 -0000 On Tue, May 22, 2012 at 10:44 AM, Polytropon wrote: > On Tue, 22 May 2012 10:17:16 +0200, Bernt Hansson wrote: >> There is a second way of doing this stunt. >> >> Start X >> When X is up and running press CTRL+ALT+F3 or any F* frpm F3 up to F8 >> then you get to the console >> Su to root in the console and type in >> >> /usr/local/etc/rc.d/dbus restart&& =A0/usr/local/etc/rc.d/hald restart >> >> Then press ALT+F9 to get back to X > > So if that is the _solution_, why not try to automate it? > Not tested, just a suggestion: > > Make this the last-1 line in ~/.xinitrc (or ~/.xsession depending > on actual setup), before the "exec" call to the WM / DE, maybe > like this: > > =A0 =A0 =A0 =A0#!/bin/sh > =A0 =A0 =A0 =A0[ -f ~/.xmodmaprc ] && xmodmap ~/.xmodmaprc > =A0 =A0 =A0 =A0xterm & > =A0 =A0 =A0 =A0xsetroot -solid rgb:3b/4c/7a > =A0 =A0 =A0 =A0xset b 100 1000 15 & > =A0 =A0 =A0 =A0xset r rate 250 30 & > =A0 =A0 =A0 =A0xset s off & > =A0 =A0 =A0 =A0xset -dpms & > =A0-> =A0 =A0 sudo /usr/local/etc/rc.d/dbus restart && sudo /usr/local/et= c/rc.d/hald restart > =A0 =A0 =A0 =A0exec wmaker > > It should "happen" when X is running, and it should be > "back to normal" when the WM or DE is launched (and > all background programs have fully started). Yep, that's a good idea... as well as switching to a text console, issue the commands there, and then go back to X. But IMHO, the *real* solution is to fix hald (or its config), so that it tries /dev/sysmouse, or whatever mouse is configured in Xorg.conf, instead of automatically picking some wrong mouse device. I guess the problem stems from the fact, that when moused is running, it has already grabbed the real mouse device (e.g. /dev/psm0) and provides the virtual device /dev/sysmouse. When hald starts the first time, it tries to grab the real mouse device too... and fails because that mouse is already used by moused, and is therefore locked. Only when hald tries to load /dev/sysmouse the second time it is started, will it suc= ceed. Unfortunatly, hald config is pretty black magic to me. I wouldn't touch tha= t with a 10 ft. pole. > -- > Polytropon > Magdeburg, Germany > Happy FreeBSD user since 4.0 > Andra moi ennepe, Mousa, ... Thanks, -cpghost. --=20 Cordula's Web. http://www.cordula.ws/