1

I have an alias for irssi:alias irssi="screen irssi. When I am running irssi in Konsole, the tab name shows up as "screen". Is there a way to make it display as "irssi"? My tab format on Konsole is: %D | %n

Also here is a picture:

enter image description here

1
  • Someone posted a working method by making a program in C but they deleted it! I'm not sure who posted it either.
    – user164810
    Jan 11, 2013 at 21:30

2 Answers 2

0

Probably the only way to do it is to create a script called irssi which launches screen irssi:

  1. Copy the original irssi to irssi.orig:

    sudo cp /usr/bin/irssi /usr/bin/irssi.orig
    
  2. Create a script, called irssi which will launch the original irssi in screen:

    sudo echo -e "#/bin/sh\nscreen /usr/bin/irssi.orig" > /usr/bin/irssi
    
  3. Make the script executable

    sudo chmod a+x /usr/bin/irssi
    
  4. Remove the alias from your .bashrc

If you can't/don't want to make a system-wide change, you can do the same thing for your user alone. Create a ~/bin/ directory, make the same steps as above there, and add that directory to your $PATH:

mkdir ~/bin
echo -e "#/bin/sh\nscreen /usr/bin/irssi" > ~/bin/irssi
chmod a+x ~/bin/irssi

Then, remove the alias and add this line to your .bashrc:

PATH=~/bin:$PATH
2
  • Using a script makes the program name change to "bash". For example now my tab says "/usr/local/bin | bash". The script works, but just isn't reading what I want. Am I missing something? :/
    – user164810
    Jan 11, 2013 at 21:11
  • Oh. No, I think it is I who is missing something. Apparently, Konsole takes the name from the actual process name, not the name of the command that is executed. Sorry, no idea how to get around that.
    – terdon
    Jan 11, 2013 at 21:16
0

Kind of an odd solution, but maybe you can use a shell script compiler like shc to compile a shell script similar to that terdon suggested so that it is an executable?

I think it would then show the correct name.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .