LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to start wireshark at every time when I login (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-start-wireshark-at-every-time-when-i-login-941221/)

uk.engr 04-23-2012 12:04 AM

How to start wireshark at every time when I login
 
Assalam o Alaikum!

I am using fedora 14. I want to start wireshark at login time. For this I edit in /etc/rc.d/rc.local and add the command to start wireshark. But it is not working what is solution please guide me.

Thanks!

pan64 04-23-2012 01:11 AM

see the bash man page and look what's happening during login

Erfankam 04-23-2012 05:53 AM

use crontab or cron intead. It can be configured to start any program on proper time.

uk.engr 04-23-2012 06:09 AM

Thanks for replies. How to see bash man page to see whats going on during login time? I mean normally we can see man page as --help or man mkdir? Please tell me how can i see bash man page thanks...

acid_kewpie 04-23-2012 06:13 AM

why would you want to start wireshark? What do you actually mean? you can't start a GUI program in rc.local, you would need to start it when a user logs in. It doesn't sound like a good think to actually want to do... worth backing up and describing what problem you're trying to solve, not how you wish to solve it.

uk.engr 04-23-2012 06:27 AM

Thanks. this is new info for me that we can't start GUI pgm at start via rc.local. Actually I am working on task to develop a script to turn on automatically 4 OSs systems, assign them interfaces, routes and turn on wireshark in two middle OSs. I hope you understand what I am trying to do. Currently I am doing this via /home/user/.bashrc and add wireshark command but problem is that it is not what I want. Via this It turns on wireshark very earlier and can't do any thing else with out closing wireshark. My task is completed but I want to make it as easier as possible. For this I need your helps...

acid_kewpie 04-23-2012 06:29 AM

I really don't think wireshark is the right tool for whatever you actually need to do... maybe tshark could be useful, or tcpdump, but a gui... I can't see it.

uk.engr 04-23-2012 06:39 AM

Okay, good opinions. I really appreciate your helps. Actually tcpdump is also using but this is assigned some other members. Ok thank you so much. But I still want to know if some one needs to open GUI pgms at start then how can he do it?

acid_kewpie 04-23-2012 06:44 AM

under gnome there's a location like ~/.config/autostart where you can run code when gnome loads.

uk.engr 04-23-2012 06:47 AM

Okay I will try it. Thanks

schneidz 04-23-2012 07:08 AM

e.g.:
Code:

[schneidz@hyper ~]$ cat .bash_profile
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/bin

export PATH

#/home/schneidz/nfs-w/leaderboard.ksh &

echo \~ \"\" \$ \^ \&\& \( \) \{ \} \>\> \@ \: \| \_ >> /home/schneidz/.bash_history

alias grep='grep --color=auto'

nautilus &


acid_kewpie 04-23-2012 07:09 AM

Quote:

Originally Posted by schneidz (Post 4660682)
e.g.:
Code:

[schneidz@hyper ~]$ cat .bash_profile
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/bin

export PATH

#/home/schneidz/nfs-w/leaderboard.ksh &

echo \~ \"\" \$ \^ \&\& \( \) \{ \} \>\> \@ \: \| \_ >> /home/schneidz/.bash_history

alias grep='grep --color=auto'

nautilus &


eww no.

schneidz 04-23-2012 08:20 AM

Quote:

Originally Posted by acid_kewpie (Post 4660683)
eww no.

hey acid. why you no like ?

acid_kewpie 04-23-2012 08:49 AM

why would you run nautilus EVERY time you create a bash instance anywhere? there are proper mechanisms to do it, and they should be used. your way, I'm fairly sure you'd get a new instance of wireshark (without root access so only able to read capture files, not live network traffic) every time you opened a new terminal window etc.

uk.engr 04-24-2012 02:05 AM

Assalam o Alaikum!
I am still unable to start gui applications at login time. What I did:
[zohaib_shaikh@Zohaib ~]$ cd .config/
[zohaib_shaikh@Zohaib .config]$ cd autostart
[zohaib_shaikh@Zohaib autostart]$ ls
qstart.desktop wireshark.sh

I have made wireshark.sh executable script. containing command wireshark. but no result. plz help....


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