[If you don't know who or what these (*) are, check the Glossary page.]
What is a Linux Newbie?
Here at The Robotic Frog, we like newbies (newcomers…not just to Linux). Sometimes, we want to look at Linux through the eyes of someone brand new to it. When we look across the Linux spectrum, we find ourselves scratching our collective heads, wondering…”What do we really mean when we say newbie?” What assumptions should we make about a newbie? What do we assume that they know? We want to throw it open to anyone interested in helping those coming to Linux for the first time. What is the profile of a Linux Newbie? (If you’re a newbie, we’d especially like to hear from you.) Drop us a comment to share your thoughts.
Slim and Numlock
I wish I could tell you that I figured out how to turn Numlock on through slick Google-sleuthing and clever deduction from the clues that I found. The truth is that, as with most things technical around here, RoboFrog* figured it out without any Googling at all. After our first CrunchBang 11 install and update, HE* was watching the screen during reboot. HE turned to me and said, “Hey, CrunchBang 11 is using slim for their display manager.”
“How do you know that?” I ask.
“I just saw it load,” HE smiles.
“Oh,” I reply. Sometimes, I can be really profound.
We like slim. It’s the display manager we used with Arch Linux. It’s lightweight, stable, gets the job done, and we know how to configure it. TheFrog opens the configuration file in a text editor: sudo geany /etc/slim.conf (Actually, HE uses vim. Vim is an acquired taste, but highly recommended!). HE changes the following line:
from: # numlock on
to: numlock on
TheFrog uncomments numlock on (deletes the ‘#<space>’ at the beginning of the line).
Guess what? (I love it when this happens.) It doesn’t work. HE immediately goes into HIS frog-trance. Then HE’s moving again. HE brings up a terminal window (RoboFrog’s solution to almost everything involves a terminal.) and types: aptitude search numlock. Aptitude! In a million years that wouldn’t have occurred to me. Here is what HE got:
Note: Aptitude is one of three package managers provided by CrunchBang 11: apt-get, aptitude (command line) and synaptic (GUI). A package manager is used to install new software.
p numlockx - enable NumLock in X11 sessions
Okay, I’m not a total noob. I can (and do) use aptitude. What this line tells us is that there’s a program, numlockx; its function is to enable Numlock in a GUI* environment (X11); and, it’s not installed on our system (p, If it’s installed, it’s i…see man aptitude.).
RoboFrog installs numlockx (sudo aptitude install numlockx) and reboots. Numlock is on…all the time. Finally! I have the perfect keyboard. I can’t believe it.
“How did you know to do that?” I ask TheFrog.
“Oh, we used slim with Arch Linux. I thought I remembered that slim needed a utility to turn Numlock on or off, but I couldn’t remember what it was. I just took a guess that aptitude would find something with numlock in it. When numlockx popped up, I recognized it.” Again, HE gives me that smug, self-satisfied smile. There’s nothing like being patronized by an amphibian. It just makes me want to smack HIM.
I know. You’re sitting there saying, “That’s great for RoboFrog, but how am I supposed to figure it out. I’ve never even heard of slim.” Don’t feel like the Lone Ranger. I have heard of slim and wouldn’t have figured it out that way either. But…let’s see how we would do this if we didn’t have RoboFrog. It’s really not that hard.
First thing…you guessed it…GoogleIt: [crunchbang 11 numlock]. The second item in my search list says: ‘Numlock upon start (page 1) – Help & Support‘. I notice that it’s located at crunchbang.org and it’s from Help & Support. That’s a really good sign because we certainly need help & support. I click on the link. It’s a forum post and the first answer to the question posed says “you might want to take a look here.” Okay, I click here and there’s a solution.
sudo aptitude install numlockx
add numlockx & to ~/.config/openbox/autostart.sh
The first line installs numlockx. That’s the same thing RoboFrog did. The second line says to add the command numlockx & to autostart.sh. When a file ends with .sh, it tells us that it’s a shell script, and in this case, it’s located in the ~/.config/openbox directory. That’s different than what RoboFrog did. This recommendation is almost correct…but not quite (for CrunchBang 11). If you try to open the file (geany ~/.config/openbox/autostart.sh) you get an empty file. That’s odd. autostart.sh should be an existing shell script. We expect a file that contains shell commands. What we get is an empty file. Let’s make sure that we know what we’re doing. Close geany. Let’s see if we can find autostart.sh in our home directory (~/, same as /home/robofrog).
find ~/ -name autostart.sh
Nothing! Try something different:
find ~/ -name autostart*
We get the following:
/home/robofrog/.config/openbox/autostart (same as ~/.config/openbox/autostart)
Interesting. That’s too close to autostart.sh to be a coincidence, so let’s open ~/.config/openbox/autostart with geany (geany ~/.config/openbox/autostart). Here’s what we get:
## Openbox autostart.sh ## ==================== ## When you login to your CrunchBang Openbox session, this autostart script ## will be executed to set-up your environment and launch any applications ## you want to run at startup. ## ## Note*: some programs, such as 'nm-applet' are run via XDG autostart. ## Run '/usr/lib/openbox/openbox-xdg-autostart --list' to list any ## XDG autostarted programs. ## ## More information about this can be found at: ## http://openbox.org/wiki/Help:Autostart ## ## If you do something cool with your autostart script and you think others ## could benefit from your hack, please consider sharing it at: ## http://crunchbanglinux.org/forums/ ## ## Have fun! * * *
Notice the ‘Openbox autostart.sh’ at the top of the file? It gives us plenty of reason to suspect that this is the file that we’re looking for. We don’t have a CrunchBang 10 installation, so I can’t verify it, but I suspect that this file was named autostart.sh in CrunchBang 10 and was renamed to just autostart in CrunchBang 11. Let’s try adding numlockx & to the bottom of the file, reboot, and see if Numlock is turned on.
Did it work? Sure. This works every bit as well as RoboFrog’s. That brings up an important point about Linux. Linux is a very flexible system. There’s rarely just one way to do something. Some ways are better than others…and sometimes…it’s just what you’re most comfortable with and know how to do.
Bottom line: I have my favorite keyboard working exactly the way I want it to work.