LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 08-22-2021, 09:42 AM   #901
atelszewski
Member
 
Registered: Aug 2007
Distribution: Slackware
Posts: 948

Rep: Reputation: Disabled

Hi,

Quote:
Originally Posted by Jeebizz View Post
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
 
1 members found this post helpful.
Old 08-22-2021, 10:40 AM   #902
Jeebizz
Senior Member
 
Registered: May 2004
Distribution: Slackware15.0 64-Bit Desktop, Debian 11 non-free Toshiba Satellite Notebook
Posts: 4,186

Rep: Reputation: 1379Reputation: 1379Reputation: 1379Reputation: 1379Reputation: 1379Reputation: 1379Reputation: 1379Reputation: 1379Reputation: 1379Reputation: 1379
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:~$
 
Old 08-22-2021, 11:29 AM   #903
atelszewski
Member
 
Registered: Aug 2007
Distribution: Slackware
Posts: 948

Rep: Reputation: Disabled
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
Attached Thumbnails
Click image for larger version

Name:	konsole_profile_bash_sh.png
Views:	25
Size:	98.7 KB
ID:	36998  
 
Old 08-22-2021, 11:47 AM   #904
Jeebizz
Senior Member
 
Registered: May 2004
Distribution: Slackware15.0 64-Bit Desktop, Debian 11 non-free Toshiba Satellite Notebook
Posts: 4,186

Rep: Reputation: 1379Reputation: 1379Reputation: 1379Reputation: 1379Reputation: 1379Reputation: 1379Reputation: 1379Reputation: 1379Reputation: 1379Reputation: 1379
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.

Click image for larger version

Name:	Screenshot_2021-08-22_11-44-12.png
Views:	20
Size:	57.8 KB
ID:	36999
Click image for larger version

Name:	Screenshot_2021-08-22_11-45-56.png
Views:	17
Size:	23.0 KB
ID:	37000

Last edited by Jeebizz; 08-22-2021 at 11:50 AM.
 
Old 08-22-2021, 06:06 PM   #905
Aeterna
Senior Member
 
Registered: Aug 2017
Location: Terra Mater
Distribution: VM Host: Slackware-current, VM Guests: Artix, Venom, antiX, Gentoo, FreeBSD, OpenBSD, OpenIndiana
Posts: 1,008

Rep: Reputation: Disabled
Quote:
Originally Posted by Jeebizz View Post
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
 
Old 08-22-2021, 06:30 PM   #906
rkelsen
Senior Member
 
Registered: Sep 2004
Distribution: slackware
Posts: 4,453
Blog Entries: 7

Rep: Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555
Quote:
Originally Posted by Jeebizz View Post
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.
 
Old 08-22-2021, 06:49 PM   #907
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
Quote:
Originally Posted by rkelsen View Post
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.
 
Old 08-22-2021, 07:08 PM   #908
Aeterna
Senior Member
 
Registered: Aug 2017
Location: Terra Mater
Distribution: VM Host: Slackware-current, VM Guests: Artix, Venom, antiX, Gentoo, FreeBSD, OpenBSD, OpenIndiana
Posts: 1,008

Rep: Reputation: Disabled
Quote:
Originally Posted by bassmadrigal View Post
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

Last edited by Aeterna; 08-22-2021 at 07:09 PM.
 
Old 08-22-2021, 07:43 PM   #909
rkelsen
Senior Member
 
Registered: Sep 2004
Distribution: slackware
Posts: 4,453
Blog Entries: 7

Rep: Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555
Quote:
Originally Posted by bassmadrigal View Post
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.
 
Old 08-23-2021, 06:41 AM   #910
fourtysixandtwo
Member
 
Registered: Jun 2021
Location: Alberta
Distribution: Slackware...mostly
Posts: 317

Rep: Reputation: 209Reputation: 209Reputation: 209
Quote:
Originally Posted by rkelsen View Post
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".
 
Old 08-23-2021, 07:19 AM   #911
fourtysixandtwo
Member
 
Registered: Jun 2021
Location: Alberta
Distribution: Slackware...mostly
Posts: 317

Rep: Reputation: 209Reputation: 209Reputation: 209
Quote:
Originally Posted by rkelsen View Post
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

Last edited by fourtysixandtwo; 08-23-2021 at 07:27 AM.
 
Old 08-23-2021, 11:49 AM   #912
Jeebizz
Senior Member
 
Registered: May 2004
Distribution: Slackware15.0 64-Bit Desktop, Debian 11 non-free Toshiba Satellite Notebook
Posts: 4,186

Rep: Reputation: 1379Reputation: 1379Reputation: 1379Reputation: 1379Reputation: 1379Reputation: 1379Reputation: 1379Reputation: 1379Reputation: 1379Reputation: 1379
Quote:
Originally Posted by Aeterna View Post
what is the content of your

and
.profile and .bashrc does not exist in ~.
 
Old 08-23-2021, 11:53 AM   #913
Jeebizz
Senior Member
 
Registered: May 2004
Distribution: Slackware15.0 64-Bit Desktop, Debian 11 non-free Toshiba Satellite Notebook
Posts: 4,186

Rep: Reputation: 1379Reputation: 1379Reputation: 1379Reputation: 1379Reputation: 1379Reputation: 1379Reputation: 1379Reputation: 1379Reputation: 1379Reputation: 1379
Quote:
Originally Posted by rkelsen View Post
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.

Last edited by Jeebizz; 08-23-2021 at 12:02 PM.
 
Old 08-23-2021, 01:10 PM   #914
richarson
Member
 
Registered: Dec 2020
Location: Argentina
Distribution: Fedora 38 KDE
Posts: 112

Rep: Reputation: Disabled
Quote:
Originally Posted by Jeebizz View Post
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!
 
Old 08-23-2021, 04:06 PM   #915
Jeebizz
Senior Member
 
Registered: May 2004
Distribution: Slackware15.0 64-Bit Desktop, Debian 11 non-free Toshiba Satellite Notebook
Posts: 4,186

Rep: Reputation: 1379Reputation: 1379Reputation: 1379Reputation: 1379Reputation: 1379Reputation: 1379Reputation: 1379Reputation: 1379Reputation: 1379Reputation: 1379
Quote:
Originally Posted by richarson View Post
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.

Last edited by Jeebizz; 08-23-2021 at 04:17 PM.
 
  


Reply

Tags
desktop, kde, slackware -current, startx



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] slackware 14.2 x86_64 plasma 5 installation. when I run "xwmconfig", "xinitrc.plasma" is not listed as an option? rockinroyle Slackware 9 07-31-2016 03:42 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 10:53 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration