[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-multimedia
Subject:    Re: startup of artsd
From:       Navindra Umanee <navindra () cs ! mcgill ! ca>
Date:       2000-08-28 15:57:07
[Download RAW message or body]

Martin Vogt <mvogt@rhrk.uni-kl.de> wrote:
> On Mon, Aug 28, 2000 at 01:09:40PM +0200, Stefan Schimanski wrote:
> > Hi,
> > 
> > at the moment artsd isn't started automatically at startup on my system. I 
> 
> I have the same problem.

Are you guys running Linux 2.4?  If so the problem with
kdeinit_wrapper is probably a bug in the kernel that needs to be
fixed.  Check this:

http://lists.kde.org/?l=kde-devel&m=96646385113092&w=2

This is a patch I use meanwhile for kdelibs/kinit/wrapper.c:

--- wrapper.c.old  Wed Apr  5 13:22:41 2000
+++ wrapper.c   Sun Aug  6 19:03:06 2000
@@ -89,8 +89,10 @@
 {
   ksize_t socklen;
   int s;
+  int result;
   struct sockaddr_un server;
 #define MAX_SOCK_FILE 255
+  char sock_file_link[MAX_SOCK_FILE];
   char sock_file[MAX_SOCK_FILE];
   char *home_dir = getenv("HOME");
   char *display;
@@ -106,13 +108,13 @@
      fprintf(stderr, "Aborting. Home directory path too long!");
      exit(255);
   }
-  strcpy(sock_file, home_dir);
+  strcpy(sock_file_link, home_dir);
   /** Strip trailing '/' **/
-  if ( sock_file[strlen(sock_file)-1] == '/')
-     sock_file[strlen(sock_file)-1] = 0;
+  if ( sock_file_link[strlen(sock_file_link)-1] == '/')
+     sock_file_link[strlen(sock_file_link)-1] = 0;

-  strcat(sock_file, "/.kdeinit-");
-  if (gethostname(sock_file+strlen(sock_file), MAX_SOCK_FILE - strlen(sock_file
) - 1) != 0)
+  strcat(sock_file_link, "/.kdeinit-");
+  if (gethostname(sock_file_link+strlen(sock_file_link), MAX_SOCK_FILE - strlen
(sock_file_link) - 1) != 0)
   {
      perror("Aborting. Could not determine hostname: ");
      exit(255);
@@ -125,13 +127,21 @@
      fprintf(stderr, "Aborting. $DISPLAY is not set.\n");
-  if (strlen(sock_file)+strlen(display)+2 > MAX_SOCK_FILE)
+  if (strlen(sock_file_link)+strlen(display)+2 > MAX_SOCK_FILE)
   {
      fprintf(stderr, "Aborting. Socket name will be too long.\n");
      exit(255);
   }
-  strcat(sock_file, "-");
-  strcat(sock_file, display);
+  strcat(sock_file_link, "-");
+  strcat(sock_file_link, display);
+
+  result = readlink(sock_file_link, sock_file, MAX_SOCK_FILE);
+  if (result == -1)
+  {
+     fprintf(stderr, "Aborting. readlink() on symlink failed.\n");
+     exit(255);
+  }
+  sock_file[result] = 0;
 
   if (strlen(sock_file) >= sizeof(server.sun_path))
   {
_______________________________________________
Kde-multimedia mailing list
Kde-multimedia@master.kde.org
http://master.kde.org/mailman/listinfo/kde-multimedia

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic