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

OS Development tips #2073

Merged
merged 20 commits into from
Nov 26, 2018
Merged

OS Development tips #2073

merged 20 commits into from
Nov 26, 2018

Conversation

peteruithoven
Copy link
Collaborator

@peteruithoven peteruithoven commented Oct 11, 2018

Fixes #
Lack of general tips for development on elementary OS itself.

Changes Summary

  • Adds a very crude os-dev page with tips.

Is this something we want? Is this the place to do it?

@jepotter1-archive
Copy link
Contributor

jepotter1-archive commented Oct 21, 2018

+1 on adding a centralized guide on contributing to elementaryOS! This would really help new people begin contributing. We could also link to it from get-involved.

Addition: how to develop a window manager

Yes, I actually wanted to write some kind of guide for people that do that
Your escape from this is one of the TTY sessions Linux provides
So if your gala crashes you can get to another terminal by hitting e.g: Ctrl+Alt+F1
You login there and you're in
Then if gala didn't crash but hang, you just kill it with killall gala
Now you need to start gala inside the graphical session
Unfortunately DISPLAY=:0 gala doesn't work
So you spawn a terminal app in the graphical session and it will be automatically focused because there is no WM: DISPLAY=:0 io.elementary.terminal
Then you switch to the graphical session by hitting Ctrl+Alt+F7
And launch gala in the newly opened terminal window: (gala -r &) &
Gala should start and you can close this terminal
If your gala can't start, you have to either reinstall it (sudo apt install --reinstall gala) or fix the error in your code with an editor like vi, both in the TTY session"
- @donadigo

@jeremypw
Copy link
Collaborator

jeremypw commented Nov 3, 2018

Suggest adding a section on the basic use of gdb to obtain a backtrace and maybe touch on set env G_DEBUG='fatal-criticals'

Maybe also mention io.elementary.vala-lint

@peteruithoven
Copy link
Collaborator Author

Thanks @JWinnie, I've included the tip from @donadigo on restarting Gala.
@jeremypw While I agree gdb or G_DEBUG='fatal-criticals' are super interesting I'm not knowledgeable enough to write those sections. PR's are more than welcome.

I'm going to try adding something on the vala linter.

@peteruithoven peteruithoven changed the title Rough os dev page draft OS Development tips Nov 5, 2018
Copy link
Contributor

@btkostner btkostner left a comment

Choose a reason for hiding this comment

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

There seems to be a mdr markdown error when rendering this page that should get fixed before pushed live.

@btkostner
Copy link
Contributor

I also want someone from @elementary/desktop-developers to review this before we merge as well.

docs/code/os-dev.md Outdated Show resolved Hide resolved
docs/code/os-dev.md Outdated Show resolved Hide resolved
@peteruithoven
Copy link
Collaborator Author

@btkostner this "mdr markdown error", I don't see this when I run it locally. Also not when using npm run lint. How can I reproduce it?

@btkostner
Copy link
Contributor

@peteruithoven It's a PHP offset error. It doesn't prevent the page from loading, but it shows up in the console, so I want to fix it.

@jeremypw
Copy link
Collaborator

jeremypw commented Nov 5, 2018

I am by no means and expert on gdb so I was envisaging only the simplest commands to produce a backtrace (that is all I use) and a link to a good tutorial on the web.

@peteruithoven
Copy link
Collaborator Author

I'd love for someone who has actually used gdb to do a separate PR. I don't think it's a reason to hold back this PR.
I've implemented the other suggestions.

I'll wait for more information on the "mdr markdown error".

@jeremypw
Copy link
Collaborator

jeremypw commented Nov 6, 2018

@peteruithoven : That's fine. There is no need to hold this PR up.

docs/code/os-dev.md Outdated Show resolved Hide resolved
docs/code/os-dev.md Outdated Show resolved Hide resolved
cassidyjames
cassidyjames previously approved these changes Nov 19, 2018
@peteruithoven
Copy link
Collaborator Author

@RMcNeely thanks for the review. @cassidyjames thanks for the improvements.

@@ -30,7 +30,7 @@ First, make sure you have the `elementary-sdk` installed. Then enable the Inspec
gsettings set org.gtk.Settings.Debug enable-inspector-keybinding true
```

Focus your app, then launch the Inspector by pressing <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>I</kbd> to inspect the widget beaneath your cursoe, or <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>D</kbd> to open the inspector without a widget selected.
Focus your app, then launch the Inspector by pressing <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>I</kbd> to inspect the widget beneath your cursor, or <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>D</kbd> to open the inspector without a widget selected.
Copy link
Contributor

Choose a reason for hiding this comment

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

lol I don't know how that happened, thanks. 😅

@peteruithoven
Copy link
Collaborator Author

In a future PR I'd also like to include D-Feed, for debugging / experimenting with Dbus interfaces.

@cassidyjames
Copy link
Contributor

@btkostner is that build error still happening here? Otherwise this looks good to me.

@btkostner
Copy link
Contributor

@cassidyjames nope

@cassidyjames cassidyjames merged commit 91734a1 into elementary:master Nov 26, 2018
This was referenced Jan 19, 2019
@peteruithoven peteruithoven deleted the os-dev-tips branch February 23, 2019 20:58
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.

7 participants