Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Z
zmap
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ensembl-gh-mirror
zmap
Commits
f7088a09
Commit
f7088a09
authored
16 years ago
by
rds
Browse files
Options
Downloads
Patches
Plain Diff
xsu or sux script for reference, but probably not all that useful...
parent
12e3ce6c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
scripts/zmap_x11_helper.sh
+59
-0
59 additions, 0 deletions
scripts/zmap_x11_helper.sh
with
59 additions
and
0 deletions
scripts/zmap_x11_helper.sh
0 → 100755
+
59
−
0
View file @
f7088a09
#!/bin/bash
if
[
$#
-lt
2
]
then
echo
"usage:
`
basename
$0
`
clientuser command"
>
&2
exit
2
fi
CLIENTUSER
=
"
$1
"
shift
# FD 4 becomes stdin too
exec
4>&0
HOST_UNIX
=
`
hostname
`
/unix
DISPLAY_QUERY
=
$DISPLAY
DISPLAY_QUERY
=
`
echo
$DISPLAY_QUERY
|
sed
-e
"s!localhost!
$HOST_UNIX
!"
`
xauth list
"
$DISPLAY_QUERY
"
|
sed
-e
's/^/add /'
|
{
# FD 3 becomes xauth output
# FD 0 becomes stdin again
# FD 4 is closed
exec
3>&0 0>&4 4>&-
su
-s
/bin/bash
"
$CLIENTUSER
"
-c
"
\
xauth -q <&3
xauth list '
$DISPLAY
'
DISPLAY=
$DISPLAY
$*
3>&-
xauth remove
$DISPLAY
xauth list
$DISPLAY
echo Finished"
}
exit
FB_DISPLAY
=
:4
# If there's no display, we need to make one
if
[
"x
$DISPLAY
"
==
"x"
]
;
then
# Start the server
Xvfb
$FB_DISPLAY
-screen
0 1024x768x24
-terminate
&
# need to fix font path issues (-fp ?)
# grep FontPath /etc/X11/xorg.conf
else
FB_DSPLAY
=
$DISPLAY
fi
# set display
export
DISPLAY
=
$FB_DISPLAY
# So what we need to do is figure out what the display is/isn't
export
X
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment