Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I was wondering if there's a way to set a profile before logging into my account. Like, let's say: My session starts running certain start up programs like Skype, Thunderbird or even Pidgin, which I allowed myself. Now, I'm traveling and I have to use my laptop in a place with no WiFi Connection. So with no Internet, I want to have the ability to say to it "Ok PC, there's no WiFi or available connection, start the session in this profile so Don't load the usual programs".

I know that I can do some scripts for that, but I'd like to know if there's an existent software doing that. If it exists for XFCE, what's its name? Would you recommend it? Thanks in advance.

share|improve this question
add comment

1 Answer

Are you using NetworkManager?

NetworkManager has a feature called dispatcher.

Place scripts in the directory /etc/NetworkManager/dispatcher.d/

You can use this script to determine if you are connected. Save it to /etc/NetworkManager/dispatcher.d/wifi-profile as root.

#!/bin/bash
wifistatus=$(iwgetid -r);
if [ ! -z "$wifistatus" ]; then
   pidgin &
   skype &
fi

Make the script executable:

sudo chmod +x /etc/NetworkManager/dispatcher.d/wifi-profile

Note: iwgetid depends on the wireless_tools package.

share|improve this answer
    
Interesting answer, I'll check that out and give feedback. –  dnlsrl Sep 11 '13 at 2:47
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.