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

Porting to Gtk3 and fixing vte failure #4

Closed
wants to merge 1 commit into from
Closed

Porting to Gtk3 and fixing vte failure #4

wants to merge 1 commit into from

Conversation

Aniket21mathur
Copy link

The activity was in gtk and the conversion to sugar3 assumed no changes were needed between vte and Vte.

Porting to Gtk3 and making the desired changes.

Fixes #3 #2

@quozl
Copy link
Contributor

quozl commented Jan 27, 2019

Thanks. Please explain why you are removing the reference to the VTE class yet leaving the VTE class in the file? The VTE class contains quite a bit of functionality. Please also detail the testing you did.

@Aniket21mathur
Copy link
Author

Thanks for reviewing I realized the big mistake I did by removing the reference to the VTE class, thus
fixed it and made further changes required.Regarding testing I don't know much about the activity, it does not have a README.md file nor does it have a https://help.sugarlabs.org/en/ documentation.
Please review the changes I made, Thanks!

@quozl
Copy link
Contributor

quozl commented Feb 3, 2019

Thanks. Reviewed. Please learn about the activity as much as you can in order to test. You'll need to be familiar with VNC technology and tools.

@Aniket21mathur
Copy link
Author

Tested the activity, runs fine on my machine with os Ubuntu 18.04.I request you to test once more.
Thanks 😄 .

 The activity was in gtk and the conversion to sugar3 assumed no changes were needed between vte and Vte.

 Porting to Gtk3 and making the desired changes.

 Fixes #3 #2
@quozl
Copy link
Contributor

quozl commented Feb 6, 2019

Thanks. Tested 7249288 on Ubuntu 18.04. The activity did not start. Log output;

Traceback (most recent call last):
  File "/usr/bin/sugar-activity", line 219, in <module>
    main()
  File "/usr/bin/sugar-activity", line 214, in main
    instance = create_activity_instance(activity_constructor, activity_handle)
  File "/usr/bin/sugar-activity", line 48, in create_activity_instance
    activity = constructor(handle)
  File "/home/guest/VncLauncher/vnclauncher.py", line 106, in __init__
    self._vte = VTE()
  File "/home/guest/VncLauncher/vnclauncher.py", line 150, in __init__
    self._configure_vte()
  File "/home/guest/VncLauncher/vnclauncher.py", line 209, in _configure_vte
    self._vte.set_colors(Gdk.color_parse(fg_color),
AttributeError: 'VTE' object has no attribute '_vte'

@Aniket21mathur
Copy link
Author

Quite surprising for me, showed no such error on my machine, I don't know the reason why it happened, but logically the error is quite clear, so made changes accordingly and pushed the changes.Again since it made no difference on my machine I am not able to ensure that it works, it needs to be tested.
Thanks!

@quozl
Copy link
Contributor

quozl commented Feb 7, 2019

Thanks. Tested d4f75fe. Does start now. Fixes #2. Fixes #3. Doesn't fix #1 but will help. Doesn't fix #7.

I've never used this activity before; I would have recognised the strange layout;

screenshot_ubb_2019-02-07_15 06 42

Comments and suggested changes;

  • exiting the shell with ctrl+d or exit makes the VTE widget useless, and emits to log an error TypeError: <lambda>() takes exactly 1 argument (2 given),
  • clicking on Start X11 VNC Server does not work, the log says;
Traceback (most recent call last):
  File "/home/guest/VncLauncher/vnclauncher.py", line 137, in connectVNC
    "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:%s/lib\n" % path)
TypeError: Vte.Terminal.feed_child() takes exactly 3 arguments (2 given)
  • clicking on Stop X11 VNC Server does not work, the log says;
Traceback (most recent call last):
  File "/home/guest/VncLauncher/vnclauncher.py", line 118, in stopVNC
    self._vte.feed_child(cmd)
TypeError: Vte.Terminal.feed_child() takes exactly 3 arguments (2 given)
  • the user interface does not contain the Sugar activity menu,
  • there is no reason to click to find the current IP address, instead it could be found immediately, and could be updated by receiving notification of change due to wireless network or ethernet plugging, Sugar itself has this information maintained in the Frame for the Network device icons, so you could use some of that code.

Please fully test the activity before asking for review. Did you use the start and stop buttons?

@Aniket21mathur
Copy link
Author

Aniket21mathur commented Feb 9, 2019

Thanks for reviewing.

Quite surprising for me, showed no such error on my machine, I don't know the reason why it happened,

As I stated before running the activity on my machine do not show any errors, and its quite surprising for me as well, and for the same reason I am not able to properly test the activity.Though will look into it thoroughly and will work on the changes you suggested.
Thanks again!

@quozl
Copy link
Contributor

quozl commented Feb 10, 2019

Thanks. I'm certain I've tested the activity in the way that an end-user of Sugar would try to use it. If you cannot reproduce these errors, then there is something about your test environment or method that is different to mine. Please provide more information; e.g.

Name Value
Linux Distribution Ubuntu 18.04 with security updates, confirm with
sudo apt update && sudo apt dist-upgrade
Sugar Release 0.112 with some custom patches, confirm with
dpkg-query -W sucrose
Vte Version 0.52.2 from Ubuntu, confirm with
dpkg-query -W gir1.2-vte-2.91
Test Method, Terminal Start Terminal, cd to the activity source repository, run sugar-activity, and look at Terminal output
Test Method, Home View Press F3 for Home View, and click on the VncLauncher icon, then look at .sugar/default/logs or the Log activity

Also add some check of your own devising to make sure you are testing the same source code as you are editing; a simple method is to change one of the messages (such as "Exit VncLauncher Activity"), and look for the change when you run the activity. Remember not to git add this change.

@Aniket21mathur
Copy link
Author

Thanks. Surprisingly there was something wrong with Linux Distribution. Running
sudo apt update && sudo apt dist-upgrade did the job for me. Now errors are visible to me.

@quozl
Copy link
Contributor

quozl commented Feb 15, 2019

Fascinating, thanks. But I'm not sure we learned anything. You could look at /var/log/dpkg.log and /var/log/unattended-updates and check the date stamps against when you had the problem. It would be good to understand the mystery rather than sweep it under the carpet.

@rhl-bthr
Copy link

Stale. Closing

@rhl-bthr rhl-bthr closed this Mar 14, 2019
@quozl quozl mentioned this pull request Apr 2, 2020
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.

3 participants