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

Switch VT using dbus to fix #72 #75

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

Conversation

guillaumezin
Copy link

@guillaumezin guillaumezin commented Jul 28, 2020

Should fix #72

@guillaumezin guillaumezin changed the title Switch VT using dbus to fix #72 Switch VT using dbus to fix https://github.com/OpenRoberta/robertalab-ev3dev/issues/72 Jul 28, 2020
@guillaumezin guillaumezin changed the title Switch VT using dbus to fix https://github.com/OpenRoberta/robertalab-ev3dev/issues/72 Switch VT using dbus to fix #72 Jul 28, 2020

def __enter__(self):
logger.info('running on tty: %s', self.tty_name)
# really useful ? Can block if permission is not set correctly on /dev/ttyx
Copy link
Contributor

Choose a reason for hiding this comment

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

As far as I recall, we need to enable graphics. It is not enabled by default.

self.seat_methods.SwitchTo(self.tty_num)
except:
logger.exception('cannot switch to: %s', self.tty_name)
else:
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: I'd probaby just print this in init() and remove the ekese part here.

@ensonic
Copy link
Contributor

ensonic commented Jul 29, 2020

Thanks for this. Is that dbus interface already available under jessie? I am still mostly using jessie due to lack of time testing stretch :/

@guillaumezin
Copy link
Author

Thanks for this. Is that dbus interface already available under jessie? I am still mostly using jessie due to lack of time testing stretch :/

I don't know, I juste have stretch now, you can check with qdbus for instance, but if the dbus interface isn't available, it won't hurt, , the exception will be catched, self.tty_name will be equal to self.previous_tty_num and it won't try to switch, as before

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.

Console switching not working on ev3dev-stretch
2 participants