LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 05-11-2004, 08:21 AM   #1
MillyFish
LQ Newbie
 
Registered: Apr 2004
Location: UK - East Midlands
Distribution: RH9 - Shrike
Posts: 8

Rep: Reputation: 0
Boot with numlock on? Possible?


Hi all

Is it possible to boot the Fedora Core 1 system and force the numlock to be on. When I boot into Win98 the numlock is on but if I boot into Fedora it stays off. I use the number pad instinctively and get into a flap when it doesnt work as I expect.

If it is possible, how do I do it?

Thanks

Millyfish
 
Old 05-11-2004, 10:22 AM   #2
Andrew Benton
Senior Member
 
Registered: Aug 2003
Location: Birkenhead/Britain
Distribution: Linux From Scratch
Posts: 2,073

Rep: Reputation: 64
If you have a C compiler installed, download this ftp://ftp.silug.org/pub/ltsp/setnumlock.tar.gz
then
Code:
tar xzf setnumlock.tar.gz
cd setnumlock
make
su
password
make install
chmod 755 /usr/bin/setnumlock
Then you need to set Gnome to run setnumlock when you log in. The menus are arranged differently in Fedora and I can't remember where this is but in regular Gnome 2.6 it's Desktop Preferences > Advanced > Sessions > Startup Programs > Add and then fill in setnumlock in the Startup Command box. I'll reboot into Fedora and edit this.

Go to the Hat Menu > Preferences > More Preferences > Sessions > click the Startup Programs tab then > Add and for Startup Command enter setnumlock

Last edited by Andrew Benton; 05-11-2004 at 10:29 AM.
 
Old 05-11-2004, 03:17 PM   #3
marghorp
Senior Member
 
Registered: Jan 2004
Location: Slovenia
Distribution: Slackware 10.1, SLAX to the MAX :)
Posts: 1,040

Rep: Reputation: 45
If you are using KDE in Fedora, go to KDE control center and you can make it happen there whithout installing any packages. You will find it under Hardware something(I use slovenian distro) and then Keyboard. There is an option whether to have NumLock on or of at boot and loading linux.

Peace!

Hope it helps you(if you have KDE).
 
Old 05-11-2004, 06:51 PM   #4
Espique
LQ Newbie
 
Registered: Oct 2003
Posts: 18

Rep: Reputation: 0
hum. apperantly Core2 does not have the starup programs in the preferences menu. where else could that be?

sascha
 
Old 05-11-2004, 06:53 PM   #5
marghorp
Senior Member
 
Registered: Jan 2004
Location: Slovenia
Distribution: Slackware 10.1, SLAX to the MAX :)
Posts: 1,040

Rep: Reputation: 45
KDE control center? Don't you have it? Are you using GNOME?
 
Old 05-11-2004, 07:18 PM   #6
Espique
LQ Newbie
 
Registered: Oct 2003
Posts: 18

Rep: Reputation: 0
sorry. I ment the startup folder in gnome. I saw that mentioned elsewhere too, it's supposed to be in the gnome-control-center, but it is not. at least not here on the Core2 box. any idea?

thanks,
sascha
 
Old 05-13-2004, 02:12 AM   #7
MillyFish
LQ Newbie
 
Registered: Apr 2004
Location: UK - East Midlands
Distribution: RH9 - Shrike
Posts: 8

Original Poster
Rep: Reputation: 0
Millyfish here!

Hope nobody thinks I'm ignoring my own thread - anyone spotting my other post in Newbies will know I've had a bigger fish to fry. Now that that is sorted though, I will give your suggestions a try when I get back home.

Post results later.

Phil
 
Old 05-25-2004, 02:28 PM   #8
Andrew Benton
Senior Member
 
Registered: Aug 2003
Location: Birkenhead/Britain
Distribution: Linux From Scratch
Posts: 2,073

Rep: Reputation: 64
Quote:
Originally posted by Espique
hum. apperantly Core2 does not have the starup programs in the preferences menu. where else could that be?

sascha
Where indeed. I've just installed Fedora core 2 and I can't get setnumlock working as there's no Sessions option on the Hat Menu > Preferences > More Preferences > Sessions menu. Does anyone know how to run a command when you log in to gnome on Fedora Core 2?
 
Old 05-25-2004, 02:31 PM   #9
marghorp
Senior Member
 
Registered: Jan 2004
Location: Slovenia
Distribution: Slackware 10.1, SLAX to the MAX :)
Posts: 1,040

Rep: Reputation: 45
It is easy in KDE and KDE is so beautifull in this time of year with 3.2.2 coming with Fedora Core 2.

I have no idea for GNOMe.
 
Old 05-25-2004, 03:31 PM   #10
Andrew Benton
Senior Member
 
Registered: Aug 2003
Location: Birkenhead/Britain
Distribution: Linux From Scratch
Posts: 2,073

Rep: Reputation: 64
I fixed it, I run gnome-session-properties with a command from the terminal. How daft that the application is there but they've removed it from the menus...
 
Old 05-26-2004, 08:43 AM   #11
wiraone
Member
 
Registered: Nov 2003
Location: Diawang-awangan
Distribution: Ubuntu Hoary!
Posts: 319

