Beta
×

Welcome to the Slashdot Beta site -- learn more here. Use the link in the footer or click here to return to the Classic version of Slashdot.

Thank you!

Before you choose to head back to the Classic look of the site, we'd appreciate it if you share your thoughts on the Beta; your feedback is what drives our ongoing development.

Beta is different and we value you taking the time to try it out. Please take a look at the changes we've made in Beta and  learn more about it. Thanks for reading, and for making the site better!

Comments

top

Windows 7 Anti-Piracy Plans

gameforge Re:Hasn't MS learned *anything* over the years? (403 comments)

It's beginning to resemble a bad joke at this point... WTF are they doing? More than 70% of Windows users are running XP - it's eight years old. Many customers were ready for a new Windows, upgraded their computers, hated Vista and refused to use it. They reverted to XP which MS continued to support well past the expected lifetime, and simultaneously computers quit getting faster at exponential rates.

So now we have lots of modern computers that are content with an eight year old Windows release that's mostly up to date, and will have no reason to upgrade for years. New computers still sell with XP more than Vista, and for all we know Win7 could be another year out. Customers have a newfound appreciation for how stable and refined XP is (or can be).

But even in 2001, XP was slow to take - it took about four years to overtake Win2k in the corporate space. Windows 7 will meet an utterly awful economy with the damning news that computer hardware no longer obsoletes itself each year - Microsoft's planned obsolescence product model has kicked its own ass.

So what I don't understand is what they think being rabid about Windows piracy stands to gain them today? They need the market share more than they need the extra 0.1% of pirated copies that would actually translate into sales. When they turn off XP support, shit will hit fans... unless Windows 7 can get you free coffee and cheap drugs, Windows XP support will have to be switched off at a time when it still retains the largest userbase of any other OS.

They're hunting for their users' last straw, which seems like a bad sign to me; this is only a matter of time before they trip over themselves and fall off the tower. PC vendors abound waiting to market and sell you preconfigured, secure, compatible and supported desktops running Linux. When software developers catch on, checkmate.

more than 5 years ago
top

EA/BioWare Deal Finalized, Nets EA Ten Franchises

gameforge Re:I loved Far Cry, but can't buy Crysis (79 comments)

Oh, and the aliens in Crysis, aside from all looking like the same model, looked like they came straight out of Duke Nukem 3D, except they weren't billboards... even with lots of texture filters you could see huge, ugly, disgusting texture pixels, unless it was the other 7/8 of the alien which was jet black and was more of a silhouette than a model... so if you saw any of that, that wasn't your hardware. ;)

more than 6 years ago

Submissions

top

gameforge gameforge writes  |  more than 7 years ago

gameforge writes "Which of the following has played the most essential role in state-of-the-art computers?

A) The Printing Press.
B) The Transistor.
C) Binary Mathematics.
D) Quantum Mechanics.
E) The Internal Combustion Engine.
F) Taiwan.
G) Cowboy Neal's '91 Ford Taurus."

Journals

top

X/KDE/ALSA Trick

gameforge gameforge writes  |  more than 8 years ago

Well, you asked about non-KDE tricks as well; this is partly a trick w/ KDE and partly a trick w/ X, and also w/ ALSA.

I've been using Linux and X-Windows for a fairly long time, as well as KDE (since 1.x). One thing that always bothered me was that I couldn't set up the Windows key exactly the way that it works in Windows. It keeps wanting to treat it as a meta key; KDE's 'Keyboard Shortcuts' control panel in the control center wouldn't let me set it up identical to Windows. It's certainly possible I did something wrong, but I sure played with it long enough...

Further, I have a Logitech Cordless MX Duo; it's a wireless keyboard & mouse. As most Logitech keyboards do, it has Internet buttons and multimedia buttons all over the place; there's also WWW back & forward thumb buttons on the mouse, which are quite convenient under Firefox/Windows.

So, after years of living without, I discovered the 'xmodmap', 'imwheel' and 'xev' commands. To get the mouse forward/backward buttons to work correctly, I execute a simple script called 'setup_mx700' when loading X:


#!/bin/sh
xmodmap -e "pointer = 1 2 3 6 7 4 5"
imwheel -f -k -p -b "67"

Then, in the imwheelrc file, I have this:

"(null)"
None, Up, Alt_L|Left
None, Down, Alt_L|Right

".*"
None, Up, Alt_L|Left
None, Down, Alt_L|Right

