Search Results for: 302

Virtual terminals not working? Check your keyboard.

(This is a boring post that I’m writing for people that have this same problem in the future. Just skip it.)

Every good Linux user knows that if you want to drop from X down into a text-based virtual terminal, you can press control-alt-F1 (or any other key up to F6), and control-alt-F7 returns you to the graphical mode. But what if that doesn’t work? In my case, it turned out to be my keyboard. My Microsoft Natural Ergonomic Keyboard 4000 has a key marked “F Lock” and unless that FLock key is activated (the “F” LED should be on), the wrong keystrokes were being sent to my Linux Ubuntu version of Intrepid Ibex. How can you debug this? Well, it took me a while.

After some Googling, here’s how I’d write the flowchart:

Try running “chvt 1” to switch your console to virtual terminal 1.
– If “chvt 1” does not work, you might get the message “Couldnt get a file descriptor referring to the console”. You probably need to be superroot. Once you run as root, that command should work.
– Maybe “chvt 1” fails in some other way. Dude, you’re outside my area of expertise. You could try typing “sudo modprobe vga16fb; sudo modprobe fbcon” . Or you could try typing the command “setupcon” to set up the font and keyboard on the Linux console. Or it’s possible that you need to edit /boot/grub/menu.lst and tweak the vga= setting or remove the “splash” parameter. Or you might want to check your /etc/gdm/gdm.conf file.

– Quick check: you might have the “DontVTSwitch” option set in your /etc/X11/xorg.conf file, which would disable virtual terminal switching.

If running “chvt 1” as superroot does work, then you probably have an issue with your keyboard mappings somehow.
– If you have a Microsoft Natural Ergonomic Keyboard 4000, make sure that the “F-Lock” key near the top-right of the main part of the keyboard is properly engaged. The “F” LED below the keyboard should be on.
– Next, run xev (possibly as root) to see raw xevents as you press keys. This thread helped, where the person said

Recently I tried to switch to VT (console) and I couldn’t – Ctrl+Alt+F1 didn’t work (and they used to couple of weeks ago). I don’t even know where to look for the problem; xev detects KeyRelease XF86_Switch_VT_1 event, /etc/inittab contain getty respawns.

When I ran xev myself, and pressed control-alt-F1, I saw an event like

KeyPress event, serial 38, synthetic NO, window 0x3400001,
root 0x1a6, subw 0x3400002, time 1848943, (42,37), root:(1751,59),
state 0x0, keycode 146 (keysym 0xff6a, Help), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False

The fact that I saw a “Help” event rather than “XF86_Switch_VT_1” was what made me suspicious. Sure enough, activating the “F-Lock” key then triggered this event:

KeyRelease event, serial 34, synthetic NO, window 0x3400001,
root 0x1a6, subw 0x3400002, time 2873229, (38,51), root:(1747,73),
state 0xc, keycode 67 (keysym 0x1008fe01, XF86_Switch_VT_1), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False

and life was good. You might also consider tweaking xmodmap to return the values you expect. Or you might have a strange XkbModel or XkbLayout setting where switching your keyboard language or layout (e.g. from pc105 to pc104) might help.

My Five Months With Google Chrome

Om Malik wrote an interesting post about Google Chrome one month after the public launch. While I was reading Om’s post, I realized that I wrote a post for the Google Chrome release that I never published. I’ll include it here, and then let’s meet at the bottom and compare notes. 🙂

Like many Google engineers, I’ve been running Google Chrome for several months. When I sat down with a blank piece of paper to write down why you should try Google Chrome, I ended up with several reasons, including speed, security, stability, and openness. I’ll run through them for you.

Speed. Google Chrome is wicked fast, especially if you use AJAX/JavaScript-heavy web applications such as Gmail. And it’s not just “benchmark fast,” it’s end-to-end fast. Google Chrome puts special emphasis on never making the user wait. Opening a tab is essentially instantaneous, and all the little pauses that would normally interrupt your workflow just don’t happen. Of course, sometimes a remote web server is slow to return data–there’s nothing that a web browser can do about that–but for everything else, the browser speeds along like lightning.

