Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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: http://i.stack.imgur.com/0vdRO.png

share|improve this question
    
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 '13 at 21:30
add comment

2 Answers

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
share|improve this answer
    
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 '13 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 '13 at 21:16
    
Thanks for your time and input. –  user164810 Jan 11 '13 at 21:18
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.