New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to start X server after pact install xorg-server xinit #222

Closed
dantesun opened this Issue Jan 8, 2015 · 17 comments

Comments

Projects
None yet
8 participants
@dantesun

dantesun commented Jan 8, 2015

After I install xserver using pact, I always get error code 127 when I executing 'startxwin' or 'startx'. It seems xinit won't work. The error code is reported by xinit according to the bash outputs. I have no clue how to solve it. I am using Windows 7 Ultimate 64 bit version.

{ ~ } » bash -x /usr/bin/startxwin ~ 127

  • unset DBUS_SESSION_BUS_ADDRESS
  • unset SESSION_MANAGER
  • userclientrc=/home/dsun/.startxwinrc
  • sysclientrc=/etc/X11/xinit/startxwinrc
  • userserverrc=/home/dsun/.xserverrc
  • sysserverrc=/etc/X11/xinit/xserverrc
  • defaultclient=xterm
  • defaultserver=/usr/bin/XWin
  • defaultclientargs=
  • defaultserverargs=-multiwindow
  • defaultdisplay=:0
  • clientargs=
  • serverargs=
  • vtarg=
  • listenarg='-nolisten tcp'
  • enable_xauth=1
  • d=0
  • true
  • '[' -e /tmp/.X0-lock ']'
  • break
  • defaultdisplay=:0
  • unset d
  • whoseargs=client
  • '[' x '!=' x ']'
  • '[' x = x ']'
  • client=xterm
  • '[' x = x ']'
  • '[' -f /home/dsun/.startxwinrc ']'
  • '[' -f /etc/X11/xinit/startxwinrc ']'
  • '[' x = x ']'
  • clientargs=
  • '[' x = x ']'
  • server=/usr/bin/XWin
  • '[' x = x -a x = x ']'
  • '[' -f /home/dsun/.xserverrc ']'
  • '[' -f /etc/X11/xinit/xserverrc ']'
  • '[' x = x ']'
  • serverargs=-multiwindow
  • have_vtarg=no
  • for i in '$serverargs'
  • expr match -multiwindow '^vt[0-9]+$'
  • '[' no = no ']'
  • serverargs='-multiwindow '
  • serverargs='-multiwindow -nolisten tcp'
  • '[' x = x ']'
  • display=:0
  • '[' x1 = x1 ']'
  • '[' x = x ']'
  • XAUTHORITY=/home/dsun/.Xauthority
  • export XAUTHORITY
  • removelist=
  • case uname in
    ++ uname
    ++ hostname
  • hostname=DanteSun-T410
  • authdisplay=:0
    ++ /usr/bin/mcookie
  • mcookie=9d4ec1e98d53fcdd0f425f060a9c5912
  • test x9d4ec1e98d53fcdd0f425f060a9c5912 = x
  • dummy=0
  • xserverauthfile=/home/dsun/.serverauth.3944
  • trap 'rm -f '''/home/dsun/.serverauth.3944'''' HUP INT QUIT ILL TRAP KILL BUS TERM
  • touch /home/dsun/.serverauth.3944
  • xauth -q -f /home/dsun/.serverauth.3944
    ++ echo /home/dsun/.serverauth.3944
    ++ sed 's/'''/'''''''''/g'
  • xserverauthfilequoted=/home/dsun/.serverauth.3944
  • serverargs='-multiwindow -nolisten tcp -auth '''/home/dsun/.serverauth.3944''''
  • for displayname in '$authdisplay' '$hostname$authdisplay'
    ++ xauth list :0
    ++ sed -n 's/.:0[[:space:]].[[:space:]]//p'
  • authcookie=
  • '[' z = z ']'
  • xauth -q
  • removelist=':0 '
  • for displayname in '$authdisplay' '$hostname$authdisplay'
    ++ xauth list DanteSun-T410:0
    ++ sed -n 's/.DanteSun-T410:0[[:space:]].[[:space:]]//p'
  • authcookie=
  • '[' z = z ']'
  • xauth -q
  • removelist='DanteSun-T410:0 :0 '
  • eval xinit '"xterm"' -- '"/usr/bin/XWin"' :0 -multiwindow -nolisten tcp -auth ''''/home/dsun/.serverauth.3944''''
    ++ xinit xterm -- /usr/bin/XWin :0 -multiwindow -nolisten tcp -auth /home/dsun/.serverauth.3944
  • retval=127
  • '[' x1 = x1 ']'
  • '[' 'xDanteSun-T410:0 :0 ' '!=' x ']'
  • xauth remove DanteSun-T410:0 :0
  • '[' x/home/dsun/.serverauth.3944 '!=' x ']'
  • rm -f /home/dsun/.serverauth.3944
  • exit 127
@darinkes

This comment has been minimized.

Show comment
Hide comment
@darinkes

darinkes Jan 15, 2015

Contributor

Same here. Any hints on this topic?
OS is Windows 8.1 Pro 64bit

Contributor

darinkes commented Jan 15, 2015

Same here. Any hints on this topic?
OS is Windows 8.1 Pro 64bit

@darinkes

This comment has been minimized.

Show comment
Hide comment
@darinkes

darinkes Jan 15, 2015

Contributor

The problem seems to come from bugs in pact.
It seems to ignore the postinstall-scripts of the packages which gets installed with:
pact xinit xorg-server xterm

I can see a lot of unexecuted shell scripts with missing .done in /etc/postinstall and some are missing.

If I start the cygwin-setup with root pointing to my .babun/cygwin I can install and use the X-Server.

Contributor

darinkes commented Jan 15, 2015

The problem seems to come from bugs in pact.
It seems to ignore the postinstall-scripts of the packages which gets installed with:
pact xinit xorg-server xterm

I can see a lot of unexecuted shell scripts with missing .done in /etc/postinstall and some are missing.

If I start the cygwin-setup with root pointing to my .babun/cygwin I can install and use the X-Server.

@darinkes

This comment has been minimized.

Show comment
Hide comment
@darinkes

darinkes Jan 15, 2015

Contributor

{ ~ } » pact remove xinit
Removing xinit
rmdir: failed to remove ‘/cygdrive/c/Users/Stefan/AppData/Roaming/Microsoft/Windows/Start Menu/Programs/Cygwin-X’: No such file or directory
/bin/rmdir: failed to remove ‘/cygdrive/c/Users/Stefan/AppData/Roaming/Microsoft/Windows/Start Menu/Programs/Cygwin-X’: No such file or directory
Package xinit removed
{ ~ } » ls -l /etc/postinstall/.sh
ls: cannot access /etc/postinstall/
.sh: No such file or directory
{ ~ } » pact install xinit
Working directory is /setup
Mirror is http://mirrors.kernel.org/sourceware/cygwin/
setup.ini taken from the cache

Installing xinit
Found package xinit
File ‘xinit-1.3.4-1.tar.xz’ already there; not retrieving.

Unpacking...
Package xinit requires the following packages, installing:
bash coreutils cygutils libX11_6 dbus-x11 fbpanel run sed util-linux setxkbmap xauth xdg-user-dirs xmodmap xrdb xorg-server xterm cygwin
Package bash is already installed, skipping
Package coreutils is already installed, skipping
Package cygutils is already installed, skipping
Package libX11_6 is already installed, skipping
Package dbus-x11 is already installed, skipping
Package fbpanel is already installed, skipping
Package run is already installed, skipping
Package sed is already installed, skipping
Package util-linux is already installed, skipping
Package setxkbmap is already installed, skipping
Package xauth is already installed, skipping
Package xdg-user-dirs is already installed, skipping
Package xmodmap is already installed, skipping
Package xrdb is already installed, skipping
Package xorg-server is already installed, skipping
Package xterm is already installed, skipping
Package cygwin is already installed, skipping
NOSCRIPT: 0
Package xinit installed
{ ~ } » ls -l /etc/postinstall/*.sh
-rwxrwxr-x+ 1 Stefan Kein 1944 Nov 28 00:20 /etc/postinstall/xinit.sh

Contributor

darinkes commented Jan 15, 2015

{ ~ } » pact remove xinit
Removing xinit
rmdir: failed to remove ‘/cygdrive/c/Users/Stefan/AppData/Roaming/Microsoft/Windows/Start Menu/Programs/Cygwin-X’: No such file or directory
/bin/rmdir: failed to remove ‘/cygdrive/c/Users/Stefan/AppData/Roaming/Microsoft/Windows/Start Menu/Programs/Cygwin-X’: No such file or directory
Package xinit removed
{ ~ } » ls -l /etc/postinstall/.sh
ls: cannot access /etc/postinstall/
.sh: No such file or directory
{ ~ } » pact install xinit
Working directory is /setup
Mirror is http://mirrors.kernel.org/sourceware/cygwin/
setup.ini taken from the cache

Installing xinit
Found package xinit
File ‘xinit-1.3.4-1.tar.xz’ already there; not retrieving.

Unpacking...
Package xinit requires the following packages, installing:
bash coreutils cygutils libX11_6 dbus-x11 fbpanel run sed util-linux setxkbmap xauth xdg-user-dirs xmodmap xrdb xorg-server xterm cygwin
Package bash is already installed, skipping
Package coreutils is already installed, skipping
Package cygutils is already installed, skipping
Package libX11_6 is already installed, skipping
Package dbus-x11 is already installed, skipping
Package fbpanel is already installed, skipping
Package run is already installed, skipping
Package sed is already installed, skipping
Package util-linux is already installed, skipping
Package setxkbmap is already installed, skipping
Package xauth is already installed, skipping
Package xdg-user-dirs is already installed, skipping
Package xmodmap is already installed, skipping
Package xrdb is already installed, skipping
Package xorg-server is already installed, skipping
Package xterm is already installed, skipping
Package cygwin is already installed, skipping
NOSCRIPT: 0
Package xinit installed
{ ~ } » ls -l /etc/postinstall/*.sh
-rwxrwxr-x+ 1 Stefan Kein 1944 Nov 28 00:20 /etc/postinstall/xinit.sh

@darinkes

This comment has been minimized.

Show comment
Hide comment
@darinkes

darinkes Jan 15, 2015

Contributor

I'm not sure why, but this diff fixes the postinstall and X11 Issue for me ;)

{ ~ }  » diff -uNp /usr/local/bin/pact.orig /usr/local/bin/pact
--- /usr/local/bin/pact.orig    2015-01-16 00:10:38.581293400 +0100
+++ /usr/local/bin/pact 2015-01-16 00:09:56.043970000 +0100
@@ -366,11 +366,11 @@ case "$command" in

     # run all postinstall scripts

-    pis=`ls /etc/postinstall/*.sh 2>/dev/null | wc -l`
+    pis=`sh -c 'ls /etc/postinstall/*.sh 2>/dev/null | wc -l'`
     if test $pis -gt 0 && ! test $noscripts -eq 1
     then
       echo Running postinstall scripts
-      for script in /etc/postinstall/*.sh
+      for script in `sh -c 'ls /etc/postinstall/*.sh'`
       do
         $script
         mv $script $script.done
Contributor

darinkes commented Jan 15, 2015

I'm not sure why, but this diff fixes the postinstall and X11 Issue for me ;)

{ ~ }  » diff -uNp /usr/local/bin/pact.orig /usr/local/bin/pact
--- /usr/local/bin/pact.orig    2015-01-16 00:10:38.581293400 +0100
+++ /usr/local/bin/pact 2015-01-16 00:09:56.043970000 +0100
@@ -366,11 +366,11 @@ case "$command" in

     # run all postinstall scripts

-    pis=`ls /etc/postinstall/*.sh 2>/dev/null | wc -l`
+    pis=`sh -c 'ls /etc/postinstall/*.sh 2>/dev/null | wc -l'`
     if test $pis -gt 0 && ! test $noscripts -eq 1
     then
       echo Running postinstall scripts
-      for script in /etc/postinstall/*.sh
+      for script in `sh -c 'ls /etc/postinstall/*.sh'`
       do
         $script
         mv $script $script.done
@darinkes

This comment has been minimized.

Show comment
Hide comment
@darinkes

darinkes Jan 30, 2015

Contributor

Is this project already dead? No reactions in 2 weeks by any developer or a single commit to the repo in 4 months. Would be a pity :(

Contributor

darinkes commented Jan 30, 2015

Is this project already dead? No reactions in 2 weeks by any developer or a single commit to the repo in 4 months. Would be a pity :(

@tombujok

This comment has been minimized.

Show comment
Hide comment
@tombujok

tombujok Jan 30, 2015

Contributor

No, this project is definitely not dead. Fix release will be published in one month, a bigger release in May. I am looking for active contiributors who could fix things and propose solutions, Comments are appreciated, but they are not bringing the project forward. X-Server was never a priority for babun. Should it be important for you, please, solve the issues and code-up an xserver plugin that would solve them for everyone. The doc describes it in details. It's Open-Source!
There are some guys who made it working: #105
You can all pair up and bring the XServer thing forward.

Contributor

tombujok commented Jan 30, 2015

No, this project is definitely not dead. Fix release will be published in one month, a bigger release in May. I am looking for active contiributors who could fix things and propose solutions, Comments are appreciated, but they are not bringing the project forward. X-Server was never a priority for babun. Should it be important for you, please, solve the issues and code-up an xserver plugin that would solve them for everyone. The doc describes it in details. It's Open-Source!
There are some guys who made it working: #105
You can all pair up and bring the XServer thing forward.

@darinkes

This comment has been minimized.

Show comment
Hide comment
@darinkes

darinkes Jan 30, 2015

Contributor

hi,

good to see a reaction 👍
As i mentioned at the previous comments there is a bug in pact,
which affects all packages with postinstall scripts. It's not a exclusive xserver issue, so a plugin
won't solve the problem. I know it's open source, this is why I tracked down the issue and even
proposed a patch for it. Since this patch looks weird to me, I didn't create a pull request for it.
Maybe you can take a look at it and comment it.

{ ~ }  » diff -uNp /usr/local/bin/pact.orig /usr/local/bin/pact
--- /usr/local/bin/pact.orig    2015-01-16 00:10:38.581293400 +0100
+++ /usr/local/bin/pact 2015-01-16 00:09:56.043970000 +0100
@@ -366,11 +366,11 @@ case "$command" in

     # run all postinstall scripts

-    pis=`ls /etc/postinstall/*.sh 2>/dev/null | wc -l`
+    pis=`sh -c 'ls /etc/postinstall/*.sh 2>/dev/null | wc -l'`
     if test $pis -gt 0 && ! test $noscripts -eq 1
     then
       echo Running postinstall scripts
-      for script in /etc/postinstall/*.sh
+      for script in `sh -c 'ls /etc/postinstall/*.sh'`
       do
         $script
         mv $script $script.done

Greetz & thanks in advance

Contributor

darinkes commented Jan 30, 2015

hi,

good to see a reaction 👍
As i mentioned at the previous comments there is a bug in pact,
which affects all packages with postinstall scripts. It's not a exclusive xserver issue, so a plugin
won't solve the problem. I know it's open source, this is why I tracked down the issue and even
proposed a patch for it. Since this patch looks weird to me, I didn't create a pull request for it.
Maybe you can take a look at it and comment it.

{ ~ }  » diff -uNp /usr/local/bin/pact.orig /usr/local/bin/pact
--- /usr/local/bin/pact.orig    2015-01-16 00:10:38.581293400 +0100
+++ /usr/local/bin/pact 2015-01-16 00:09:56.043970000 +0100
@@ -366,11 +366,11 @@ case "$command" in

     # run all postinstall scripts

-    pis=`ls /etc/postinstall/*.sh 2>/dev/null | wc -l`
+    pis=`sh -c 'ls /etc/postinstall/*.sh 2>/dev/null | wc -l'`
     if test $pis -gt 0 && ! test $noscripts -eq 1
     then
       echo Running postinstall scripts
-      for script in /etc/postinstall/*.sh
+      for script in `sh -c 'ls /etc/postinstall/*.sh'`
       do
         $script
         mv $script $script.done

Greetz & thanks in advance

@tombujok

This comment has been minimized.

Show comment
Hide comment
@tombujok

tombujok Jan 30, 2015

Contributor

Sorry, I didn't notice your patch... Thanks for your contribution.

The patch looks good, although I do not understand why it does not work the old way...
Would it be possible that you modify your local pact version and test 2-3 installs / uninstalls in bash and zsh to double-check that it works?

Contributor

tombujok commented Jan 30, 2015

Sorry, I didn't notice your patch... Thanks for your contribution.

The patch looks good, although I do not understand why it does not work the old way...
Would it be possible that you modify your local pact version and test 2-3 installs / uninstalls in bash and zsh to double-check that it works?

@darinkes

This comment has been minimized.

Show comment
Hide comment
@darinkes

darinkes Jan 30, 2015

Contributor

hehe, yeah... i did'n get it either.
I will do some more tests with it and then create a pull request for it.

Contributor

darinkes commented Jan 30, 2015

hehe, yeah... i did'n get it either.
I will do some more tests with it and then create a pull request for it.

darinkes added a commit to darinkes/babun that referenced this issue Jan 30, 2015

pact: Fix execution of postinstall scripts
This patches fixes the execution of postinstall script
in /etc/postinstall/. Somehow ls didn't return existing
*.sh-Files in /etc/postinstall.

While there add --debug flag which enables bash verbose
options. This helps to locate problems faster and
see whats actually happening.

Also fixes Issue #222.

darinkes added a commit to darinkes/babun that referenced this issue Jan 30, 2015

pact: Fix execution of postinstall scripts
This patches fixes the execution of postinstall script
in /etc/postinstall/. Somehow ls didn't return existing
*.sh-Files in /etc/postinstall.

Also fixes Issue #222.
@tombujok

This comment has been minimized.

Show comment
Hide comment
@tombujok

tombujok Mar 30, 2015

Contributor

Fixed in 1.1.0.
Release status: #266

Contributor

tombujok commented Mar 30, 2015

Fixed in 1.1.0.
Release status: #266

@RodenLuo

This comment has been minimized.

Show comment
Hide comment
@RodenLuo

RodenLuo Nov 11, 2016

The original problem still occurs to me. Below is the output. Very similar to original post. I have tried to modify /usr/local/bin/pact mentioned by @darinkes , but there is no line start with "pis=" in my version of babun.

Windows 10 Enterprise.
babun version 1.2.0

Hope someone can help or give a hint. Thx!

{ ~ } » bash -x /usr/bin/startxwin ~

  • unset DBUS_SESSION_BUS_ADDRESS
  • unset SESSION_MANAGER
  • userclientrc=/home/User/.startxwinrc
  • sysclientrc=/etc/X11/xinit/startxwinrc
  • userserverrc=/home/User/.xserverrc
  • sysserverrc=/etc/X11/xinit/xserverrc
  • defaultclient=xterm
  • defaultserver=/usr/bin/XWin
  • defaultclientargs=
  • defaultserverargs=
  • defaultdisplay=:0
  • clientargs=
  • serverargs=
  • vtarg=
  • display=
  • enable_xauth=1
  • d=0
  • true
  • '[' -e /tmp/.X0-lock -o -S /tmp/.X11-unix/X0 ']'
  • break
  • defaultdisplay=:0
  • unset d
  • whoseargs=client
  • '[' x '!=' x ']'
  • '[' x = x ']'
  • client=xterm
  • '[' x = x ']'
  • '[' -f /home/User/.startxwinrc ']'
  • '[' -x /home/User/.startxwinrc ']'
  • '[' -f /etc/X11/xinit/startxwinrc ']'
  • client=/etc/X11/xinit/startxwinrc
  • '[' x = x ']'
  • clientargs=
  • '[' x = x ']'
  • server=/usr/bin/XWin
  • '[' x = x -a x = x ']'
  • '[' -f /home/User/.xserverrc ']'
  • '[' -f /etc/X11/xinit/xserverrc ']'
  • '[' x = x ']'
  • serverargs=
  • serverargs='-multiwindow '
  • have_vtarg=no
  • for i in '$serverargs'
  • expr match -multiwindow '^vt[0-9]+$'
  • '[' no = no ']'
  • serverargs='-multiwindow '
  • '[' x = x ']'
  • display=:0
  • '[' x1 = x1 ']'
  • '[' x = x ']'
  • XAUTHORITY=/home/User/.Xauthority
  • export XAUTHORITY
  • removelist=
  • case uname in
    ++ uname
    ++ hostname
  • hostname=DESKTOP-V948PET
  • authdisplay=:0
    ++ /usr/bin/mcookie
  • mcookie=5691bd64277c57074598dc925dbd474f
  • test x5691bd64277c57074598dc925dbd474f = x
  • dummy=0
  • xserverauthfile=/home/User/.serverauth.9916
  • trap 'rm -f '''/home/User/.serverauth.9916'''' HUP INT QUIT ILL TRAP KILL BUS TERM
  • touch /home/User/.serverauth.9916
  • xauth -q -f /home/User/.serverauth.9916
    ++ echo /home/User/.serverauth.9916
    ++ sed 's/'''/'''''''''/g'
  • xserverauthfilequoted=/home/User/.serverauth.9916
  • serverargs='-multiwindow -auth '''/home/User/.serverauth.9916''''
  • for displayname in '$authdisplay' '$hostname$authdisplay'
    ++ xauth list :0
    ++ sed -n 's/.:0[[:space:]].[[:space:]]//p'
  • authcookie=
  • '[' z = z ']'
  • xauth -q
  • removelist=':0 '
  • for displayname in '$authdisplay' '$hostname$authdisplay'
    ++ xauth list DESKTOP-V948PET:0
    ++ sed -n 's/.DESKTOP-V948PET:0[[:space:]].[[:space:]]//p'
  • authcookie=
  • '[' z = z ']'
  • xauth -q
  • removelist='DESKTOP-V948PET:0 :0 '
  • eval xinit '"/etc/X11/xinit/startxwinrc"' -- '"/usr/bin/XWin"' :0 -multiwindow -auth ''''/home/User/.serverauth.9916''''
    ++ xinit /etc/X11/xinit/startxwinrc -- /usr/bin/XWin :0 -multiwindow -auth /home/User/.serverauth.9916
  • retval=127
  • '[' x1 = x1 ']'
  • '[' 'xDESKTOP-V948PET:0 :0 ' '!=' x ']'
  • xauth remove DESKTOP-V948PET:0 :0
  • '[' x/home/User/.serverauth.9916 '!=' x ']'
  • rm -f /home/User/.serverauth.9916
  • exit 127

RodenLuo commented Nov 11, 2016

The original problem still occurs to me. Below is the output. Very similar to original post. I have tried to modify /usr/local/bin/pact mentioned by @darinkes , but there is no line start with "pis=" in my version of babun.

Windows 10 Enterprise.
babun version 1.2.0

Hope someone can help or give a hint. Thx!

{ ~ } » bash -x /usr/bin/startxwin ~

  • unset DBUS_SESSION_BUS_ADDRESS
  • unset SESSION_MANAGER
  • userclientrc=/home/User/.startxwinrc
  • sysclientrc=/etc/X11/xinit/startxwinrc
  • userserverrc=/home/User/.xserverrc
  • sysserverrc=/etc/X11/xinit/xserverrc
  • defaultclient=xterm
  • defaultserver=/usr/bin/XWin
  • defaultclientargs=
  • defaultserverargs=
  • defaultdisplay=:0
  • clientargs=
  • serverargs=
  • vtarg=
  • display=
  • enable_xauth=1
  • d=0
  • true
  • '[' -e /tmp/.X0-lock -o -S /tmp/.X11-unix/X0 ']'
  • break
  • defaultdisplay=:0
  • unset d
  • whoseargs=client
  • '[' x '!=' x ']'
  • '[' x = x ']'
  • client=xterm
  • '[' x = x ']'
  • '[' -f /home/User/.startxwinrc ']'
  • '[' -x /home/User/.startxwinrc ']'
  • '[' -f /etc/X11/xinit/startxwinrc ']'
  • client=/etc/X11/xinit/startxwinrc
  • '[' x = x ']'
  • clientargs=
  • '[' x = x ']'
  • server=/usr/bin/XWin
  • '[' x = x -a x = x ']'
  • '[' -f /home/User/.xserverrc ']'
  • '[' -f /etc/X11/xinit/xserverrc ']'
  • '[' x = x ']'
  • serverargs=
  • serverargs='-multiwindow '
  • have_vtarg=no
  • for i in '$serverargs'
  • expr match -multiwindow '^vt[0-9]+$'
  • '[' no = no ']'
  • serverargs='-multiwindow '
  • '[' x = x ']'
  • display=:0
  • '[' x1 = x1 ']'
  • '[' x = x ']'
  • XAUTHORITY=/home/User/.Xauthority
  • export XAUTHORITY
  • removelist=
  • case uname in
    ++ uname
    ++ hostname
  • hostname=DESKTOP-V948PET
  • authdisplay=:0
    ++ /usr/bin/mcookie
  • mcookie=5691bd64277c57074598dc925dbd474f
  • test x5691bd64277c57074598dc925dbd474f = x
  • dummy=0
  • xserverauthfile=/home/User/.serverauth.9916
  • trap 'rm -f '''/home/User/.serverauth.9916'''' HUP INT QUIT ILL TRAP KILL BUS TERM
  • touch /home/User/.serverauth.9916
  • xauth -q -f /home/User/.serverauth.9916
    ++ echo /home/User/.serverauth.9916
    ++ sed 's/'''/'''''''''/g'
  • xserverauthfilequoted=/home/User/.serverauth.9916
  • serverargs='-multiwindow -auth '''/home/User/.serverauth.9916''''
  • for displayname in '$authdisplay' '$hostname$authdisplay'
    ++ xauth list :0
    ++ sed -n 's/.:0[[:space:]].[[:space:]]//p'
  • authcookie=
  • '[' z = z ']'
  • xauth -q
  • removelist=':0 '
  • for displayname in '$authdisplay' '$hostname$authdisplay'
    ++ xauth list DESKTOP-V948PET:0
    ++ sed -n 's/.DESKTOP-V948PET:0[[:space:]].[[:space:]]//p'
  • authcookie=
  • '[' z = z ']'
  • xauth -q
  • removelist='DESKTOP-V948PET:0 :0 '
  • eval xinit '"/etc/X11/xinit/startxwinrc"' -- '"/usr/bin/XWin"' :0 -multiwindow -auth ''''/home/User/.serverauth.9916''''
    ++ xinit /etc/X11/xinit/startxwinrc -- /usr/bin/XWin :0 -multiwindow -auth /home/User/.serverauth.9916
  • retval=127
  • '[' x1 = x1 ']'
  • '[' 'xDESKTOP-V948PET:0 :0 ' '!=' x ']'
  • xauth remove DESKTOP-V948PET:0 :0
  • '[' x/home/User/.serverauth.9916 '!=' x ']'
  • rm -f /home/User/.serverauth.9916
  • exit 127
@mobileWMS

This comment has been minimized.

Show comment
Hide comment
@mobileWMS

mobileWMS Nov 29, 2016

any solutions yet to this? I have the same problem, with windows 10 personal

mobileWMS commented Nov 29, 2016

any solutions yet to this? I have the same problem, with windows 10 personal

@ismailhkose

This comment has been minimized.

Show comment
Hide comment
@ismailhkose

ismailhkose Jan 9, 2017

I have also same problem in Windows 10 64-bit.

I installed xinit and xhost using the following command.

$ pact install xinit
$ pact install xhost

Then,
$ export DISPLAY='localhost:0.0'
$ xhost +
$ startxwin

$ ssh -Y user@name
$ gedit

Then, I am getting the following errors. How can I make X windows working in Windows 10?
connect localhost port 6000: Connection refused

** (gedit:31254): WARNING **: Could not open X display
connect localhost port 6000: Connection refused
connect localhost port 6000: Connection refused
connect localhost port 6000: Connection refused

(gedit:31254): Gtk-WARNING **: cannot open display: localhost:10.0

ismailhkose commented Jan 9, 2017

I have also same problem in Windows 10 64-bit.

I installed xinit and xhost using the following command.

$ pact install xinit
$ pact install xhost

Then,
$ export DISPLAY='localhost:0.0'
$ xhost +
$ startxwin

$ ssh -Y user@name
$ gedit

Then, I am getting the following errors. How can I make X windows working in Windows 10?
connect localhost port 6000: Connection refused

** (gedit:31254): WARNING **: Could not open X display
connect localhost port 6000: Connection refused
connect localhost port 6000: Connection refused
connect localhost port 6000: Connection refused

(gedit:31254): Gtk-WARNING **: cannot open display: localhost:10.0

@Kunado

This comment has been minimized.

Show comment
Hide comment
@Kunado

Kunado Feb 8, 2017

I have experienced the same problem mentioned above during installing other packages. The problem I saw was when I ran pact install [package], babun responded Package [package] is already installed, skipping, but when I ran [package], its terminal returned 127.
However, now it works as I expected. The solution in my environment was here.
After close the terminal, I ran '.babun/update.bat'. Then, I opened the terminal again and run the packages which didn't work and then it worked.

Kunado commented Feb 8, 2017

I have experienced the same problem mentioned above during installing other packages. The problem I saw was when I ran pact install [package], babun responded Package [package] is already installed, skipping, but when I ran [package], its terminal returned 127.
However, now it works as I expected. The solution in my environment was here.
After close the terminal, I ran '.babun/update.bat'. Then, I opened the terminal again and run the packages which didn't work and then it worked.

@ismailhkose

This comment has been minimized.

Show comment
Hide comment
@ismailhkose

ismailhkose Oct 27, 2017

I have applied the suggestions, but it didn't work.

First, I run ./babun/update.bat command to update babun. Then I run the following commands.

Insalled X Server

pact install xhost
pact install xorg-server
pact install xinit
export DISPLAY=localhost:0.0
 xhost.exe +

xhost: unable to open display "localhost:0.0"

startxwin

I still have the following error messages.
Any idea?

connect localhost port 6000: Connection refused
connect localhost port 6000: Connection refused
Failed to connect to Mir: Failed to connect to server socket: No such file or directory
Unable to init server: Could not connect: Connection refused

(gedit:21607): Gtk-WARNING **: cannot open display: localhost:10.0

ismailhkose commented Oct 27, 2017

I have applied the suggestions, but it didn't work.

First, I run ./babun/update.bat command to update babun. Then I run the following commands.

Insalled X Server

pact install xhost
pact install xorg-server
pact install xinit
export DISPLAY=localhost:0.0
 xhost.exe +

xhost: unable to open display "localhost:0.0"

startxwin

I still have the following error messages.
Any idea?

connect localhost port 6000: Connection refused
connect localhost port 6000: Connection refused
Failed to connect to Mir: Failed to connect to server socket: No such file or directory
Unable to init server: Could not connect: Connection refused

(gedit:21607): Gtk-WARNING **: cannot open display: localhost:10.0

@ismailhkose

This comment has been minimized.

Show comment
Hide comment
@ismailhkose

ismailhkose Oct 30, 2017

Is this project still active?

ismailhkose commented Oct 30, 2017

Is this project still active?

@paxromana96

This comment has been minimized.

Show comment
Hide comment
@paxromana96

paxromana96 Feb 16, 2018

I'm not sure why this issue was marked as 'closed'. This is still a problem for me, and I can't find clear instructions on how to fix it from the FAQ or any of the issues it references.

Edit (Fixed locally):

After the 1.2.0 babun update, this fix works for me:

  • Install xinit, startxwin, xhost, and xorg-server
  • Exit all babun instances, go to %USERPROFILE%/babun in File Explorer
  • run update.bat to update Cygwin and babun
  • I had an empty ~/.startxwinrc; xinit would exit immediately after running startxwin until I deleted it. After deleting ~/.startxwinrc, I couold run xeyes locally.

Previously, any other Cygwin package (such as ssh) would work fine, but any x-related program would immediately error with a 127 status code. Now, they seem to work fine locally.

I'm still having trouble with my ~/.Xauthority file, but I know it's solvable: I've fixed it on another computer by pointing it to an .Xauthority file in another Cygwin installation. I'm working on a fix for that now.

EDIT2 -- Fixed:
With the above steps, I could get X to display windows locally, but running ssh -X user@host would complain that there was an issue with my .Xauthority file when I tried to run xeyes or some other X-window application.
Just add the -Y flag: ssh -XY user@host

paxromana96 commented Feb 16, 2018

I'm not sure why this issue was marked as 'closed'. This is still a problem for me, and I can't find clear instructions on how to fix it from the FAQ or any of the issues it references.

Edit (Fixed locally):

After the 1.2.0 babun update, this fix works for me:

  • Install xinit, startxwin, xhost, and xorg-server
  • Exit all babun instances, go to %USERPROFILE%/babun in File Explorer
  • run update.bat to update Cygwin and babun
  • I had an empty ~/.startxwinrc; xinit would exit immediately after running startxwin until I deleted it. After deleting ~/.startxwinrc, I couold run xeyes locally.

Previously, any other Cygwin package (such as ssh) would work fine, but any x-related program would immediately error with a 127 status code. Now, they seem to work fine locally.

I'm still having trouble with my ~/.Xauthority file, but I know it's solvable: I've fixed it on another computer by pointing it to an .Xauthority file in another Cygwin installation. I'm working on a fix for that now.

EDIT2 -- Fixed:
With the above steps, I could get X to display windows locally, but running ssh -X user@host would complain that there was an issue with my .Xauthority file when I tried to run xeyes or some other X-window application.
Just add the -Y flag: ssh -XY user@host

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment