DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD Packages and Ports

OpenBSD Packages and Ports Installation and upgrading of packages and ports on OpenBSD.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 25th May 2020
stanl stanl is offline
Real Name: Stan
Package Pilot
 
Join Date: Jun 2019
Location: New York
Posts: 163
Default st not seeing aliases

Not sure if I messed up something along the way, but...

I've installed st-0.8.3 thru pkg_add -u.

Now anytime I try to use one of my aliases (cls=clear for example):

Quote:
cadfael$ cls
/bin/ksh: cls: not found
cadfael$
Aliases work fine in xterm.

But if I do
Quote:
ksh -l
Then aliases work fine in st.

Last edited by stanl; 25th May 2020 at 10:06 PM. Reason: Additiona details
Reply With Quote
  #2   (View Single Post)  
Old 26th May 2020
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,983
Default

I've never used st. But I found this https://wiki.archlinux.org/index.php/St#Shell which states the default shell is /bin/sh, and explains how to change this. I assume you can set this to /bin/ksh, and perhaps add -l.
Reply With Quote
  #3   (View Single Post)  
Old 26th May 2020
stanl stanl is offline
Real Name: Stan
Package Pilot
 
Join Date: Jun 2019
Location: New York
Posts: 163
Default

No good. I downloaded st from suckless.org and tried both options in the Arch wiki:

Quote:
To change the default shell for st, edit this line:

static char *shell = "/bin/sh";

Or start st with the desired shell as last argument:

$ st options fish
Not sure what it means but I noticed that in old builds of st it wrote 4 entries into /usr/share/terminfo. This new version writes 7. I also built one of the older 0.8.2 versions I still had which used to work and now doesn't.

I'm open to suggestions.

Thanks
Reply With Quote
  #4   (View Single Post)  
Old 26th May 2020
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,983
Default

Quote:
Originally Posted by stanl View Post
I'm open to suggestions.
I will guess that this is not an OpenBSD-specific problem, so would recommend the dev@ mailing list mentioned in https://suckless.org/community/, it seems to be the method for end-user support upstream. There is an archive, but it isn't very searchable.
Reply With Quote
  #5   (View Single Post)  
Old 26th May 2020
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,983
Default

You can search from Google with "site:lists.suckless.org" and from there I found this, which might help.

https://lists.suckless.org/hackers/1611/13652.html
Reply With Quote
  #6   (View Single Post)  
Old 26th May 2020
stanl stanl is offline
Real Name: Stan
Package Pilot
 
Join Date: Jun 2019
Location: New York
Posts: 163
Default

st -e /bin/ksh -l seems to work.

Thank you
Reply With Quote
  #7   (View Single Post)  
Old 26th May 2020
Head_on_a_Stick's Avatar
Head_on_a_Stick Head_on_a_Stick is offline
Real Name: Matthew
Bitchy Nerd Elitist
 
Join Date: Dec 2015
Location: London
Posts: 465
Default

Quote:
Originally Posted by stanl View Post
in old builds of st it wrote 4 entries into /usr/share/terminfo. This new version writes 7.
That's an upstream change, suckless have added more terminfo entries.[0][1][2]

Quote:
Originally Posted by stanl View Post
st -e /bin/ksh -l seems to work.
I don't think you should run ksh as a login shell if you're using it interactively, job control will be disabled.

To set the interactive shell in st try exporting it as a variable:
Code:
export SHELL=/bin/ksh
^ Put that line in ~/.xsession if you're using xenodm(1) to start the desktop.

If that doesn't work then replace -l with -i.
__________________
Are you infected with Wetiko?
Reply With Quote
  #8   (View Single Post)  
Old 26th May 2020
stanl stanl is offline
Real Name: Stan
Package Pilot
 
Join Date: Jun 2019
Location: New York
Posts: 163
Default

You will have to excuse my lack of knowledge but I'm not clear on what you mean.

echo $SHELL returns /bin/ksh

In ~/.aliases I have: alias st='st -e /bin/ksh -l'

I use spectrwm as a window manager and have:
program[term] = st -e /bin/ksh -l

This is the only way st seems to work for me.
Reply With Quote
  #9   (View Single Post)  
Old 27th May 2020
Head_on_a_Stick's Avatar
Head_on_a_Stick Head_on_a_Stick is offline
Real Name: Matthew
Bitchy Nerd Elitist
 
Join Date: Dec 2015
Location: London
Posts: 465
Default

Quote:
Originally Posted by stanl View Post
You will have to excuse my lack of knowledge but I'm not clear on what you mean.

echo $SHELL returns /bin/ksh
Yes, that is as it should be.

Very strange that st won't parse your shell configuration file though

Is the output of
Code:
echo $ENV
the same in both xterm and st?

Quote:
Originally Posted by stanl View Post
In ~/.aliases I have: alias st='st -e /bin/ksh -l'

I use spectrwm as a window manager and have:
program[term] = st -e /bin/ksh -l

This is the only way st seems to work for me.
Does it still work if you change -l to -i? It's better to start ksh as an interactive shell if you're using it interactively
__________________
Are you infected with Wetiko?
Reply With Quote
Old 27th May 2020
stanl stanl is offline
Real Name: Stan
Package Pilot
 
Join Date: Jun 2019
Location: New York
Posts: 163
Default

In st:
Quote:
slaurel:~$ echo $ENV
/home/slaurel/.kshrc
slaurel:~$
In xterm:
Quote:
slaurel:~$ echo $ENV
/home/slaurel/.kshrc
slaurel:~$
If I replace the "l" with "i" in "st -e /bin/ksh -l" aliases no longer work in st but work in xterm.

Also, not sure if it means anything, but if I start an xterm and then start st within the xterm, aliases work.
Reply With Quote
Reply


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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
gnome's console is unaware of xterm aliases daemonfowl OpenBSD General 6 26th February 2012 03:23 PM
Shell aliases for regular user dbach OpenBSD General 5 30th December 2011 11:41 PM
postfix aliases configuration error xiphias FreeBSD Ports and Packages 5 5th June 2010 05:35 PM


All times are GMT. The time now is 08:04 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick