r189: Effective permissions are shown in brackets.
[rox-filer.git] / ROX-Filer / src / run.c
blob2bc5741d5c7700fad630f2738162a369f875376b
1 /*
2 * $Id$
4 * ROX-Filer, filer for the ROX desktop project
5 * Copyright (C) 1999, Thomas Leonard, <tal197@ecs.soton.ac.uk>.
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the Free
9 * Software Foundation; either version 2 of the License, or (at your option)
10 * any later version.
12 * This program is distributed in the hope that it will be useful, but WITHOUT
13 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
15 * more details.
17 * You should have received a copy of the GNU General Public License along with
18 * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
19 * Place, Suite 330, Boston, MA 02111-1307 USA
22 /* run.c */
24 #include <sys/stat.h>
26 #include "stdlib.h"
27 #include "support.h"
28 #include "gui_support.h"
29 #include "filer.h"
30 #include "menu.h"
32 /* An application has been double-clicked (or run in some other way) */
33 void run_app(char *path)
35 GString *apprun;
36 char *argv[] = {NULL, NULL};
38 apprun = g_string_new(path);
39 argv[0] = g_string_append(apprun, "/AppRun")->str;
41 if (!spawn_full(argv, getenv("HOME")))
42 report_error("ROX-Filer", "Failed to fork() child process");
44 g_string_free(apprun, TRUE);