[SOLVED] Problems setting DPI on my Razer Orochi mouse

Hi,
I recently installed Arch on my laptop and configured mostly everything but I can't get the two right buttons on my Orochi to work - they are in charge of changing DPI on the fly (I think usually in chunks of 500 with 2000 as the default max through Bluetooth)
I have scoured the Arch Wiki and Google and I'm at a loss as to how to fix this problem (I click them and they do nothing)
Razercfg currently doesn't support Orochi - It uses Synapse 2.0 on Windows to configure
Anyone have any advice? The on-the-fly DPI change is useful for video games and I'd like to get it working
EDIT: After having a few beers and playing with it some more, I realized that the two buttons are registering as key presses and not button presses. Knowing that, the solution became fairly obvious:
- Run xbindkeys_config (I like the GUI version) and bind these commands to each button:
xinput --set-prop "Razer Orochi" "Device Accel Constant Deceleration" .5
xinput --set-prop "Razer Orochi" "Device Accel Constant Deceleration" 2
Could probably pretty easily write a script to put in more than just two values but that should be enough for my needs
So thanks anyway everyone - and I hope this helps someone in the future
Last edited by Walnut (2014-06-07 01:42:55)

Hi,
I recently installed Arch on my laptop and configured mostly everything but I can't get the two right buttons on my Orochi to work - they are in charge of changing DPI on the fly (I think usually in chunks of 500 with 2000 as the default max through Bluetooth)
I have scoured the Arch Wiki and Google and I'm at a loss as to how to fix this problem (I click them and they do nothing)
Razercfg currently doesn't support Orochi - It uses Synapse 2.0 on Windows to configure
Anyone have any advice? The on-the-fly DPI change is useful for video games and I'd like to get it working
EDIT: After having a few beers and playing with it some more, I realized that the two buttons are registering as key presses and not button presses. Knowing that, the solution became fairly obvious:
- Run xbindkeys_config (I like the GUI version) and bind these commands to each button:
xinput --set-prop "Razer Orochi" "Device Accel Constant Deceleration" .5
xinput --set-prop "Razer Orochi" "Device Accel Constant Deceleration" 2
Could probably pretty easily write a script to put in more than just two values but that should be enough for my needs
So thanks anyway everyone - and I hope this helps someone in the future
Last edited by Walnut (2014-06-07 01:42:55)

