General :: Receive Shutdown Broadcast Notification In Desktop (GNU, Gnome)

Jul 17, 2011

When # shutdown +5 is run all the terminals (including pseudo terminals) are sent broadcast messages saying system is about to go down. Is it possible for user to receive this in the form of OSD or system tray notification so that he will be informed even if he is not running any terminal emulator or running it but minimized it and working with something else?

View 1 Replies


ADVERTISEMENT

Networking :: Interface Alias Does Not Receive Broadcast Traffic

Sep 25, 2010

When setting up an alias for eth0, the interface works as expected for normal traffic, but does not receive broadcast traffic.

Host 1's setup:

Code:

Pinging host 1's normal interface from host 2 works as expected:

Code:

Pinging host 1's alias interface from host 2 works as expected:

Code:

Broadcast pinging from host 2 only gets a reply from host 1's real interface (as well as some other uninteresting devices on the network):

Code:

I have confirmed by listening on both interfaces using netcat, and broadcasting using netcat, and again only the real interface receives data.

Is this by design, or is it possible to get interface aliases to receive broadcast traffic?

View 1 Replies View Related

Networking :: Broadcast Packets Failed To Receive - Socket Beginner

Feb 24, 2011

I am working on uClinux/almost same as Linux. I am new to socket programming. I have two micro controllers running on same code. Simple run with arguments mean send merged string.
run 1st micro controller (Send): ./Name "anystring"
run 2st micro controller (Recive):/Name

My code is:
int receive() {
// Create socket
int sock_fd;
struct sockaddr_in addr;
char buffer[kBufferSize];
int bytes_received=0;
int addr_len = sizeof(addr);
printf("receive start ");
sock_fd = socket(AF_INET, SOCK_DGRAM, 0);
if ( sock_fd == -1 ) {
printf("receive Create ");
// Error occurred return 0; }
printf("Res Create sucee ");
// Create address from which we want to receive, and bind it
memset(&addr, 0, sizeof(addr));
addr.sin_family = AF_INET;
addr.sin_addr.s_addr = INADDR_ANY;
addr.sin_port = htons(kPortNumber);
if ( bind(sock_fd, (struct sockaddr*)&addr, sizeof(addr)) < 0 ) {
printf("receive bind "); // Error occurred return 0; }
printf("Bind Succeful sucee ");
while ( 1 ) {
// Receive a message, waiting if there's nothing there yet
bytes_received = recvfrom(sock_fd, buffer, kBufferSize-0, 0,
(struct sockaddr*)&addr, &addr_len);
if ( bytes_received < 0 ) { // Error occurred
printf("receive bytes "); return 0; }
printf(" bytes_received succeful ");
printf("Ressocketstring : %s ",buffer);
memset(Ressocketstring,0x00 , sizeof(Ressocketstring));
strcpy(buffer,Ressocketstring); printf("Ressocketstring : %s
",Ressocketstring); printf(" ");
printf("Hello Receive finished");
// Now we have bytes_received bytes of data in buffer. Print it!
fwrite(buffer, sizeof(char), bytes_received, stdout); } }
int transmit(char * data, int length) {
int sock_fds[kMaxSockets];
// Obtain list of all network interfaces
/* struct ifaddrs *addrs;
if ( getifaddrs(&addrs) < 0 ) {
// Error occurred return 0; } */
// Loop through interfaces, selecting those AF_INET devices that support broadcast, but aren't loopback or point-to-point
struct sockaddr_in addr; int number_sockets = 0; struct hostent *he;
/* const struct ifaddrs *cursor = addrs;
while ( cursor != NULL && number_sockets < kMaxSockets ) {
if ( cursor->ifa_addr->sa_family == AF_INET
&& !(cursor->ifa_flags & IFF_LOOPBACK)
&& !(cursor->ifa_flags & IFF_POINTOPOINT)
&& (cursor->ifa_flags & IFF_BROADCAST) ) {
// Create socket*/
sock_fds[number_sockets] = socket(AF_INET, SOCK_DGRAM, 0);
if ( sock_fds[number_sockets] == -1 ) // Error occurred {
printf("Error Create "); return 0; }
he = gethostbyname((char *)BCASTADDRESS) ;
if (he==NULL ) {printf("Error gethostbyname ");
herror("gethostbyname"); printf("Error host "); exit(1);
} printf("Res He ");
// Create address from which we want to send, and bind it
memset(&addr, 0, sizeof(addr)); addr.sin_family = AF_INET;
addr.sin_addr = *((struct in_addr *)he->h_addr);//((struct sockaddr_in *)cursor->ifa_addr)->sin_addr; addr.sin_port = htons(kPortNumber);
if ( bind(sock_fds[number_sockets], (struct sockaddr*)&addr, sizeof(addr)) < 0 )
{ // Error occurred printf("Error bind "); return 0; }
// Enable broadcast int flag = 1;
if ( setsockopt(sock_fds[number_sockets], SOL_SOCKET, SO_BROADCAST, &flag, sizeof(flag)) != 0 ) // Err occur { printf("Error Enable "); return 0; }
number_sockets =1; printf("Succes 1 "); printf("transmit Create ");
// Initialise broadcast address memset(&addr, 0, sizeof(addr));
addr.sin_family = AF_INET; addr.sin_addr.s_addr = INADDR_BROADCAST;
addr.sin_port = htons(kPortNumber);
// Send through each interface int i;
for ( i=0; i<number_sockets; i++ ) {
if ( sendto(sock_fds[i], data, length, 0, (struct sockaddr*)&addr, sizeof(addr)) < 0 )
{ printf("Error Send "); // Error occurred return 0;
} printf("Succes 2 "); } return 1; } void MergeMessage( ) {
memset(socketstring,0x00,sizeof(socketstring));
sprintf(socketstring,"%s@%s@%s@%s@%s@%s@%s@%s@%s@%s@%s
",Tmeg.s1,Tmeg.s2,Tmeg.s3,Tmeg.s4,Tmeg.s5,Tm eg.s6,Tmeg.s7,Tmeg.s8,Tmeg.s9,Tmeg.s10,Tmeg.s11);
printf(" MergeSocketMessage : %s ",socketstring); }
int main (int argc, char** argv) {
int fd=0,bdc=0; struct ifreq ifr; printf("Tsarting man ");
fd = socket(AF_INET, SOCK_DGRAM, 0);
strncpy(ifr.ifr_name, "eth0", IFNAMSIZ-1);
ioctl(fd, SIOCGIFADDR, &ifr); close(fd);
memset(MYIP,'-',sizeof(MYIP));
memset(BCASTADDRESS,'-',sizeof(BCASTADDRESS));
strcpy(MYIP, inet_ntoa(((struct sockaddr_in *)&ifr.ifr_addr)->sin_addr));
printf("Etho: %s ,len:%d ", MYIP,strlen(MYIP));
for(bdc=strlen(MYIP);MYIP[bdc-1]!='.';bdc--) {}
strncpy(BCASTADDRESS,MYIP,bdc-1); strcat(BCASTADDRESS,".255");
printf("BCASTADDRESS: %s ,len:%d
", BCASTADDRESS,strlen(BCASTADDRESS));
printf("Initial Broad Cast message "); {
/*s0"0" (id=76)
s1"500" (id=77)s2"100" (id=78)s3"100" (id=78)s4"startVD" (id=79)
s5"lighting" (id=80)s6"reading" (id=81)s7"Anna" (id=82)s8"0" (id=76)
s9"";s10"" (id=64)s11"" (id=64)*/
strcpy(Tmeg.s0,"0"); strcpy(Tmeg.s1,"500");strcpy(Tmeg.s2,"100");strcpy(Tmeg.s3,"100");
strcpy(Tmeg.s4,"startvd");strcpy(Tmeg.s5,"lighting");strcpy(Tmeg.s6,"reading");
strcpy(Tmeg.s7,"anna");strcpy(Tmeg.s8,"0"); }
MergeMessage (Tmeg); if( strlen(argv[1]) ) {
//strcpy(socketstring,Tmeg,sizeof(Tmeg));
if(transmit(socketstring, strlen(socketstring) ) ) {
printf(""%s" transmitted. ", socketstring); } else {
printf("Error occurred: %s ", strerror(errno)); return 1; } }
else { for( ; ; ) {
if ( argc < 2 ) // No argument: Just listen {
printf("Listening... "); if ( !receive() ) {
printf("Error occurred: %s ", strerror(errno)); return 1;
} return 0; } } } printf("Finished "); return 0;
} //////////////// .h file is /////////////
//#define WIN32_LEAN_AND_MEAN// Exclude rarely-used stuff from Windows headers
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <net/if.h>
#include <fcntl.h>
#include <netdb.h>
#include <signal.h>
#include <sys/wait.h>
#include <sys/ioctl.h>
#define SubLen50
//#include <ifaddrs.h>
#include <errno.h>
char MYIP[20];
char BCASTADDRESS[20];
typedef struct {
char s0[SubLen];
char s1[SubLen];
char s2[SubLen];
char s3[SubLen];
char s4[SubLen];
char s5[SubLen];
char s6[SubLen];
char s7[SubLen];
char s8[SubLen];
char s9[SubLen];
char s10[SubLen];
char s11[SubLen];
}msg_struct;
msg_struct Sendmsg;
msg_struct Tmeg; //Recivemsg;
Boolean pri[6];
char socketstring[SubLen*12];
char Ressocketstring[SubLen*12];
int kBufferSize = (SubLen*12);

View 2 Replies View Related

Fedora :: Gnome Desktop Does Not Start After Shutdown On 14?

Aug 31, 2011

After power off the Gnome desktop environment does not start on my machine. It never gets past the splash screen with Fedora logo.The OS boots, and I can ssh and even run graphical applications, such as Thunderbird, remotely. No errors are reported in /var/log/Xorg.0.log. There are errors reported in .xsession-errors (attached) but I do not now how to recover from them

View 8 Replies View Related

Programming :: Receive The Notification On Internet Disconnection?

Mar 21, 2011

I am writing a chatting program and want to receive the notification on Internet disconnection (e.g. when the cable is unplugged). Is there any way to achieve this?

View 1 Replies View Related

General :: Keep Notification Area Always Show On GNOME 3?

Apr 16, 2011

I've installed GNOME 3 on my Gentoo Linux, it really awesome and I love it.But here is a little glitch that I don't get used to: The notification area is hide until I hit "Windows" key or move the mouse cursor to the right-bottom corner.Since I've some program use the notification to indicate their status (for example, my Chinese input method use this to indicate whether I'm in English mode or Chinese mode. And a program that show the CPU temperature on the notification area).It becomes a little inconvenient if I've to move the cursor or hit "Windows" key just in order to check those status.

So is it possible to make the notification area always show on the screen? Or is it possible to integrate the notification area to menu bar just like GNOME 2.X or XFCE4?Besides that, I would like to know is it possible to remove the accessibility on the menu bar top-right corner?

View 1 Replies View Related

Debian Multimedia :: Create "shutdown" Launcher On The Gnome Desktop

Apr 23, 2011

How to create "shutdown" launcher on the Gnome Desktop von squeeze that can be executed by normal non-root user?

View 2 Replies View Related

Server :: Begin Online TV Broadcast - Can't Directly Broadcast From Country

Apr 1, 2010

Friends i have an idea to broadcast few local TV channels to the world via internet.But friends i can't directly broadcast from my country because of bandwidth.friends is there a way to do this through a remote server server? i just need to input my stream to a remote server and then broadcast it from the server.I can stream channels to the server from my country through a 10mbbs connection.

View 2 Replies View Related

General :: No Option To Hibernate/shutdown In GNOME 3?

Apr 6, 2011

I have installed Fedora 15 Alpha with GNOME 3. Everything is working fine. However, I can't see any option to hibernate or shutdown.

In the top panel when I click my user name, I only have one option and that is to suspend. Normally I like to hibernate or shutdown. And I can't see any option of what to do when I close my netbook. Normally, I prefer to hibernate.

View 3 Replies View Related

General :: Determine What Gnome Desktop Number A Gnome Terminal Is Connected To?

Apr 29, 2010

In KDE's Konsole, I can do the following from the terminal:

dcop kwin KWinInterface currentDesktop

And it will tell me which desktop my terminal is connected to ( per [URL])

How can I determine what desktop number the current gnome terminal in a gnome session is connected to?

View 1 Replies View Related

General :: Ubuntu Gnome Applet Panel Power Button Won't Shutdown Machine

Nov 3, 2010

I have Ubuntu 10.10 on e-machine T-1221 I can shut down the machine using :

sudo shutdown -h from terminal

I can shutdown using powerbutton on case. I can't use the applet indicator powerbutton in root account, but, I can use the command under "System-->-Shutdown" in root account, but I don't see "System-->-Shutdown" in users account. Is there a way to add it ? I installed Debian 6.0 Squeeze on my Acer Aspire 3620 Laptop it works just fine and has the same Gnome Desktop. The only thing different is that there is no powerbutton available thru Gnome applets, only the command on menu under" Sytem-->-Shutdown", which I'm fine with on this machine.

These are the things I tried on emachine T-1221

I tried "acpi=force"
I tried "noacpi"
I tried "noacpi nolapic"

I read the bug reports it stated that on live-cd there was only suspend and hibernate. There is no shutdown or reboot. I tried: "#start acpi", it closed with errors. It said that Ubuntu uses upstart. Is there a script which you can add to power button to add the shutdown.? Really I don't necessarily need powerbutton, I think the work around would be adding the command to "System-->-Menu.

View 3 Replies View Related

Ubuntu :: Desktop Notification Not Working?

Dec 23, 2010

I have a script running every 5 mins as user mail.I want to send desktop notification through this script.I tried notify-send by no success.

View 3 Replies View Related

Fedora :: Creating Custom Gnome Notification Icon?

Nov 7, 2010

creating your own notification icon for Gnome? Like the Power, Network, and Sound ones. I found something called Zenity but it doesn't seem to be able to create a drop-down menu and I can't see how I'd update the information in the icon once it is created. I have a script set up to check something and want to report the results back via a persistent notification icon, with the ability to change the icon and its properties (mouseover/tooltip text) and drown-down menu text as appropriate.

View 8 Replies View Related

Ubuntu Servers :: How To Connect Desktop To Send Receive Mails

Mar 26, 2010

I have added a ubuntu 9.10 desktop machine to a windows domain, I can log on to the ubuntu machine using domain user accounts and passwordds, now I want to configure the linux machine to connect to the MS exchange server 2003 in the domain to send receive emails. How can I do this? I tried installing thunderbird but it doesnt give an option for SMTP or ms exchange server in the mail settings.

View 3 Replies View Related

Fedora :: Gnome 3 Fallback. Can't Recover Clock And Notification Area?

Jun 22, 2011

I am using 64 bit F15 with gnome in fallback mode with compiz.I see the clock in the login screen, but with no changes clock does not show anymore and i can't see the notification area (the four desktops in the right corner as well as the windows name). I have deleted .gconf and .gconfd (that solved a similar issue time ago), but it does not work this time.I have

View 2 Replies View Related

Ubuntu :: Notification Area Becomes Ugly / Get Back To Default In Gnome?

Feb 19, 2011

Several days ago i installed kubuntu-desktop package in my ubuntu 10.04. everything works fine until i login back to gnome. my notification area appeared as in kde. it is fine for me but some notification popup become ugly and look corrupted. any idea to get back to default notification in gnome?

View 1 Replies View Related

Ubuntu :: Empathy Notification Sounds Not Working On One Desktop?

Apr 28, 2011

I have four different desktops, or workspaces, on here. I use one for a web browser, another for instant messaging, the third for Evolution, and the fourth for whatever, usually working in folders or word documents or whatnot. Whenever someone sends me a message on Empathy and I'm not focused on the chat window it dings. This is true for desktops 2-4, but when I'm on workspace 1 whether my web browser is minimized or not I don't get the notification sound, the persons message just appears as a notification panel.

View 9 Replies View Related

Ubuntu :: Notification Area Icons Appearing On Desktop / Sort It?

Jan 29, 2011

Note: the image may load slowly as it is a server on my home internet connection
[IMG]http://mshenrick.dyndns.org/Pictures/uf1.png
as you can see, most icons are in the notification area, but skype and any programs with icons opened after appear always on top in the top left corner.
I've tried moving things about to no avail

View 1 Replies View Related

Ubuntu Networking :: Desktop Popup Notification When WAN Dynamic Ip Address Changes?

Jul 23, 2011

Is there some kind of Ubuntu desktop application that notifies you when your WAN ip address has changed? I don't care about my LAN ip address. I need some kind of popup on the desktop when my ISP assigns the next dynamic WAN ip address.

View 1 Replies View Related

General :: Create A "Shutdown" Button On Xfce Desktop?

Mar 16, 2011

I have Debian Squeeze with xfce installed. How to create a "Shutdown" button on xfce Desktop?

View 4 Replies View Related

General :: Can't Log In At Gnome Desktop / Solution For This?

Aug 26, 2009

I am a complete newbie only had pc with linux installed for a week, for some stupid reason we had 8.10 pre-installed and decided to upgrade to 9.04 now we can't get past the gnome login screen asking for user name and password. Linux was already installed by mesh with a userename and password which we didn't change,we are really stumped as we can't get past this logon screen.

View 8 Replies View Related

General :: Change Desktop Gnome To Kde?

Jun 11, 2011

send me the information about how i change my desktop gnome to kde ?

View 5 Replies View Related

General :: Locate Shutdown Log For Linux Shutdown (RHL 5.1-2.6.18-53.el5PAE)

Apr 22, 2010

I cannot locate shutdown log for Linux shutdown to check various activities carried out during shutdown. I can view Startup Log which is availble on console>Applications>System Tools>System Logs.

I have included Shutdown/Startup in dbora, so that Oracle 10gR2 Shutdown/Startup will be automated during OS Shutdown/Startup.

I want to check Shutdown log because Oracle Shutdown was not running, as from $ORACLE_HOME/shutdown.log contains no entries, where as startup log contains latest startup details.

That means here 2 issues are there. One, I want to locate OS Shutdown Log and the other being Why Oracle Shutdown not getting executed.

View 2 Replies View Related

General :: Difference Between GDM And The Gnome Desktop When Using Startx?

Jul 19, 2011

I came along the comment (when you type startx => you won't go to KDM or GDM but directly to your standart desktop= KDE,GNOME,...) at [URL] and would like to know what the difference is if any.

View 2 Replies View Related

General :: Gnome Or KDE A Way To Set Up Desktop Icons For Computer?

May 15, 2010

Is Gnome or KDE a way to set up desktop icons for your computer?

View 1 Replies View Related

General :: Changing Desktop Of FEDORA 12 From Gnome To KDE?

Dec 2, 2010

I have checked the thread about the referred subject. However, I cannot find the gdk in /etc/sysconfig. I have fedora12 i686.

View 6 Replies View Related

General :: Gnome Desktop Does Not Display / Sort It?

Dec 1, 2009

I am using fedora9 os
when i logging to gnome in root user
then gnome desktop does not display ,it is white screen
i viewed log messages the message is

Resolved address "xml:readwrite:/root/.gconf" to a writable configuration source at position 0

View 2 Replies View Related

General :: How To Install Kde / Gnome Desktop On Centos5

Jan 26, 2011

i would like to know how to install kde / gnome desktop on centos5 but not use yum,because my yum always fails due proxy problem.

View 3 Replies View Related

OpenSUSE :: Gnome Won't Shutdown / Fix It?

Apr 7, 2011

I've installed openSUSE 11.4 fresh on my laptop. When I do a shutdown from Gnome and choose the Shut Down option I always return back to the login screen and from there I need to choose the shutdown command again and it works from there. Is there a way to fix the first shutdown option from within Gnome so that it shuts down instead of logging out?

View 1 Replies View Related

General :: How To Disable Broadcast Messages On Session

Jun 17, 2010

I get every 10 min many broadcast messages (maybe by other user). How can I disable those broadcast messages, in order to not see them on my screen?

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved