andresgongora / synth-shell

Boost your terminal, script by script
GNU General Public License v3.0
1.01k stars 243 forks source link

When is synth-shell-prompt.root.config used? #222

Open ga2k opened 2 years ago

ga2k commented 2 years ago

Hi, great work.

When is synth-shell-prompt.root.config used in place of synth-shell-prompt.config ?

I saw the red prompt once, but in my re-jigging to get things arranged to be synched across multiple computers, only the non-root one is ever used. No amount of logging in as root, 'sudo su'ing or whatever will now activate it.

Cheers, Geoff.

andresgongora commented 2 years ago

Hi, thanks! For the root config to work, the script needs to be sourced by the root account. Also, maybe the config file must reside under /root? Can't remember. In any case, if you install synth-shell- for using the root account directly, then it should always work.

I'm really starting to think that there must be a config file under /root... Maybe you can just paste it there. More specifically, under /root/.config/synth-shell/

Cheers

On Thu 10 Feb 2022, 10:42 Geoffrey Hoffmann, @.***> wrote:

Hi, great work.

When is synth-shell-prompt.root.config used in place of synth-shell-prompt.config ?

I saw the red prompt once, but in my re-jigging to get things arranged to be synched across multiple computers, only the non-root one is ever used. No amount of logging in as root, 'sudo su'ing or whatever will now activate it.

Cheers, Geoff.

— Reply to this email directly, view it on GitHub https://github.com/andresgongora/synth-shell/issues/222, or unsubscribe https://github.com/notifications/unsubscribe-auth/AC36INXX4JVOVVT5IHH6IH3U2OCADANCNFSM5OAEAKBA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you are subscribed to this thread.Message ID: @.***>

ga2k commented 2 years ago

Hi, thanks for the quick reply. I am doing both of these things. EXCEPT.. Hmmm. I have your script in /var/onedrive/bin (symlinked to /root/bin) and the configs in /var/onedrive/conf (simlinked to /root/.config)

Does it perhaps not like symlinks? When I had it installed directly to /root, I seem to think it worked...

andresgongora commented 2 years ago

I have them symlinked all the time, y use a dotfiles synscript (also here on GitHub) and nextcloud to sync my machines.

Did you also add the hook to /root/.bashrc? The one where it sources the synth-shell scripts. Let me know so we can debug it from there ;)

On Thu 10 Feb 2022, 23:21 Geoffrey Hoffmann, @.***> wrote:

Hi, thanks for the quick reply. I am doing both of these things. EXCEPT.. Hmmm. I have your script in /var/onedrive/bin (symlinked to /root/bin) and the configs in /var/onedrive/conf (simlinked to /root/.config)

Does it perhaps not like symlinks? When I had it installed directly to /root, I seem to think it worked...

— Reply to this email directly, view it on GitHub https://github.com/andresgongora/synth-shell/issues/222#issuecomment-1035590878, or unsubscribe https://github.com/notifications/unsubscribe-auth/AC36INVH6DQFSMCR6TVLQJDU2Q275ANCNFSM5OAEAKBA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you commented.Message ID: @.***>

ga2k commented 2 years ago

Yes, .bashrc, .bash_aliases .bash_logout and .profile are all symlinked from the onedrive folder to /root/ and to each user's home folder, the bin folder where the script lives is symlinked, and the .config folder is too.

andresgongora commented 2 years ago

I meant, does root's .bashrc contain the source-hooks for synth-shell?

Being symlinked is no problem in my experience :)

On Fri 11 Feb 2022, 08:15 Geoffrey Hoffmann, @.***> wrote:

Yes, .bashrc, .bash_aliases .bash_logout and .profile are all symlinked from the onedrive folder to /root/ and to each user's home folder, the bin folder where the script lives is symlinked, and the .config folder is too.

— Reply to this email directly, view it on GitHub https://github.com/andresgongora/synth-shell/issues/222#issuecomment-1035935948, or unsubscribe https://github.com/notifications/unsubscribe-auth/AC36INVNXQS42SOV2MIYESLU2SZSDANCNFSM5OAEAKBA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you commented.Message ID: @.***>

ga2k commented 2 years ago

Yes it does.

Sent from my iPhone

On 12 Feb 2022, at 1:45 am, Andres Gongora @.***> wrote:

 I meant, does root's .bashrc contain the source-hooks for synth-shell?

Being symlinked is no problem in my experience :)

On Fri 11 Feb 2022, 08:15 Geoffrey Hoffmann, @.***> wrote:

Yes, .bashrc, .bash_aliases .bash_logout and .profile are all symlinked from the onedrive folder to /root/ and to each user's home folder, the bin folder where the script lives is symlinked, and the .config folder is too.

— Reply to this email directly, view it on GitHub https://github.com/andresgongora/synth-shell/issues/222#issuecomment-1035935948, or unsubscribe https://github.com/notifications/unsubscribe-auth/AC36INVNXQS42SOV2MIYESLU2SZSDANCNFSM5OAEAKBA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you commented.Message ID: @.***>

— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you authored the thread.

andresgongora commented 2 years ago

Hmmm can you enter your root account and run: source /root/synth-shell/synth-shell-prompt.sh And see if it does not complain

Obviously that does nothing about the root-specific config file (where the prompt is red) but at least we make sure that the script itself is sane. When I get home I'll have a look at the script and setup process to see why the config might not be in place (or where the script is looking for it)

On Fri, Feb 11, 2022 at 4:48 PM Geoffrey Hoffmann @.***> wrote:

Yes it does.

Sent from my iPhone

On 12 Feb 2022, at 1:45 am, Andres Gongora @.***> wrote:

 I meant, does root's .bashrc contain the source-hooks for synth-shell?

Being symlinked is no problem in my experience :)

On Fri 11 Feb 2022, 08:15 Geoffrey Hoffmann, @.***> wrote:

Yes, .bashrc, .bash_aliases .bash_logout and .profile are all symlinked from the onedrive folder to /root/ and to each user's home folder, the bin folder where the script lives is symlinked, and the .config folder is too.

— Reply to this email directly, view it on GitHub < https://github.com/andresgongora/synth-shell/issues/222#issuecomment-1035935948 , or unsubscribe < https://github.com/notifications/unsubscribe-auth/AC36INVNXQS42SOV2MIYESLU2SZSDANCNFSM5OAEAKBA

. Triage notifications on the go with GitHub Mobile for iOS < https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675

or Android < https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub .

You are receiving this because you commented.Message ID: @.***>

— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you authored the thread.

— Reply to this email directly, view it on GitHub https://github.com/andresgongora/synth-shell/issues/222#issuecomment-1036350871, or unsubscribe https://github.com/notifications/unsubscribe-auth/AC36INQJZBKCGF7EJNOURRLU2UVS7ANCNFSM5OAEAKBA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you commented.Message ID: @.***>

ga2k commented 2 years ago

I've removed everything and re-installed it for "all users" and that works so I'm leaving sleeping dogs lie :)

andresgongora commented 2 years ago

Perfect! Glad you got it working :)

On Tue 15 Feb 2022, 04:02 Geoffrey Hoffmann, @.***> wrote:

I've removed everything and re-installed it for "all users" and that works so I'm leaving sleeping dogs lie :)

— Reply to this email directly, view it on GitHub https://github.com/andresgongora/synth-shell/issues/222#issuecomment-1039800842, or unsubscribe https://github.com/notifications/unsubscribe-auth/AC36INR4BTPKFTMGONYLNBTU3G64VANCNFSM5OAEAKBA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you commented.Message ID: @.***>