Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 259984 Details for
Bug 349272
net-misc/tigervnc-1.0.1_p20100914-r4: Fluxbox can't connect to XServer
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Port of upstream commit e8ce9ed3a38e1b4a3e5727d408d0fac0e2ff1ada
fluxbox-1.1.1-fix-display.patch (text/plain), 2.12 KB, created by
Charlie Brackett
on 2011-01-16 00:10:19 UTC
(
hide
)
Description:
Port of upstream commit e8ce9ed3a38e1b4a3e5727d408d0fac0e2ff1ada
Filename:
MIME Type:
Creator:
Charlie Brackett
Created:
2011-01-16 00:10:19 UTC
Size:
2.12 KB
patch
obsolete
>bugfix: do not assume ':number.screen' as the result of 'DisplayString()' > >a newer xlib recently changed the result of 'DisplayString()' a little bit: >instead of returning ':0.0' or ':1.0' it yields ':0' or ':1'. our code to >transform this string into something that includes the currently used >Screen worked only on something like ':0.0'. > >we now find the '.' after the ':' and strip that part away. > >Upstream commit 'e8ce9ed3a38e1b4a3e5727d408d0fac0e2ff1ada' >--- > src/FbCommands.cc | 20 +++++++++++++++----- > 1 files changed, 15 insertions(+), 5 deletions(-) > >diff --git a/src/FbCommands.cc b/src/FbCommands.cc >index fd3f71e..2afd887 100644 >--- a/src/FbCommands.cc >+++ b/src/FbCommands.cc >@@ -142,6 +142,10 @@ int ExecuteCmd::run() { > if (pid) > return pid; > >+ // 'displaystring' is given as 'host:number.screen'. we want to give the >+ // new app a good home, so we remove '.screen' from what is given >+ // us from the xserver and replace it with the screen_num of the Screen >+ // the user currently points at with the mouse > string displaystring("DISPLAY="); > displaystring += DisplayString(FbTk::App::instance()->display()); > char intbuff[64]; >@@ -155,18 +159,24 @@ int ExecuteCmd::run() { > > sprintf(intbuff, "%d", screen_num); > >+ // strip away the '.screen' >+ size_t dot = displaystring.rfind(':'); >+ dot = displaystring.find('.', dot); >+ if (dot != string::npos) { // 'displaystring' has actually a '.screen' part >+ displaystring.erase(dot); >+ } >+ displaystring += '.'; >+ displaystring += intbuff; >+ >+ putenv(const_cast<char *>(displaystring.c_str())); >+ > // get shell path from the environment > // this process exits immediately, so we don't have to worry about memleaks > const char *shell = getenv("SHELL"); > if (!shell) > shell = "/bin/sh"; > >- // remove last number of display and add screen num >- displaystring.erase(displaystring.size()-1); >- displaystring += intbuff; >- > setsid(); >- putenv(const_cast<char *>(displaystring.c_str())); > execl(shell, shell, "-c", m_cmd.c_str(), static_cast<void*>(NULL)); > exit(EXIT_SUCCESS); > >-- >1.7.3.5 >
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 Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 349272
: 259984