When Gmail came out, it took me months to switch over. Before Gmail, I used mutt and I had all kinds of crazy customizations and wild procmail rules, so it took quite a while for Gmail to convince me to switch. In contrast, it took less than a week for me to switch to Google Chrome. It’s so scary fast that I felt like I was taking smart pills because of all the extra work and email I could blast through.

Security. As the head of Google’s webspam team, I prowl around some pretty hairy places on the internet. Almost every day I encounter hacked pages, malware, porn, and generally scuzzy pages. The security model in Google Chrome is much stronger than most other browsers I’ve used. I’ve surfed through hundreds of seedy back alleys of the Internet over the last several months, and Google Chrome has safely kept me from being infected or affected by the junky web pages I encounter.

Stability. I loved my previous browser (and still do!), but I got used to killing my browser and restarting it daily to prevent memory leaks from hobbling my machine. I’ve run Google Chrome for weeks at a time with bunches of open tabs and it hasn’t crashed on me or bloated up my computer’s memory. I also love that Google has a “ChromeBot” which takes each new browser build and throws (put your pinky finger to your lips) one million webpages at the build as a torture test. That testing virtually guarantees that everyday web pages shouldn’t crash your browser. Google Chrome has been rock solid for me.

Openness. You aren’t locked in to using Google’s search; you can choose to use any major search engine in Google Chrome. Plus, as you click around the web, you don’t send surfing information to Google. Google Chrome is open-source under a BSD license, so you can check that for yourself. The cool bits of Google Chrome, including V8 (a from-the-ground-up JavaScript virtual machine), are open for anyone to take and use.

The comic book. Still not convinced? If you’re a geek, read the 40-page comic book about Google Chrome. It’s genuinely educational about the design choices that Google made. It turns out that a comic is one of the best ways to introduce a large piece of new software:

Ben Goodger talks about the Omnibox

You’ve all heard the acronym “RTFM,” right? It stands for Read The *cough* Fine Manual. The next time someone asks whether Google Chrome uses WebKit or something else, I can say RTFC–Read The Fine Comic. 🙂

Okay, how well does that post hold up after a month?

On speed, I think Chrome really holds up well. Om’s comments are filled with people who got hooked on the speedy and nice Google Chrome browser experience. A couple people who didn’t like it only tried it for a day; I really think you need to give Chrome a few days (maybe a week) to really notice the end-to-end difference.

On security, I was impressed that so few security holes were found, and most of them required the user to take some additional action or involved social engineering. I have seen very few (no?) attacks like “surf to a random page and your browser gets pwned.” That’s really nice to see; I’m sure the Chrome team was anxious to see what would happen when the outside world tried to attack Chrome. Chrome has been quite robust for a web browser that was only recently released into beta. I continue to surf to really dangerous places with no resulting hijacks or malware.

How about stability? I always thought this would be the weakest point of the Chrome launch, and not because of web pages that would crash Chrome, but because it’s hard to test on a wide variety of real-world hardware when you’re trying to keep a product secret before releasing it. And again, I was surprised that so few things broke. The fact that the Chrome team has released four updates to Chrome in four weeks tells me two things: 1) the worst bugs are going to get knocked down pretty quickly and 2) the Chrome team is very serious about iterating to improve the browser.

Openness is an interesting one. I think the EULA issue caused a short-term goodwill hit. Google corrected the terms in about a day, but it still provided material for the people who dislike the fundamental notion of the Chrome browser. I have to admit that I was surprised that people objected to the “Suggest” feature when you’re typing into the address bar, but it’s good that Google reacted quickly on that one as well. I had a conversation with Danny Sullivan where he urged Google employees to try to look at Google as if they were outside the company and didn’t work for Google. It’s excellent advice and definitely provides a helpful perspective. Ultimately, I think that the open-source nature of Google Chrome’s code should reassure most people and win over fans with time.

And the comic book? I still think it’s a cool way to explain a lot of complex design decisions. 🙂

I’ve been watching the Chrome team work, and I believe that they’re going to earn the respect and loyalty of a lot of surfers over time. Their ability to execute reminds me of how the Google Reader team won me over a couple years ago. If you’re running Windows and haven’t taken it for a spin, if you try Chrome for 5-6 days, I think you’ll like it too.

css.php