Giter Site home page Giter Site logo

Comments (10)

ryangball avatar ryangball commented on May 27, 2024

@remusache DockBuilder is designed to create a breadcrumb for existing user accounts where the dock has already been set up. However, I allowed for modifications to this with the SkipInitialBreadcrumbUsers key in the prefs plist. If you know the username of the individual you can add it there.

In the more likely event that you do not know the username you want to skip, I suggest the following:

  1. Add this line at line 7 in postinstall.sh:
    loggedInUser=$(scutil <<< "show State:/Users/ConsoleUser" | awk '/Name :/ && ! /loginwindow/ { print $3 }')
  2. Change line 28 in postinstall.sh to: if [[ "$skipInitialBreadcrumbUsers" =~ $userName ]] || [[ "$loggedInUser" == "$userName" ]]; then

from dockbuilder.

remusache avatar remusache commented on May 27, 2024

Thank you so much for getting back to me @ryangball.
You were right in your assumption that I don't know the username, I mean I know it but it changes every time we install a new Mac.

I added/changed the suggested modifications in the postinstall.sh file but the Dock is still unchanged upon install completion.

Screenshot 2019-10-14 at 14 29 10

postinstall.sh.zip

from dockbuilder.

ryangball avatar ryangball commented on May 27, 2024

So is the breadcrumb getting created for the logged in user when the package installs?

from dockbuilder.

ryangball avatar ryangball commented on May 27, 2024

I see the issue, I made an error in the above code. The last variable should read “$userName”.

from dockbuilder.

remusache avatar remusache commented on May 27, 2024

So instead of
if [[ "$skipInitialBreadcrumbUsers" =~ $userName ]] || [[ "$loggedInUser" == "$userName" ]]; then
it should be
if [[ "$skipInitialBreadcrumbUsers" =~ "$userName" ]] || [[ "$loggedInUser" == "$userName" ]]; then

from dockbuilder.

remusache avatar remusache commented on May 27, 2024

Beautiful :)
Is not right after the installation finishes, but after restarting the machine, the Dock is changed.
The breadcrumb is not created anymore during installation.

Thank you so much for taking the time to help me out.

from dockbuilder.

ryangball avatar ryangball commented on May 27, 2024

No problem, just to confirm, the line should be:
if [[ "$skipInitialBreadcrumbUsers" =~ $userName ]] || [[ "$loggedInUser" == "$userName" ]]; then

from dockbuilder.

remusache avatar remusache commented on May 27, 2024

Now I'm confused… :) If you say the line should be like the one bellow, then it's the same as the original line from your first post and then the breadcrumb is created.

if [[ "$skipInitialBreadcrumbUsers" =~ $userName ]] || [[ "$loggedInUser" == "$userName" ]]; then

When I changed the line like the one bellow
if [[ "$skipInitialBreadcrumbUsers" =~ "$userName" ]] || [[ "$loggedInUser" == "$userName" ]]; then then no breadcrumb is created and the Dock is changing after restart..

from dockbuilder.

ryangball avatar ryangball commented on May 27, 2024

Sorry, I caused the confusion as I edited my original comment to correct the code after you mentioned it did not work.

from dockbuilder.

remusache avatar remusache commented on May 27, 2024

Solved!
Thank you Ryan!

from dockbuilder.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.