Rep: Reputation: 30
Quote:
Originally posted by Andrew Benton
I fixed it, I run gnome-session-properties with a command from the terminal. How daft that the application is there but they've removed it from the menus...
It wasn't removed intentionally .. but I guess there is a bug somewhere in the .desktop file which makes it not showing up. This is one of the few cosmetic problems with FC2 ... and it seems that nobody really care about it ..
 
Old 05-26-2004, 09:22 AM   #12
marghorp
Senior Member
 
Registered: Jan 2004
Location: Slovenia
Distribution: Slackware 10.1, SLAX to the MAX :)
Posts: 1,040

Rep: Reputation: 45
Yes, we all use KDE
 
Old 05-26-2004, 09:41 AM   #13
smokybobo
LQ Newbie
 
Registered: Feb 2003
Posts: 29

Rep: Reputation: 15
Hello, I'm on a debian system, but I thought I'd share my solutions which should be easy enough to adapt to a fedora core distro provided you know where your startup scripts are.

Numlock when booting computer (this is `/etc/init.d/custom-numlock` on my system):

Code:
#!/bin/sh

SETLEDS=/usr/bin/setleds

case "$1" in
   start)
	 echo -n "Enabling numlock on consoles: "
         if [ -e /dev/.devfsd ]; then
            for tty in /dev/vc/[1-9]; do
               $SETLEDS -D +num < $tty
	    done
	 else
	    for tty in /dev/tty[1-9]; do
               $SETLEDS -D +num < $tty
            done
         fi
	 echo "numlock."
      ;;
   stop)
	 echo -n "Turning numlock off on consoles: "
         if [ -e /dev/.devfsd ]; then
            for tty in /dev/vc/[1-9]; do
               $SETLEDS -D -num < $tty
	    done
	 else
            for tty in /dev/tty[1-9]; do
               $SETLEDS -D -num < $tty
            done
         fi
	 echo "numlock."
      ;;
   restart|reload|force-reload)
         /etc/init.d/custom-numlock stop
	 /etc/init.d/custom-numlock start
      ;;
   *)
         echo "Usage: /etc/init.d/custom-numlock {start|stop|restart|reload|force-reload}"
         exit 1
      ;;
esac

exit 0
For the following, you need a program called numlockx .

For starting X from the console i.e. via startx, stick the following in `$HOME/.xinitrc` (note the path to the numlockx program may be different for your distro):

Code:
#! /bin/sh

/usr/X11R6/bin/numlockx on

If you run from gdm, on my debian system I stick the above in the file `/etc/gdm/Init/Default`. For kdm, I stick it in `/etc/kde3/kdm/Xsetup`. Again, these are on a debian system, so the locations of the configuration files for gdm and kdm are most likely different.


If you don't care for a toggled numlock at a display manager but want it on when in a DE or WM, stick the above code in `$HOME/.xsession`

The above are merely alternative suggestions to what's already posted, but I like these solutions as they are more or less independent of the DE or WM you may want to run.

Last edited by smokybobo; 05-26-2004 at 09:45 AM.
 
Old 06-10-2004, 08:01 AM   #14
KimMcCall
LQ Newbie
 
Registered: Jun 2004
Location: Menlo Park, CA
Distribution: Fedora Core 3
Posts: 9

Rep: Reputation: 0
Having run into this same problem, but being too lame to think of invoking the wizard from the command line (actually, see end of message for rationalized reason), I tried figuring out just what the wizard does and then doing that by hand.

So, in case anyone wonders, the Sessions wizard (is that the right term?) is a graphical way of editing the file
~/.gnome2/session-manual

In my system I like to run both setnumlock and ssh-add whenever I start up GNOME.
Here, between the ***...*** lines, is the content of my ~/.gnome2/session-manual

*******************************************************************************

[Default]
num_clients=2
0,RestartStyleHint=3
0,Priority=50
0,RestartCommand=/usr/bin/setnumlock
1,RestartStyleHint=3
1,Priority=70
1,RestartCommand=/usr/bin/ssh-add
*******************************************************************************

You will notice that the file starts with a blank line. (This is probably not important, but who knows?)
The num_clients value should be the number of things you want to start up.
The priority numbers may be confusing and tricky. A higher number means a lower priority.
If you're running ssh-add, you should assign it a high number, so it runs last. The RH9 documentation suggested that 70 would be a good value.
I hope the rest is clear enough. I have no idea what the RestartStyleHint is about, but this works for me.

Hope someone finds this useful. I'm about to start developing a perl script for customizing a fresh installation, so I wanted to know how to do this sort of thing without a GUI.

Kim
 
Old 06-10-2004, 08:05 AM   #15
KimMcCall
LQ Newbie
 
Registered: Jun 2004
Location: Menlo Park, CA
Distribution: Fedora Core 3
Posts: 9

Rep: Reputation: 0
Oh, and for what it's worth, I pretty strongly disagree with wiraone's assessment that no one cares that this was accidentally left out of the menus. I found it quite frustrating, and I can hardly be the only one.

Kim
 
  


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
Boot-up numlock cdhgee Linux - General 3 07-21-2005 03:21 AM
OpenBSD and numlock on at boot gentisle *BSD 2 05-25-2005 01:47 PM
numlock @ boot nadroj Linux - Newbie 5 04-06-2005 03:07 PM
numlock on boot... moschi Linux - Newbie 4 09-05-2004 03:11 AM
Numlock on on boot FNC Linux - General 2 05-18-2003 11:17 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 01:12 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration