uxlaunch:

- add patch to specify xorg configfile to uxlaunch
This commit is contained in:
Stephan Raue 2010-03-21 15:41:41 +01:00
parent c9cfc2ddc4
commit 262405c8cd

View File

@ -0,0 +1,93 @@
diff -Naur uxlaunch-0.46/options.c uxlaunch-0.46.patch/options.c
--- uxlaunch-0.46/options.c 2010-03-04 19:51:44.000000000 +0100
+++ uxlaunch-0.46.patch/options.c 2010-03-21 14:07:15.273504664 +0100
@@ -27,6 +27,7 @@
int tty = 2;
char session[256] = "/usr/bin/mutter --sm-disable";
char username[256] = "moblin";
+char xconfig[256] = "/etc/X11/xorg.conf";
int verbose = 0;
@@ -34,6 +35,7 @@
{ "user", 1, NULL, 'u' },
{ "tty", 1, NULL, 't' },
{ "session", 1, NULL, 's' },
+ { "xconfig", 1, NULL, 'c' },
{ "help", 0, NULL, 'h' },
{ "verbose", 0, NULL, 'v' },
{ 0, 0, NULL, 0}
@@ -46,6 +48,7 @@
printf(" -u, --user Start session as specific username\n");
printf(" -t, --tty Start session on alternative tty number\n");
printf(" -s, --session Start a non-default session\n");
+ printf(" -c, --xconfig Xorg config file\n");
printf(" -v, --verbose Display lots of output to the console\n");
printf(" -h, --help Display this help message\n");
}
@@ -126,13 +129,15 @@
tty = atoi(val);
if (!strcmp(key, "session"))
strncpy(session, val, 256);
+ if (!strcmp(key, "xconfig"))
+ strncpy(xconfig, val, 256);
}
fclose(f);
}
/* parse cmdline - overrides */
while (1) {
- c = getopt_long(argc, argv, "u:t:s:hv", opts, &i);
+ c = getopt_long(argc, argv, "u:t:s:c:hv", opts, &i);
if (c == -1)
break;
@@ -146,6 +151,9 @@
case 's':
strncpy(session, optarg, 256);
break;
+ case 'c':
+ strncpy(xconfig, optarg, 256);
+ break;
case 'h':
usage(argv[0]);
exit (EXIT_SUCCESS);
@@ -171,7 +179,7 @@
}
lprintf("uxlaunch v%s started.", VERSION);
- lprintf("user \"%s\", tty #%d, session \"%s\"", username, tty, session);
+ lprintf("user \"%s\", tty #%d, session \"%s\", xconfig \"%s\"", username, tty, session, xconfig);
pass = getpwnam(username);
if (!pass)
diff -Naur uxlaunch-0.46/uxlaunch.h uxlaunch-0.46.patch/uxlaunch.h
--- uxlaunch-0.46/uxlaunch.h 2010-03-04 19:51:44.000000000 +0100
+++ uxlaunch-0.46.patch/uxlaunch.h 2010-03-21 14:09:01.116504932 +0100
@@ -19,6 +19,7 @@
extern int tty;
extern char session[];
extern char username[];
+extern char xconfig[];
extern int session_pid;
extern int xpid;
diff -Naur uxlaunch-0.46/xserver.c uxlaunch-0.46.patch/xserver.c
--- uxlaunch-0.46/xserver.c 2010-03-04 19:51:44.000000000 +0100
+++ uxlaunch-0.46.patch/xserver.c 2010-03-21 14:07:43.871631141 +0100
@@ -231,13 +231,13 @@
execl(xserver, xserver, displayname,
"-nolisten", "tcp", "-dpi", "120", "-noreset",
"-auth", xauth_cookie_file,
- vt, NULL);
+ vt, "-config", xconfig, NULL);
} else {
execl(xserver, xserver, displayname,
"-nolisten", "tcp", "-dpi", "120", "-noreset",
"-auth", user_xauth_path,
"-logfile", xorg_log,
- vt, NULL);
+ vt, "-config", xconfig, NULL);
}
exit(0);
}