Linux - Laptop and NetbookHaving a problem installing or configuring Linux on your laptop? Need help running Linux on your netbook? This forum is for you. This forum is for any topics relating to Linux and either traditional laptops or netbooks (such as the Asus EEE PC, Everex CloudBook or MSI Wind).
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.
This question has probably been addressed before, but I can't seem to find the answer I am looking for.
Here is my problem,
I recently got Slack installed on my trusty old dell laptop, and everything is up and running, but I'd like to configure a script or some such animal so that I can choose between different network profiles.
Here are the networks I connect to:
Network 1 -- Home, Use PPPOE to connect to my DSL Modem
Network 2 -- Workplace 1, use DHCP to connect to the router and the rest of the network
Network 3 -- Workplace network 2, have an assigned IP address and DNS servers.
What I am looking for is a way to tell slack on startup what network I am currently on, or in some cases that no network will be present (like sitting in the car, playing a game while my wife drives
Distribution: Slack Puppy Debian DSL--at the moment.
Posts: 341
Rep:
First google.com/linux every key word you can think of concerning what you want to do--someone may have already written a network "switcher" of somekind. Most laptops have a utility for windows that does that--I suspect a linux-user probably liked the idea and duplicated it.
/***I just came up with forth way. Duh. Compile a kernal for each one, making it as clean and precise as possible, and making a complete config file for each one. You should also be able to pass init parameters--options in the grub or lilo configuration file for each kernal which would point to the network settings file you would create for each one. This would automate your set-up scripts and booting to a different kernal would over-write the settings with alternate ones or alias different configuration files. Badda-bing! Updating would be a bitch though.***/
The easiest way with two different networks is to use the runlevels and create custom set-up for each runlevel chosen.
But with three, you are probably better off with a bash script for each custom set-up.
You would start the machine with no network or related services set to run.
Then you would have to write your scripts to do an automated network set-up. Each script with a name not being used anywhere else. Be careful to do that. A script is nothing more than one console (command-line) command per line--triple check your syntax.
I will tell you this, it will probably be a bitch.
The services have to be configured and started in order.
Don't have anything running when booting as you have to configure inter-dependant services.
You will be creating links and configuration settings to be inserted into config files all over the place--or setting up copies of the files with the different settings in them, renaming them, and using the "alias" command. Essentially what you will be doing is the networking portion of the "init-scripts"--which would normally run at boot time.
You are going to have to plan it out on paper and read all of those scripts to give you the commands and syntax. Don't forget: you have to clean it all up when shutting everything down--and it is best to automate that as well so you can just "poweroff" or what-ever you use to shut down. And do some "test" statements also to insure that services aren't already running or configured somewhere else.
Once the scripts are written and tested, you can put an icon/button/shortcut for each on your desktop. After that, it is just point-and-click.
While writing this I can see at least three different ways to do it--none of them very easy.
Well, I've not found anything I really need to do can be done the "easy" way... thanks for the advice, and if I never reply again, you'll know I failed....
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.