SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Ok...So I havent used slackware in a while, only for servers.
I installed v 10.1 with the full install.
Here are my questions:
1) How would I go about having linux auto startx ?
2) How can I change my res to 1440 x 900 ?
3) How can I get my wireless network card to work ?
4) Can I get my wireless card and lan card to auto switch depending on whether lan cable is connected ? Like is there a program because in windows I have this program that auto switches for me like when I dont have an ethernet cord plugged in it switches to wireless and when I do have it plugged in, it switches to lan card.
1)
Edit /etc/inittab. Change this line:
id:3:initdefault:
to:
id:4:initdefault:
2)
As root, run "xorgconfig". You can manually enter a resolution there, but it may or may not work. My laptop's resolution is a standard 4:3 aspect ratio.
3)
What's the WLAN card? For some cards, all you need to do is edit /etc/rc.d/rc.wireless.conf and input the right values. For others, you'll need to write a startup script that sets it up properly.
4)
I'm not aware of such a program. But presumably, the wireless SSID and key will be different at different locations. Why not just not configure it with the appropriate SSID for where you have ethernet connectivity?
Atheros cards usually get installed as ath0 if you're using madwifi. Sometimes, they get installed as wlan0 or wi0. None of those will work with Pat's rc.inet1 script that comes with Slack, so I wrote this script and saved it as /sbin/wlan. Then I call it from rc.local. It asks which wlan you want to connect to, and then sets the card as needed.
You'll need to edit it for your network(s). You can also modify it so that it doesn't ask if you have one network. Somebody here can tell you how to do that if you have trouble, and it'll allow you to start up the wlan on boot.
Code:
#!/bin/bash
# New wlan-up script, prompt for which wireless LAN AP we want to use.
# At some point, we will be updating this so that there's a timeout of 10 seconds or so that I
# can put it at system startup. This will have to do for now.
# I am deliberately not putting in a WHILE loop. I want it to skip the setup of the WLAN if I
# don't tell it to specifically use one of the two lans.
# Global variables:
INTERFACE="eth1"
ESSID="no-essid"
KEY="none"
TIMELIMIT=5
# Show the menu:
echo ""
echo "-=-=-=- Choose a Wireless AP for connection -=-=-=-"
echo "a. Home 54mbit - Bedroom end of house"
echo "b. Home 11mbit - Dining room and Sun Room"
echo "c. University Library"
echo ""
echo "-=-=- Type anything else to cancel connection -=-=-"
read -t ${TIMELIMIT} choice
case $choice in a)
ESSID="ssid1"
KEY="key1"
esac
case $choice in b)
ESSID="ssid2"
KEY="key2"
esac
case $choice in c)
ESSID="LIBRARY"
esac
if echo "${ESSID}" | grep -q "no-essid"
then
echo "*** Exiting without configuring LAN. You can reinvoke it with /sbin/wlan ***"
else
echo ""
echo "Enabling ${INTERFACE}"
ifconfig ${INTERFACE} up
echo " Setting ESSID"
iwconfig ${INTERFACE} essid ${ESSID}
sleep 2
if echo "${KEY}" | grep -q "none"
then
echo " Configuring for access without encryption"
else
echo " Setting Network Key"
iwconfig ${INTERFACE} key ${KEY}
sleep 2
fi
echo " Obtaining DHCP"
killall dhcpcd
sleep 1
dhcpcd ${INTERFACE}
fi
As for automatically switching between nets, the script can do that. Just run wlan (as root) and choose a different wireless net. If you want to be 100% sure that the wireless is disabled and the wired is up, run /etc/rc.d/rc.inet1 to bring up the wired, and then "ifconfig (interface) down" to bring down the wireless.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.