This tells X how many buttons are on the mouse, and in which order they are coded. Both imwheel and xmodmap have man pages; you can check them out if you have a different scenario, possibly if your mousewheel and/or middle buttons don't work, etc. Essentially, the back/forward buttons map out to 'Alt+Left' and 'Alt+Right', and the mouse wheel maps to 'up/down' (in case the program I'm using doesn't support mouse wheels). This will certainly vary from setup to setup, which is why I refer to the manpages.

Now for the keyboard issue. As I said, the Win key wouldn't work correctly (probably a messed up X setting somewhere), and none of the Logitech MM and WWW buttons would work. Using 'xev', I mapped out which keys correspond to which key codes. So, I have another script, called 'setup_iTouch' run when I start X, right after 'setup_mx700':

#!/bin/sh
xmodmap -e "keycode 115 = F13"
xmodmap -e "keycode 117 = F15"
xmodmap -e "keycode 160 = F14"
xmodmap -e "keycode 174 = F16"
xmodmap -e "keycode 176 = F17"
xmodmap -e "keycode 164 = F18"
xmodmap -e "keycode 162 = F19"
xmodmap -e "keycode 153 = F20"
xmodmap -e "keycode 144 = F21"

Once again, different setups will have different keycodes; use 'xev' to capture your own keyboard's proprietary codes.

Then you can go into KDE's shortcut and hotkey control panels, and when you try to assign these keys to an action, they pop up w/ no problems at all (as F13, F14, F15, etc.) I was able to assign the Win key to its proper shortcut, and it now behaves identically to Windows (pushing it twice makes it go away, etc.). The other multimedia/shortcut keys were pretty easy to bind and get them to do what I wanted.

However, I could not think of a program that I could use to simply 'mute' the master sound in ALSA, nor commands to simply increase/decrease the master volume in ALSA, which would retain previous settings & whatnot. So, I wrote yet another three scripts (all five of which I store in /usr/local/bin) that can be assigned to their respective keys in KDE's hotkey manager.

These three use an environment variable, $MVOL, to maintain ALSA's master sound level.

First, 'snd_mute':

#!/bin/bash
MVOL=`amixer sget Master | tail -n 1 | cut -c 18-20`
THIRD=`echo $MVOL | cut -c 3`
if [ "$THIRD" = "[" ]; then
      MVOL=`echo $MVOL | cut -c 1-2`
fi
if [ $MVOL = 0 ]; then
      if [ -a /tmp/mute_vol.tmp ]; then
            MVOL=`cat /tmp/mute_vol.tmp`
      else
            echo 0 > /tmp/mute_vol.tmp
      fi
      amixer sset Master $MVOL
else
      echo $MVOL > /tmp/mute_vol.tmp
      amixer sset Master 0
fi

Then, snd_down:

#!/bin/bash
MVOL=`amixer sget Master | tail -n 1 | cut -c 18-20`
THIRD=`echo $MVOL | cut -c 3`
if [ "$THIRD" = "[" ]; then
      MVOL=`echo $MVOL | cut -c 1-2`
fi
if [ $MVOL -gt 0 ]; then
      MVOL=`expr $MVOL - 3`
      if [ $MVOL -lt 0 ]; then
            MVOL=0
      fi
      amixer sset Master $MVOL > /dev/null
fi

And finally, snd_up:

#!/bin/bash
MVOL=`amixer sget Master | tail -n 1 | cut -c 18-20`
THIRD=`echo $MVOL | cut -c 3`
if [ "$THIRD" = "[" ]; then
      MVOL=`echo $MVOL | cut -c 1-2`
fi
if [ $MVOL -lt 100 ]; then
      MVOL=`expr $MVOL + 3`
      if [ $MVOL -gt 100 ]; then
            MVOL=100
      fi
      amixer sset Master $MVOL > /dev/null
fi

To make it more precise, change

MVOL=`expr $MVOL + 3`

to + 1. To make it less precise, change it to + 5. Same for 'snd_down', but use - 1 and - 5.

It may work (with proper tweaking) with some other keyboards/GUI's, I don't know. Feel free to share modifications, questions, comments, etc. You could make it even more complete and get little overlay displays that tell you what's going on, and you could even make the volume control work for other sliders on the mixer; perhaps if the 'alt' key is pressed, it adjusts the 'Surround' volume, and with the 'ctrl' key pressed it adjusts the 'Bass' level, or something like that.

Slashdot Login

Need an Account?

Forgot your password?

Submission Text Formatting Tips

We support a small subset of HTML, namely these tags:

  • b
  • i
  • p
  • br
  • a
  • ol
  • ul
  • li
  • dl
  • dt
  • dd
  • em
  • strong
  • tt
  • blockquote
  • div
  • quote
  • ecode

"ecode" can be used for code snippets, for example:

<ecode>    while(1) { do_something(); } </ecode>