Similar Messages

  • [solved] Problem setting up a dedicated ssh proxy user

    I created a user which should only be able to create a ssh SOCKS tunel, with no shell access:
    username: proxy
    User ID: 1000 (or should it be 500?)
    shell: /bin/cat
    password: xxx
    group: users
    The problem is that when I try to ssh to it by
    ssh proxy@ip -vvv
    or set up a tunnel
    ssh proxy@ip -D 9999 -vvv
    I get asked for the password and when I give it, I get:
    debug2: we did not send a packet, disable method
    debug3: authmethod_lookup password
    debug3: remaining preferred: ,password
    debug3: authmethod_is_enabled password
    debug1: Next authentication method: password
    proxy@ip's password:
    debug3: packet_send2: adding 64 (len 58 padlen 6 extra_pad 64)
    debug2: we sent a password packet, wait for reply
    debug1: Authentications that can continue: publickey,password
    Permission denied, please try again.
    I am positive the password given is correct.
    Last edited by Lockheed (2014-06-20 10:05:15)

    Add /bin/cat to /etc/shells

  • [SOLVED] Problem setting up Xorg (following the beginner's guide)

    Ok, so I've moved onto "Step 3: Configure X"...
    I have a concern though...  Didn't nVidia already make a "xorg.conf" file in the previous step when i installed nvidia drivers?  If I follow the instructions in the new steps (Step 3), I creat a new file at /root/xorg.conf.new using the "Xorg -configure" command.  This new file has some similar entries to /etc/x!!/xorg.conf as well as many more new ones.
    What shall I do with these two files? add everything from xorg.conf.new to the xorg.conf created by nvidia-xconfig? Carefully place certain entries from one into the other? I've backed up the /etc/X11/xorg.conf file in case i do something horrible
    I'm not a master of linux (i have just started my first class) but I believe I see some entries that might be conflicting if I combine the files:
    For example, both files have Section "InputDevice" and in either of these sections there is Identifier "Mouse0"
    However, one has option "Device" "/dev/input/mice"
    while the other has option "Device" "/dev/psaux"
    So the two settings are obviously not identical.
    The next thing the Begginer's Guide says to do is copy the new file to the old file:
    cp /root/xorg.conf.new /etc/X11/xorg.conf
    Is this a problem? Will I loose all my nvidia settings if I do this? Can i just put both files together using the "cat" command? Or do I have to manually pick and select the correct values to have in the final /etc/X11/xorg.conf file?
    Won't this over write the configurations that the nvidia drivers wrote to /etc/X11/xorg.conf ?
    Shall I use the cat command to combine the files?
    Side note: The computer freezes on a black screen when testing out the xorg.conf.new file with the following command:
    X -config /root/xorg.conf.new
    it also freezes on a black scren when testing out the real xorg.conf file with the following command:
    X -config /etc/X11/xorg.conf
    Perhaps these tests are premature at this stage until my settings are finalized?
    Can someone tell me what to do with these two files, as the Beginner Guide doesn't (and it's a beginner guide!)?
    In the meantime, I will now attempt to combine the two files (no worries though, I've backed up my files).
    Last edited by trusktr (2010-02-19 07:24:26)

    X doesn't need much information in the config file. Here's my one if you want to try it out (I also have an nvidia card):
    Section "ServerLayout"
    Identifier "Default Layout"
    Screen "Default Screen"
    EndSection
    Section "Module"
    Load "dbe"
    Load "extmod"
    Load "freetype"
    Load "glx"
    EndSection
    Section "Monitor"
    Identifier "Default Monitor"
    EndSection
    Section "Device"
    Identifier "Default Device"
    Driver "nvidia"
    Option "NoLogo" "True"
    Option "TripleBuffer" "True"
    EndSection
    Section "Screen"
    Identifier "Default Screen"
    Device "Default Device"
    Monitor "Default Monitor"
    SubSection "Display"
    Depth 24
    EndSubSection
    EndSection
    Section "Extensions"
    Option "Composite" "Enable"
    EndSection

  • MBP Mouse: Razer Orochi vs Logitech Performance Mouse MX

    Hello
    It has been a week since I started to research a new gaming mouse for my MBP. After going through more reviews than I can remember, I boiled it up to the following 2: Razer Orochi and Logitech Performance Mouse MX.
    Orochi keeps my precious USB ports free (Bluetooth) has a coolest design and better DPI, although the "sleep in 2sec + jerking" issue seems to be really annoying when gaming. The Performance Mouse MX has zero lag/jerking issues, great ergonomics and works on glass! The downside is the USB port sacrifice required by the 2.4GHZ receptor.
    Before throwing the coin on this, I would like to know if anyone has MBP hands-on experience with these fellows. If so, your input would be greatly appreciated.
    Thanks

    I've swayed towards Razer Orochi. After 2 weeks of daily use (MacBook Pro with LEOPARD and "Boot Camp" WINXP), I have yet to find a flaw on this mouse. It delivered on all it's promises. Here's a breakdown of my thoughts on it:
    01 - AESTHETICS AND MISC
    The sleek online pictures at Razer site don't make justice to this mouse. It looks much better in real-life! Couple it with the Razer Kabuto Mouse Mat and your desk will never look the same. The battery top lid is magnetically attached and the USB "Wired Mode" cable is long enough to comfortably circle around my MBP. In terms of ergonomics, Orochi feels great on my big hands. I've found it very comfortable to use with both "fingertip" and "palm" grips.
    02 - FIRMWARE AND DRIVERS
    Let me preface this by saying that "out of the box", with ZERO drivers installed, all 7 buttons worked flawlessly with WINXP. Under LEOPARD, only the "forward and backward" left side buttons didn't work. It's worth underlining that the "Sensitivity Stage" right side buttons worked on both OSs. This means that you can cycle through the 5 preset "Sensitivity Stages" without having to install a single driver! That said, in order to tap into Orochi's full potential, it's imperative to install the latest firmware and drivers. Start by getting the latest v1.06 firmware updater (22/02/2010) from Razer's site (notice you'll need to run this under Windows). Next download and install the latest PC (v1.02, 22/10/2009) and MAC (v2.00, 03/05/2010) drivers. Besides custom macro creation, these drivers also enable full customization of every single button on the Orochi. Starting at v2.00, the MAC driver acquired the same "full features support" one finds in it's PC counterpart. Nonetheless, for reasons I'll explain below, you should avoid using the "Razer Orochi" MAC "Preference Pane".
    03 - CONFIGURATION AND DISABLING ACCELERATION
    Orochi's factory "buttons layout scheme" fitted my needs like a glove. I found no need to tinker with it, although the "Scroll Wheel button" could probably be put to better use. It's "Universal Scrolling" default assignment is uselessly redundant. It's not hard to envision several more productive assignments for it (copy/past, open/close tab, etc). The only 2 settings I ended up by changing were "Polling Rate: 1000 Hz (default 500 Hz)" and "Lightning->Scroll Wheel: ON (default OFF)". I opted not to delve into the "Profiles" and "Macros" sections, even though I'll probably revisit them in a near future. The possibility of creating "per application profile" and "custom macros" are 2 of the most powerful features of this mouse. A shrewd implementation of both will rise your productivity to unprecedented heights.
    In order to take full advantage of Orochi's high-precision "4000DPI 3G Laser Sensor" one must disable mouse acceleration. This allows Orochi to handle all the gliding and pointing bits natively. Assuming the "Enable Acceleration" option on "Razer Orochi Configurator" is left unchecked, there's still the OS mouse acceleration layer to deal with. On the WINXP side, one simply needs to uncheck "Enhance pointer precision" to permanently disable mouse acceleration. Unfortunately things aren't as merry on LEOPARD's side. After hours of research, the solution was finally found in this "Armagetron Forums" thread. In order to roughly homogenize the tracking speed on both OSs, I also set the respective "speed knobs" to 50%. Here are the details for this:
    WINXP
    - Disable Acceleration: Control Panel->Mouse Properties->Pointer Options->Motion-> Enhance pointer precision: OFF
    - Tracking speed at 50%: Control Panel->Mouse Properties->Pointer Options->Motion->Select a pointer speed: 6th notch from "Slow" (11 total).
    LEOPARD
    - Disable Acceleration: Check out this "Armagetron Forums" thread.
    - Tracking speed at 50%: System Preferences->Keyboard & Mouse->Mouse->Tracking Speed: 5th notch from "Slow" (10 total).
    Due to the different "knob sensitivities" of WINXP and LEOPARD, you won't get the same pixel-exact tracking speed on both OSs. Despite that, the "knob at 50%" strategy will get you pretty close. In my personal experience I've found the mouse response to be indistinguishable across WINXP and LEOPARD.
    04 - IN-GAME EXPERIENCE
    Once all configurations were in place, I immediately jumped to a series of thorough in-game testing with "Quake 3" and "Unreal Tournament 2004". Diligently compared "Wired" and "Wireless mode". The former had a noticeable precision advantage. Nonetheless, "Sensitivities Stages" were the clear show-stopper! Switching to the lowest "500 DPI stage" markedly increased my aim in sniper mode. Never before did I got so many "headshots" in a row! Orochi is a literal "killer mouse"! Conversely, the higher sensitivities allowed for lightning fast responses in the heat of "close proximity" battle. This mouse really gives you that extra edge every gamer is looking for.
    The "off the chart" smoothness, responsiveness and accuracy observed in-game was also noticeable during day-to-day usage. It suddenly became clear why some many designers/photographers go with Orochi.
    Many reviews complained about the "sleep in 2sec + jerking" issue. You'll only find it if you actively look for it. It's simply to small of a jerk to be noticed. It will disappear the moment you stop thinking about it. This holds true for gaming and day-to-day usage.
    05 - STAY AWAY FROM "RAZER OROCHI" PREFERENCE PANE
    I've unearthed an uncanny behavior when accessing LEOPARD's "Razer Orochi" preference pane. The mere act of opening it caused the tracking speed to decrease dramatically! In fact, even escalating all the way up to 4000 DPI, the mouse still moved like it was at 1500 DPI! Thankfully, as long as you have access to a WINXP machine, there's a pretty straightforward way to tackle this: simply make sure to always use WINXP driver to configure Orochi. Since the "Synapse On-Board memory" allows one to port settings across OSs, there's really no reason to access LEOPARD's driver at all!
    06 - LOOSE NOTES
    -> Configuration of the Razer Orochi can only be performed in "Wired Mode".
    -> Both WINXP and LEOPARD drivers are capable of writing to Orochi's "Synapse On-Board memory".
    -> The "Sensitivity Stages" work flawlessly on both WINXP and LEOPARD. It's worth to underline the OSD only appears in "Wired Mode".
    -> In "Wireless Mode (bluetooth)": Pooling rate drops to 125ms (125Hz), although you can still cycle through the different "Sensitivity Stages", the OSD will no longer appear.
    -> Clean the laser lens below the Razer Orochi once a month (use soft cloth or cotton swab).
    CONLUSION
    Razer Orochi is simply the best bluetooth "high-precision mouse" out there. If you're are a serious gamer/designer it's a must. Totally worth the price. 5 stars all the way!

  • Problems setting up dual monitors

    I am having problems setting up dual monitors on a band new HP envy 700 using windows 8. I just bought this computer and bought DVI to via adapters to use. Everything is hooked up but nothing is happening on the 2nd monitor. Help!

    Jaimetech3, welcome to the forum.
    When requesting help you should always include the make/model (i.e. p6-xxxx) of the computer and/or monitor. This information is necessary for us to review the specifications of them.
    Signature:
    HP TouchPad - 1.2 GHz; 1 GB memory; 32 GB storage; WebOS/CyanogenMod 11(Kit Kat)
    HP 10 Plus; Android-Kit Kat; 1.0 GHz Allwinner A31 ARM Cortex A7 Quad Core Processor ; 2GB RAM Memory Long: 2 GB DDR3L SDRAM (1600MHz); 16GB disable eMMC 16GB v4.51
    HP Omen; i7-4710QH; 8 GB memory; 256 GB San Disk SSD; Win 8.1
    HP Photosmart 7520 AIO
    ++++++++++++++++++
    **Click the Thumbs Up+ to say 'Thanks' and the 'Accept as Solution' if I have solved your problem.**
    Intelligence is God given; Wisdom is the sum of our mistakes!
    I am not an HP employee.

  • Problems setting up my new iphone 4s

    am having problems setting up my new iphone 4s

    Until you tell us the exact problem you are having, any error messages, and what you have tried to solve your problem, we cannot help you.

  • Problems setting up C8180 software Ps_A10_02_NET_FULL_WIN_WW_130_140uu (311.96mb) HELP!

    Problems setting up C8180 software Ps_A10_02_NET_FULL_WIN_WW_130_140uu (311.96mb) HELP!

    Hello a2fay,
    I see that this is your first visit to the HP Forums.  Let me please take a moment to say "Welcome".
    To help you get the most out of the HP Forums I would like to direct your attention to the HP Forums Guide First Time Here? Learn How to Post and More.
    I see that you are having some issue with installing the printer on to your computer.  So I can better assist you, what is the operating system you are using on your computer. 
    Which Windows Operating System am I running?
    One step that you can try is to run the HP Printer Install Wizard for Windows.
    If you do not have time today to write me back, I hope you have a great Thursday.
    Cheers,
    Click the “Kudos Thumbs Up" at the bottom of this post to say “Thanks” for helping!
    Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
    W a t e r b o y 71
    I work on behalf of HP

  • Problem setting up WDS with MSI RG54GS2 & Motorola WR850g

    Problem setting up WDS with WR850g & MSI RG54GS2
    Hi,
    I'm trying to bridge 2 routers: Motorola WR850g & MSI RG54GS2 .
    I set the MSI as the main router (it works better for me as a router than the Moto), and the Moto is the repeater. I have set it up exactly as the guide on Broadbandreports.com for the Motorola , and on Tom's Networking http://www.tomsnetworking.com/2004/04/14/how_to_wds_bridge/
    The Moto sees the MAC of the MSI (Status is UP), the MSI doesn't have a page that shows WDS MACs . I know the routers are connected because when I connect a laptop to the Moto wireless network, it gets an IP (and the DHCP on the Moto is disabled) and the default gateway of the connection is the IP of the main (MSI) router.
    The problem is I can't surf anywhere. I can't even ping the MSI router - which should be possible if the WDS works properly.The Moto Wireless Bridge Operation is set properly to Access Point/Wireless Bridge .
    Can anyone solve this?
    Thanks.

    David, welcome to the discussions.
    Are you refering to Airport Extreme Setup as the Extreme base.
    Or are you using a 3rd party Router as your primary Base, or the Express as the primary base.
    Read the supplied link, Not all 3rd party routers are WDS compatible.
    http://discussions.apple.com/thread.jspa?messageID=2785566
    Who is you Internet Service Provider?
    What brand and Model Modem did they furnish?
    Are you using Dial-Up...DSL...or Cable?
    http://docs.info.apple.com/article.html?artnum=303595
    See if there is any help from this link.
    http://discussions.apple.com/thread.jspa?messageID=607414
    Cheers Don

  • Problem setting up smtp mail out .

    Hi all you good people .
    I am having a problem setting up the mail program . I'm using mail two under os-x leopard 10.5.7 . I have the pop mail working fine , but for some reason or another it wont send the mail out . I remember I got it working before , but it was a pain in the butt to do . So I ma forced to use Microsoft Entourage for my mail receiving and sending . I think Microsoft Takes more skill to use than the apple mail program .
    I would love for someone to help me solve this . My mail server is from time warner . I use there High speed internet for my mail access .
    P.S Roadrunner .

    Hi,
    I assume you are using Mail 3.6, and not "mail two"?
    What Authentication are you using on this SMTP? If not already, try using None, and removing Password and Username from SMTP setup for at least one test. Most Roadrunner SMTP are authenticated by reference to the IP address of your Modem, and using a separate authentication of the SMTP results in failure.
    Mail Preferences/Accounts/Account Information, then click on the arrows beside the name of the SMTP in the section on Outgoing Server. After you click on the arrows, choose Edit Server List. Then if the SMTP is set up with the correct name, etc, click on the Advance Tab, use Custom Port with Port 25, None as authentication, and do not enter any Username and Password. Under authentication of None, the name of the SMTP will not have your Username appended. This is the equivalent, after having previously done the set up, to those email clients with a setting to use the info of the Incoming for authentication.
    Let us know, but Roadrunner can vary from area to area on this, but this is the way it seems to always work.
    Ernie

  • No sound with apps and alerts unless headphones are in. Everything else works well. I tried resetting but it didn't solve problem.

    No sound with apps and alerts. Everything else works. Tried resetting, didn't solve problem. Apps have sound with headphones only

    Have you got notifications muted ? Only notifications (including games) get muted, so the Music and Videos apps, and headphones, still get sound.
    Depending on what you've got Settings > General > Use Side Switch To set to (mute or rotation lock), then you can mute notifications by the switch on the right hand side of the iPad, or via the taskbar : double-click the home button; slide from the left; and it's the icon far left; press home again to exit the taskbar. The function that isn't on the side switch is set via the taskbar instead : http://support.apple.com/kb/HT4085

  • Set DPI from AIR'S Capturing Image.

    Hi,
    When i capture Bitmap and saved using JPEGEncoder / PNGEncoder  i get image's dpi is 96 ( may be it's depend's on hardware resolutions any my pc have max of this).
    But i want to to set this dpi so in output image's as userdefined.
    Like this facility is available in photoshop so we can set dpi and size so in same size we get different dpi's image's.
    Is any body help me to solve out this issue.
    Thanks,
    Mohit.

    in order to modify the output DPI you will need to get the as3corelib-.93 (just google "as3corelib-.93")
    in there you will find the class JPGEncoder.as
    you then need to modify these lines from
       writeByte(0); // = "JFIF",'\0'
       writeByte(1); // versionhi
       writeByte(1); // versionlo
       writeByte(0); // xyunits
       writeWord(1); // xdensity
       writeWord(1); // ydensity
       writeByte(0); // thumbnwidth
       writeByte(0); // thumbnheight
    to
    writeByte(0); // = "JFIF",'\0'
       //writeByte(2)
       //trace("writing the JFIF 2")
       writeByte(1); // versionhi
       writeByte(1); // versionlo
       //writeByte(0); // xyunits
       writeByte(1); // xyunits
       //writeWord(1); // xdensity
       //writeWord(1); // ydensity
       writeWord(outputImageDPI); // xdensity
       writeWord(outputImageDPI); // ydensity
       writeByte(0); // thumbnwidth
       writeByte(0); // thumbnheight
    where outputImageDPI  is a variable that you pass in.
    To see a working version of this (and shamelessly plug all my hard work)  to to http://nikkosart.com//nikkoImage/testDrive.cfm

  • Problem setting up email on new Ipad

    I have a problem setting up my email account on my new Ipad. I've checked the settings and password which are entered correctly. The Ipad error message states "Cannot Get Mail" the user name or password for "....." is incorrect. Any ideas please ??

    Problem solved. The ipad default is set to IMAP. When I changed it to a POP server, problem solved.

  • WRT120N problem setting Static IP

    My provider gives me static IP
    IP 172.17.158.183
    MASK 255.255.252.0
    GW 172.17.156.255
    There is a problem setting gateway 172.17.156.255 in WRT120N. It says that it's wrong gateway.
    On my notebook Network settings work, but how can I setup WRT120N to work with this network settings?
    Solved!
    Go to Solution.

    You are not right.
    Using search I found  solution fo my problem.
    http://homecommunity.cisco.com/t5/Wireless-Routers/Bug-report-CIDR/m-p/311698/highlight/true#M163772
    And it's work fine now.
    There is a bug in scripts that check gateway, mask and IP.

  • Having problems setting up iMessage

    I'm having problems setting up iMessage on my iPod Touch.  I have several iphones and they all were configured out problems.  But I'm having difficulty getting this to work on an iPod touch.
    The iPod touch has been upgraded to the latest iOS 5.01 from  iOS 5.0 and I still have problems...
    I have a valid iCloud account
    iCloud is setup and working fine on this iPod touch
    I've shut-down and restarted the iPod touch
    I've done a hard-reset
    Wifi is setup properly...
    Here's the issue:
    I open iMessage (either through the Messages app, or via Settings/Messages
    I'm asked to enter the Apple ID.  So I enter my Apple ID and password
    I click "Sign In"
    The app moves to the next screen - "People will message you using your email address.  What email address would you like to use?".  I enter the same gmail address I'm using for my Apple ID
    I click the Next button and it scrolls back to the original "Enter Apple ID" sign in screen in Step#2.   No error message appears.
    So I don't really know what to try next..

    OK - solved my own issue finally.
    The answer was buried in another thread within a reply from user fdm1979.
    The time on this particular iPod was wrong...just flip the Date/Time to "Set Automatically", and then suddently imessage and FaceTime started working.

  • Problems setting up username & password for SQL

    Due to the outstanding advice I recieved from this excellent forum, I have managed to overcome my first problem with declaring a new Class.
    This leads me to request help with my next biggest problem:
    Setting up a user GUI that takes a "username" & "password" that will be used to access a password protected database.
    I am a simple bloke, with simple thought processes, so please, go easy on me...
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.sql.*;
    public class DBQuery1 {
         String username = "" , password = "";
         public static void main(String[] arguments) {
              PassDB UPass = new PassDB();
              String data = "jdbc:odbc:JavaTestDataBase";
              try {
                   Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                   Connection conn = DriverManager.getConnection(data, "" + username, "" + password);
                   Statement st = conn.createStatement();
                   ResultSet rec = st.executeQuery(
                        "SELECT Title, ContactID, First, Last, Dear FROM Contacts "
                        + "WHERE (Title='Mr') ORDER BY ContactID");
              /*     ResultSet rec2 = st.executeQuery(
                        "SELECT Subject, ContactID FROM Calls "
                        + "WHERE (Subject Is Not Null) ORDER BY ContactID");
              System.out.println("\nFirst Name\tSurname\t\tNick Name\t\tSubject\n");
              while(rec.next()) {
                   System.out.println(rec.getString(3) + "\t\t" + rec.getString(4) + "\t\t" + rec.getString(5) /* + rec2.getString(1) */ );
              st.close();
              catch (SQLException s) {
                   System.out.println("SQL Error: " + s.toString() + " " + s.getErrorCode() + " " + s.getSQLState());
              catch (Exception e) {
                   System.out.println("Error: " + e.toString() + e.getMessage());
    class PassDB extends javax.swing.JFrame implements ActionListener {
         String username = "", password = "";
         JTextField uname = new JTextField(10);
         JTextField pword = new JTextField(10);
         // JPasswordField pword = new JTextField(10);
         PassDB() {
              super("duBe's database logon");
              setSize(220, 160);
              setDefaultCloseOperation(EXIT_ON_CLOSE);
              JPanel pane = new JPanel();
              JLabel unameLabel = new JLabel ("Username: ");
              JLabel pwordLabel = new JLabel ("Password: ");
              JButton submit = new JButton("OK");
              submit.addActionListener(this);
              pane.add(unameLabel);
              pane.add(uname);
              pane.add(pwordLabel);
              pane.add(pword);
              pane.add(submit);
              setContentPane(pane);
              setVisible(true);
         public void actionPerformed(ActionEvent evt) {
              PassDB clicked = (PassDB)evt.getSource();
              username = uname.getText();
              password = pword.getText();
    This code generates two errors, stating:
    C:\Java_progs>javac DBQuery1.java
    DBQuery1.java:14: non-static variable username cannot be referenced from a static context
    Connection conn = DriverManager.getConnection(data, "" +
    username, "" + password);
    ^
    DBQuery1.java:14: non-static variable password cannot be referenced from a static context
    Connection conn = DriverManager.getConnection(data, "" +
    username, "" + password);
                    ^
    2 errors*****************************
    The code works when I remove the reference to the variables "username" & "password" in Connection "conn" call & replace them with the actual username & password, but this is not exactly what I was after. I was hoping to make the program responsive to each individual user, not set in code.
    I also would like to make the program pause after the call in "main" to "PassDB" to wait for "PassDB" to exit before continuing.
    I would also like to make "PassDB" destroy itself after the "OK" button is pressed & the "username" & "password" set.
    If that isn't enough for you, I would really like the program to search 2 different database tables, return their values & compare them to be sure that they are the same.
    When I try & search 2 different tables, as in:
    ResultSet rec = st.executeQuery(
                        "SELECT Title, ContactID, First, Last, Dear FROM Contacts "
                        + "WHERE (Title='Mr') ORDER BY ContactID");
                   ResultSet rec2 = st.executeQuery(
                        "SELECT Subject, ContactID FROM Calls "
                        + "WHERE (Subject Is Not Null) ORDER BY ContactID")javac tells me that "ResultSet" is set to null 0
    As always, I am extremely appreciative of any assistance you are able to offer.
    Kind regards
    duBedat
    [email protected]

    This is where I'm at now:
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.sql.*;
    public class DBQuery {
         static String username = "" ;
         static String password = "" ;
         public static void main(String[] arguments) {
         PassDB UPass = new PassDB();
         String data = "jdbc:odbc:JavaTestDataBase";
         try {
              Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
              Connection conn = DriverManager.getConnection(data, "" + DBQuery.username, "" + DBQuery.password);
              Statement st = conn.createStatement();
              ResultSet rec = st.executeQuery(
              "SELECT Title, ContactID, First, Last, Dear FROM Contacts "
              + "WHERE (Title='Mr') ORDER BY ContactID");
              /*     ResultSet rec2 = st.executeQuery(
                   "SELECT Subject, ContactID FROM Calls "
                   + "WHERE (Subject Is Not Null) ORDER BY ContactID");
              System.out.println("\nFirst Name\tSurname\t\tNick Name\t\tSubject\n");
              while(rec.next()) {
                   System.out.println(rec.getString(3) + "\t\t" + rec.getString(4) + "\t\t" + rec.getString(5) /* + rec2.getString(1) */ );
              st.close();
         catch (SQLException s) {
              System.out.println("SQL Error: " + s.toString() + " " + s.getErrorCode() + " " + s.getSQLState());
         catch (Exception e) {
              System.out.println("Error: " + e.toString() + e.getMessage());
    class PassDB extends javax.swing.JFrame implements ActionListener {
         static boolean getOut = false;
         JTextField uname = new JTextField(10);
         JTextField pword = new JTextField(10);
         // JPasswordField pword = new JTextField(10);
         public PassDB() {
              super("duBe's database logon");
              setSize(220, 160);
              setDefaultCloseOperation(EXIT_ON_CLOSE);
              JPanel pane = new JPanel();          
              JLabel unameLabel = new JLabel ("Username: ");
              JLabel pwordLabel = new JLabel ("Password: ");
              JButton submit = new JButton("OK");
              submit.addActionListener(this);
              pane.add(unameLabel);
              pane.add(uname);
              pane.add(pwordLabel);
              pane.add(pword);
              pane.add(submit);
              setContentPane(pane);
              while(getOut == false)
                   setVisible(true);                         
         public void actionPerformed(ActionEvent evt) {
              PassDB clicked = (PassDB)evt.getSource();
              DBQuery.username = uname.getText();
              DBQuery.password = pword.getText();
              getOut = true;               
    }          Any advice is greatly appreciated
    duBe

Maybe you are looking for

  • ABAP+JAVA in Cluster installation

    Hello gurus, I've read all tha SAP HA documents and have noticed that in several cluster installation they split up the ABAP SCS and JAVA SCS from the CI when installaing a double-stack system (ABAP+JAVA). As much as I know, the SCS instances doesn't

  • Backup Apple Mail

    Hello! Lately I have been going through quite some trouble while I was trying to set up rules for my 3 IMAP mail accounts in Mail.app. I'm still not sure everything works as it's supposed to, so I'd like to create a full backup of all my emails. Does

  • Incredible Device/Experience BUT A Few things i would change...

    Please respond with some feedback: 1. The Ability to Highlight, Copy and Paste (Very Important on a PDA/SmartPhone) 2. No Recessed Headphone Jack (It should be compatible with any headphones or speaker system. (For example I am visiting my parents ri

  • My iphone shows me a picture of usb and itunes

    my iPhone wont budge at all I have connected it to my computer and it has a picture of a USB and a arrow pointing to a picture of iTunes if you have any solution you can e-mail me on [email protected]

  • Why is iWeb posting both my blog and the individual entries

    My problem is the the items I want to delete have somehow been uploaded as individual pages AND as part of our blog "At Home in Milwaukee." Example: in iWeb I have At Home in Milwaukee Entries Archive On .Mac, after I publish I get At Home in Milwauk