Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 36719 Details for
Bug 59316
nvidia-settings uses wrong display name
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
displaytest.c
displaytest.c (text/plain), 998 bytes, created by
Stefan Sperling
on 2004-08-03 16:01:07 UTC
(
hide
)
Description:
displaytest.c
Filename:
MIME Type:
Creator:
Stefan Sperling
Created:
2004-08-03 16:01:07 UTC
Size:
998 bytes
patch
obsolete
>#include <stdio.h> >#include <stdlib.h> >#include <unistd.h> >#include <string.h> >#include <X11/Xlib.h> > >void openDisplay(char* display) >{ > Display *d = NULL; > > printf("trying to open display %s\n", display); > > d = XOpenDisplay(display); > if (d) { > printf("successfully opened display %s\n", display); > XCloseDisplay(d); > if (d) free(d); > } > else { > printf("could not open display %s\n", display); > } >} > >#define MAX_HOSTNAME_LEN 1024 > >int main() >{ > char* display = getenv("DISPLAY"); > if(!display){ > printf("Could not determine your current display from the DISPLAY environment " > "variable.\nAre you running this program in X?\n"); > exit(1); > } > > char* display2 = (char*) malloc(MAX_HOSTNAME_LEN + strlen(display) + 1); > gethostname(display2, MAX_HOSTNAME_LEN); > strncat(display2, display, strlen(display)); > > openDisplay(display); > openDisplay(display2); > > free(display2); > exit(0); >} >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 59316
: 36719