LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   All Things KDE5/Plasma for Slackware Users. (https://www.linuxquestions.org/questions/slackware-14/all-things-kde5-plasma-for-slackware-users-4175670109/)

atelszewski 08-22-2021 09:42 AM

Hi,

Quote:

Originally Posted by Jeebizz (Post 6277427)
Yes I know, but I stated in previous posts, adding -l in command /bin/bash in the profile in Konsole and hitting apply, and restarting Konsole does not work and it is a KDE issue, but there is no definitive reason as to why.

This must mean that the arguments are not parsed correctly.
Or for some reason, Konsole does not like what is put in Command and backs up to /bin/bash or whatever shell is defined in /etc/passwd.

Konsole per se has completely no impact on shell being login or not.
It basically spawns bash and then controls stdin/stdout/stderr of it.

I haven't yet updated to the latest Plasma, so I cannot test it.

Can you try making the following script to be the shell command in the profile:
Code:

$ cat ~/bash.sh
#!/bin/bash

bash --login

?

It works correctly for me, i.e. login shell is spawned.

--
Best regards,
Andrzej Telszewski

Jeebizz 08-22-2021 10:40 AM

This is the output:
Code:

bash-5.1$ $ cat ~/bash.sh
#!/bin/bash

bash --login
bash: $: command not found

I took a course in speed reading, learning to read straight down the middle
of the page, and I was able to go through "War and Peace" in twenty minutes.
It's about Russia.
                -- Woody Allen

slacker@vslack:~$


atelszewski 08-22-2021 11:29 AM

1 Attachment(s)
Hi,

I think we don't understand each other, because the provided Konsole's output is not something I would expect.

What I meant, is:

1. Create a script with the contents:
Code:

#!/bin/bash

bash --login

and place it somewhere (say your home dir, ~/bash.sh).
(Don't forget to make it executable.)

2. Then update Konsole's profile as on the attached image.

3. Then start the Konsole and let us know the output.

--
Best regards,
Andrzej Telszewski

Jeebizz 08-22-2021 11:47 AM

2 Attachment(s)
Oh ok I see - but the output is the same it just gives me bash5.1 still, and yes I did make bash.sh executable -- and I did restart Konsole.


Aeterna 08-22-2021 06:06 PM

Quote:

Originally Posted by Jeebizz (Post 6277569)
Oh ok I see - but the output is the same it just gives me bash5.1 still, and yes I did make bash.sh executable -- and I did restart Konsole.


what is the content of your
Quote:

~/.profile
and
Quote:

~/.bashrc

rkelsen 08-22-2021 06:30 PM

Quote:

Originally Posted by Jeebizz (Post 6277396)
I am at a loss why konsole refuses to open with a login shell prompt instead of showing bash-5.15...

Sounds like someone at KDE forums is yanking your chain.

The default behaviour of Konsole since the KDE 3.x days has been to not use a login shell. The developers of KDE have long held the view that the login shell is supposed to be the one that is run when you login, not every time you open a new terminal. Personally, I don't understand what the harm is.

Anyhow, the way I fix this is to do the following:

1. Drag the shortcut to Konsole from the menu to the desktop
2. Select "copy here"
3. Right click on the new icon
4. Select "Properties"
5. Select "Application" tab
6. Change the contents of the "Command:" box to: "konsole -e /bin/bash -l"
(without quotes)

You don't have to use bash, you can use zsh if you prefer.

bassmadrigal 08-22-2021 06:49 PM

Quote:

Originally Posted by rkelsen (Post 6277664)
Sounds like someone at KDE forums is yanking your chain.

The default behaviour of Konsole since the KDE 3.x days has been to not use a login shell. The developers of KDE have long held the view that the login shell is supposed to be the one that is run when you login, not every time you open a new terminal. Personally, I don't understand what the harm is.

Anyhow, the way I fix this is to do the following:

1. Drag the shortcut to Konsole from the menu to the desktop
2. Select "copy here"
3. Right click on the new icon
4. Select "Properties"
5. Select "Application" tab
6. Change the contents of the "Command:" box to: "konsole -e /bin/bash -l"
(without quotes)

You don't have to use bash, you can use zsh if you prefer.

Coming from someone who isn't on -current and not a Plamsa5 user (although, I imagine konsole itself is pretty similar)... You used to be able to change the command within the profile settings. This ensures that every time you launch konsole or open a new tab, that it uses a login shell. From my understanding reading these posts, this setting seems to still be there, but seems to be broken and isn't used when creating a new shell.

It sounds like your method is an alternative to getting something that has been supported within konsole's UI itself. Maybe it can be used until the issue in konsole is found and fixed.

Here's a picture showing the command option within the profile settings. It was found on this site under the "Change terminal shell" section.

Aeterna 08-22-2021 07:08 PM

Quote:

Originally Posted by bassmadrigal (Post 6277671)
Coming from someone who isn't on -current and not a Plamsa5 user (although, I imagine konsole itself is pretty similar)... You used to be able to change the command within the profile settings. This ensures that every time you launch konsole or open a new tab, that it uses a login shell. From my understanding reading these posts, this setting seems to still be there, but seems to be broken and isn't used when creating a new shell.

It sounds like your method is an alternative to getting something that has been supported within konsole's UI itself. Maybe it can be used until the issue in konsole is found and fixed.

Here's a picture showing the command option within the profile settings. It was found on this site under the "Change terminal shell" section.

I agree, I don't think that konsole is broken. I have two systems one with Slackware-current (up-to-date) installed three years ago and konsole works. Second system (new machine) with Slackware-current (up-to-date) installed ~month ago and konsole works also.

In this case konsole opens bash, and the next step is non-interactive shell configuration which is determined in .bashrc.
Of course it may be a bug, but @Jeebizz is only one reporting it which makes it less plausible.

This looks like some configuration issue

rkelsen 08-22-2021 07:43 PM

Quote:

Originally Posted by bassmadrigal (Post 6277671)
It sounds like your method is an alternative to getting something that has been supported within konsole's UI itself.

Just checked, and yes, you're right. It'll work either way, it doesn't really matter.

The important part is getting konsole to run "/bin/bash -l" on startup.

fourtysixandtwo 08-23-2021 06:41 AM

Quote:

Originally Posted by rkelsen (Post 6277684)
Just checked, and yes, you're right. It'll work either way, it doesn't really matter.

The important part is getting konsole to run "/bin/bash -l" on startup.

I'd also add that editing the current Konsole profile to add the -l takes effect immediately. Any new tabs created will start with "/bin/bash -l".

fourtysixandtwo 08-23-2021 07:19 AM

Quote:

Originally Posted by rkelsen (Post 6277664)
Sounds like someone at KDE forums is yanking your chain.

The default behaviour of Konsole since the KDE 3.x days has been to not use a login shell. The developers of KDE have long held the view that the login shell is supposed to be the one that is run when you login, not every time you open a new terminal. Personally, I don't understand what the harm is.

<snip>

I agree, I don't know why you'd want to change how someones shell is expected to work. I want a consistent prompt/shell every time whether I'm ssh'ing in or logged into the gui. This isn't a new battle though, gnome terminal on Solaris did the same thing and fixed it the same way. For some reason I don't remember having as many issues with CDE, but things were simpler then and my memory may be faulty.

I have even worse gripes about vim defaults being completely different from classic vi (when run as "vi"), but that's another scab I'd rather not pick right now. /rant

Jeebizz 08-23-2021 11:49 AM

Quote:

Originally Posted by Aeterna (Post 6277658)
what is the content of your

and

.profile and .bashrc does not exist in ~.

Jeebizz 08-23-2021 11:53 AM

Quote:

Originally Posted by rkelsen (Post 6277664)
Sounds like someone at KDE forums is yanking your chain.

The default behaviour of Konsole since the KDE 3.x days has been to not use a login shell. The developers of KDE have long held the view that the login shell is supposed to be the one that is run when you login, not every time you open a new terminal. Personally, I don't understand what the harm is.

Anyhow, the way I fix this is to do the following:

1. Drag the shortcut to Konsole from the menu to the desktop
2. Select "copy here"
3. Right click on the new icon
4. Select "Properties"
5. Select "Application" tab
6. Change the contents of the "Command:" box to: "konsole -e /bin/bash -l"
(without quotes)

You don't have to use bash, you can use zsh if you prefer.

Still seems too many hoops just to get a fscking shell the way I want it, and I get the feeling the KDE devs are going the GNOME route and deciding whats best for me. I'll revisit this issue perhaps another time (right now I'm just feeling too lazy to bother with this), in the mean time I can use an alternate terminal like xfce's terminal.. Fsck this.

richarson 08-23-2021 01:10 PM

Quote:

Originally Posted by Jeebizz (Post 6277849)
Still seems too many hoops just to get a fscking shell the way I want it, and I get the feeling the KDE devs are going the GNOME route and deciding whats best for me. I'll revisit this issue perhaps another time (right now I'm just feeling too lazy to bother with this), in the mean time I can use an alternate terminal like xfce's terminal.. Fsck this.

Do you really want a login shell or just a proper PS1 prompt?

If the latter, just define PS1 and whatever other variables you want in ~/.bashrc, and maybe put in your ~/.bash_profile something like I have:

Code:

# if running bash
if [ -n "${BASH_VERSION}" ]; then
    # include .bashrc if it exists
    if [ -f "${HOME}/.bashrc" ]; then
        . "${HOME}/.bashrc"
    fi
fi

It's not the cleanest but it's simple and works.

Cheers!

Jeebizz 08-23-2021 04:06 PM

Quote:

Originally Posted by richarson (Post 6277880)
Do you really want a login shell or just a proper PS1 prompt?

If the latter, just define PS1 and whatever other variables you want in ~/.bashrc, and maybe put in your ~/.bash_profile something like I have:

Code:

# if running bash
if [ -n "${BASH_VERSION}" ]; then
    # include .bashrc if it exists
    if [ -f "${HOME}/.bashrc" ]; then
        . "${HOME}/.bashrc"
    fi
fi

It's not the cleanest but it's simple and works.

Cheers!

I don't know what is considered "proper" in the world of UNIX-like as each has their own version, I just want my user@host_name back , with the witty fortunes just like when you boot up Slackware and login - but seems the devs at KDE know better than I and I shouldn't have that option anymore.


All times are GMT -5. The time now is 02:05 AM.