Skip to content
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

fixes resolution setup #140

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open

Conversation

leonardpitzu
Copy link

If the resolution is different from 1024x768 the script does not update the resolution any more.
This update allows the resolution and depth to be updated regardless of the current value.

If the resolution is different from 1024x768 the script does not update the resolution any more.
This update allows the resolution and depth to be updated regardless of the current value.
Copy link
Owner

@fcwu fcwu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this line

sed -i "s/.*exec /usr/bin/Xvfb :1 -screen.*/exec /usr/bin/Xvfb :1 -screen 0 $RESOLUTION/" /usr/local/bin/xvfb.sh

It mixes sed separator "/" and path "/". Does this command run correctly?

@leonardpitzu
Copy link
Author

It does for me - i tested it a few minutes ago. I just saw this fixes #136

@fcwu
Copy link
Owner

fcwu commented Sep 28, 2019

@leonardpitzu
I tried this command on Ubuntu 18.04 and returned error

$ sed "s/.*exec /usr/bin/Xvfb :1 -screen.*/exec /usr/bin/Xvfb :1 -screen 0 $RESOLUTION/" /etc/resolv.conf
sed: -e expression #1, char 15: unknown option to `s'

@leonardpitzu
Copy link
Author

i used ash (changes things a bit). this works:

NEW=$(echo "exec /usr/bin/Xvfb :1 -screen 0 $RESOLUTION" | sed 's///\//g')
sed -i '/'"-screen"'/s/.*/'"${NEW}"'/' /usr/local/bin/xvfb.sh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants