Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

Guest

You should be able to do sudo su - username only.

Yes, you're right on that.
martin

magix wrote:

I have tried .bashrc - it's not read on start-up. .bashrc was in the home/username directory.
The same with --login switch - nothing is read from .profile, .bash-profile. Switch was used here: "bash -c 'sudo su - username' --login".
I have tried also "bash -c 'sudo su - username' --rcfile ./.bashrc" - no luck. :(

In fact you should tweak the inner shell (the one run by su), not the outter one.
However according to su docs, the dash switch should cause su to execute the inner shell as login. But maybe your default shell (the one that su execute) is not a bash at all. Also I do not understand what is purpose of the 'bash -c' at all. You should be able to do sudo su - username only.
magix

I have tried .bashrc - it's not read on start-up. .bashrc was in the home/username directory.
The same with --login switch - nothing is read from .profile, .bash-profile. Switch was used here: "bash -c 'sudo su - username' --login".
I have tried also "bash -c 'sudo su - username' --rcfile ./.bashrc" - no luck. :(
martin

Re: Change: Removed One file only editing mode in 8.1

I cannot test it now, but it may help if you move your settings from .profile to .bashrc. Or try to invoke bash a login shell (using --login switch I believe).
magix

Re: Change: Removed One file only editing mode in 8.1

magix wrote:

I'm using this feature in 8.0 and it's very sad that it was removed in future versions.
Why I need it:
1. I connect to the sunOs server via scp with "bash -c 'sudo su - username'";
2. winScp do not pick up the PATH settings in .profile of username, I have a workaround for that - setting the PATH manually thru terminal(Ctrl+T).
3. When I edit the file it opens in new session(since 8.1) and PATH is not set, that's why it's not possible to save the changes.
Could you, please, advice any workaround for this situation?

Or how to login(using "bash -c 'sudo su - username'") with PATH initialized?
magix

Change: Removed One file only editing mode in 8.1

I'm using this feature in 8.0 and it's very sad that it was removed in future versions.
Why I need it:
1. I connect to the sunOs server via scp with "bash -c 'sudo su - username'";
2. winScp do not pick up the PATH settings in .profile of username, I have a workaround for that - setting the PATH manually thru terminal(Ctrl+T).
3. When I edit the file it opens in new session(since 8.1) and PATH is not set, that's why it's not possible to save the changes.
Could you, please, advice any workaround for this situation?