LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices

Reply
 
Search this Thread
Old 08-22-2008, 01:06 PM   #1
Xert
LQ Newbie
 
Registered: Jan 2008
Distribution: Debian
Posts: 2

Rep: Reputation: 0
Newbie help: Cmake errors & Changing the mouse's dpi


Hey there, new to Debian and I've run into several difficulties. I'm running KDE4.1 on Lenny.

1. I can't change the dpi of my mouseman dual optical for non-root users. Apparently it's a permissions problem, but the instructions in the KDE help file didn't change anything.

Code:
Fixing permission problems on Logitech mice
 Because of the way USB devices work, the code that accesses the current status on Logitech mice needs to be able to write to the mouse. This should be handled by your distribution, but if not, you may need to do some configuration yourself. 
 On a Linux system, you should use the hotplug system to change the ownership and permissions on the mouse entry in /proc/bus/usb. One way to do this is to create a short script (/etc/hotplug/usb/consoleUserPerms) that changes the ownership and permissions, as shown below: 

#!/bin/bash
#
# /etc/hotplug/usb/consoleUserPerms
#
# Sets up newly plugged in USB device so that the user who owns
# the console according to pam_console can access it from user space
#
# Note that for this script to work, you'll need all of the following:
# a) a line in the file /etc/hotplug/usb.usermap or another usermap file
#    in /etc/hotplug/usb/ that corresponds to the device you are using.
# b) a setup using pam_console creates the respective lock files
#    containing the name of the respective user. You can check for that
#    by executing "echo `cat /var/{run,lock}/console.lock`" and
#    verifying the appropriate user is mentioned somewhere there.
# c) a Linux kernel supporting hotplug and usbdevfs
# d) the hotplug package (http://linux-hotplug.sourceforge.net/)
#
# In the usermap file, the first field "usb module" should be named
# "consoleUserPerms" to invoke this script.
#

if [ "${ACTION}" = "add" ] && [ -f "${DEVICE}" ]
then
# New code, using lock files instead of copying /dev/console permissions
# This also works with non-kdm logins (e.g. on a virtual terminal)
# Idea and code from Nalin Dahyabhai <nalin@redhat.com>
    if [ -f /var/run/console.lock ]
    then
        CONSOLEOWNER=`cat /var/run/console.lock`
    elif [ -f /var/lock/console.lock ]
    then
        CONSOLEOWNER=`cat /var/lock/console.lock`
    else
        CONSOLEOWNER=
    fi
    if [ -n "$CONSOLEOWNER" ]
    then
        chmod 0000 "${DEVICE}"
        chown "$CONSOLEOWNER" "${DEVICE}"
        chmod 0600 "${DEVICE}"
    fi
fi


 The usermap file that goes with this is /etc/hotplug/usb/logitechmouse.usermap, as shown below: 

# script           match_flags idVendor idProduct bcdDevice_lo bcdDevice_hi bDeviceClass bDeviceSubClass bDeviceProtocol bInterfaceClass bInterfaceSubClass bInterfaceProtocol driver_info
# Wheel Mouse Optical
consoleUserPerms     0x0003      0x046d   0xc00e    0x0000       0xffff      0x00         0x00            0x00            0x00            0x00               0x00               0x00000000
# MouseMan Traveler
consoleUserPerms     0x0003      0x046d   0xc00f    0x0000       0xffff      0x00         0x00            0x00            0x00            0x00               0x00               0x00000000
# MouseMan Dual Optical
consoleUserPerms     0x0003      0x046d   0xc012    0x0000       0xffff      0x00         0x00            0x00            0x00            0x00               0x00               0x00000000
# MX310 Optical Mouse
consoleUserPerms     0x0003      0x046d   0xc01b    0x0000       0xffff      0x00         0x00            0x00            0x00            0x00               0x00               0x00000000
# MX510 Optical Mouse
consoleUserPerms     0x0003      0x046d   0xc01d    0x0000       0xffff      0x00         0x00            0x00            0x00            0x00               0x00               0x00000000
# MX300 Optical Mouse
consoleUserPerms     0x0003      0x046d   0xc024    0x0000       0xffff      0x00         0x00            0x00            0x00            0x00               0x00               0x00000000
# MX500 Optical Mouse
consoleUserPerms     0x0003      0x046d   0xc025    0x0000       0xffff      0x00         0x00            0x00            0x00            0x00               0x00               0x00000000
# iFeel Mouse
consoleUserPerms     0x0003      0x046d   0xc031    0x0000       0xffff      0x00         0x00            0x00            0x00            0x00               0x00               0x00000000
# Mouse Receiver
consoleUserPerms     0x0003      0x046d   0xc501    0x0000       0xffff      0x00         0x00            0x00            0x00            0x00               0x00               0x00000000
# Dual Receiver
consoleUserPerms     0x0003      0x046d   0xc502    0x0000       0xffff      0x00         0x00            0x00            0x00            0x00               0x00               0x00000000
# Cordless Freedom Optical
consoleUserPerms     0x0003      0x046d   0xc504    0x0000       0xffff      0x00         0x00            0x00            0x00            0x00               0x00               0x00000000
# Cordless Elite Duo
consoleUserPerms     0x0003      0x046d   0xc505    0x0000       0xffff      0x00         0x00            0x00            0x00            0x00               0x00               0x00000000
# MX700 Optical Mouse
consoleUserPerms     0x0003      0x046d   0xc506    0x0000       0xffff      0x00         0x00            0x00            0x00            0x00               0x00               0x00000000
# Cordless Optical Trackman
consoleUserPerms     0x0003      0x046d   0xc508    0x0000       0xffff      0x00         0x00            0x00            0x00            0x00               0x00               0x00000000
# Cordless MX Duo Receiver
consoleUserPerms     0x0003      0x046d   0xc50b    0x0000       0xffff      0x00         0x00            0x00            0x00            0x00               0x00               0x00000000
# MX100 Laser Mouse
consoleUserPerms     0x0003      0x046d   0xc50e    0x0000       0xffff      0x00         0x00            0x00            0x00            0x00               0x00               0x00000000
# Receiver for Cordless Presenter
consoleUserPerms     0x0003      0x046d   0xc702    0x0000       0xffff      0x00         0x00            0x00            0x00            0x00               0x00               0x00000000


 That should be all that is needed on Linux - just copy the files into /etc/hotplug/usb/, and when the mouse is plugged in, the ownership and permissions should be changed so that the user at the console can access the mouse.
2. Cmake doesn't want to work. I installed it via apt-get, but using it returns this message:

Code:
CMake Error: CMake was unable to find a build program corresponding to "Unix Makefiles".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool.
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_C_COMPILER_ENV_VAR
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_C_COMPILER
CMake Error: Could not find cmake module file:/home/xert/lancelot/build/CMakeFiles/CMakeCCompiler.cmake
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_CXX_COMPILER_ENV_VAR
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_CXX_COMPILER
CMake Error: Could not find cmake module file:/home/xert/lancelot/build/CMakeFiles/CMakeCXXCompiler.cmake
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
-- Configuring done
 
Old 08-23-2008, 02:21 AM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,519

Rep: Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495
Welcome to Linux Questions.

add 2.
Well, you get all these errors, when 'cmake'
cannot find anything.
You must have a "build directory" outside
the top - directory of the application.

a) you have "/home/xert/lancelot" and
b) a build : /home/xert/build-lancelot

To make the stuff : 1) 'cd build-lancelot'
2) 'cmake ../lancelot/' => pay attention <= EDIT !
to the 2 dots, to get the path to "lancelot"
3) 'make' ... 'su' ... 'make install'

As non of your questions are Debian specific,
I will suggest starting a new thread with
the mouse issue in "Linux > Hardware"

Good Luck !

P.S.: There is a package for lancelot :
http://c.imagehost.org/download/0430...817-1_i386.deb

Last edited by knudfl; 08-24-2008 at 11:56 AM.
 
Old 08-24-2008, 11:56 AM   #3
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,519

Rep: Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495
I am sorry, made a print error :

'cmake ../lancelot/' is correct.

Regards
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ISO C++ make errors and CMake generated Makefile xpromisex Programming 2 04-15-2007 06:48 PM
How to stop DPI from changing on resolution change arobinson74 Linux - Software 9 03-15-2007 05:22 AM
Changing the dpi budhusa Linux - General 5 11-13-2006 01:27 PM
Changing KDE's DPI Setting? Kamex Linux - Software 1 08-11-2005 08:40 AM
what's difference between 75 dpi and 100 dpi fonts? webazoid Linux - Software 0 07-06-2004 10:26 PM


All times are GMT -5. The time now is 12:08 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration