Urxvt and zsh prompt

Hello!
I would like to run different instances of Urxvt using "-name", each one with a different zsh prompt.
Is there any way to achieve this?
"PROMPT=" works if urxvt is already open, but I can't seem to find a way to run it when it starts.
Thanks.

In bash you can update /home/user/.bashrc . I am not a zsh user but after a quick look at the man page there appears to be a .zshrc file that does the same.
Hope this helps.

Similar Messages

  • [Solved] $LANG and zsh prompt color problems

    Hi,
    I recently discovered, trying to use Newsbeuter, that, in X, certain parts of my profile aren't set. Until now it only seemed to be $LANG, which is empty if I echo it from urxvt in XMonad, but yields the correct setting if I do the same in a tty.
    To make things worse now, my zsh seems to be acting up. I have differently colored prompts for my normal user and root. But since a few days ago, the root colors aren't applied unless I source .zshrc again after sudo-ing.
    I updated a lot recently and it's gotten hard to track these issues, especially the $LANG one, to a specific update. The only thing I know is that my desktop, running Kdemod, doesn't have these problems.
    I'm using Slim and XMonad. Neither issue is limited to a certain terminal.
    Most of my configs can be found in my GitHub dotfiles repository. If anything's missing to get a clear picture, ask for it.
    My rc.conf can be found here [Gist].
    Last edited by count-corrupt (2010-08-22 13:33:06)

    jac wrote:
    I finally went through the new sudoers file and got mine to work, see this thread for details. Using that, and using a workaround for libetc, your prompt works for me.
    You appear not to use libetc, but if you do and don't also have root set up to use libetc, you will need to create a link to/from ~/.zshrc from/to ~/.config/zshrc
    I actually just solved it in another way. Your original point, that sudo changed it's default behavior was the key. In the official zsh documentation somewhere it says that all settings that are wanted for root should be put into /root/.zshrc. I just did that and it works.
    Your solution works too by the way. Just enabling
    Defaults env_keep += "HOME"
    does the trick and also (logically) re-enables other things that I hadn't even realized were gone yet like syntax highlighting in vim. I guess I should read into the nature of said privilige escalation problems. Maybe there's a way to selectively keep parts of HOME.
    So thank you very much for the help.

  • [SOLVED] urxvt + screen + zsh, title is not displayed correctly

    I use urxvt and screen inside it. The screen's  title is set up to display the current program and the window number. However after changing from bash to zsh, it always display "zsh" instead of "vim" or "top" which is currently running.
    my screenrc:
    # This is an example for the global screenrc file.
    # You may want to install this file as /usr/local/etc/screenrc.
    # Check config.h for the exact location.
    # Flaws of termcap and standard settings are done here.
    startup_message off
    #defflow on # will force screen to process ^S/^Q
    deflogin on
    #autodetach off
    vbell on
    vbell_msg " Wuff ---- Wuff!! "
    # all termcap entries are now duplicated as terminfo entries.
    # only difference should be the slightly modified syntax, and check for
    # terminfo entries, that are already corected in the database.
    # G0 we have a SEMI-GRAPHICS-CHARACTER-MODE
    # WS this sequence resizes our window.
    # cs this sequence changes the scrollregion
    # hs@ we have no hardware statusline. screen will only believe that
    # there is a hardware status line if hs,ts,fs,ds are all set.
    # ts to statusline
    # fs from statusline
    # ds delete statusline
    # al add one line
    # AL add multiple lines
    # dl delete one line
    # DL delete multiple lines
    # ic insert one char (space)
    # IC insert multiple chars
    # nx terminal uses xon/xoff
    termcap facit|vt100|xterm LP:G0
    terminfo facit|vt100|xterm LP:G0
    #the vt100 description does not mention "dl". *sigh*
    termcap vt100 dl=5\E[M
    terminfo vt100 dl=5\E[M
    #facit's "al" / "dl" are buggy if the current / last line
    #contain attributes...
    termcap facit al=\E[L\E[K:AL@:dl@:DL@:cs=\E[%i%d;%dr:ic@
    terminfo facit al=\E[L\E[K:AL@:dl@:DL@:cs=\E[%i%p1%d;%p2%dr:ic@
    #make sun termcap/info better
    termcap sun 'up=^K:AL=\E[%dL:DL=\E[%dM:UP=\E[%dA:DO=\E[%dB:LE=\E[%dD:RI=\E[%dC:IC=\E[%d@:WS=1000\E[8;%d;%dt'
    terminfo sun 'up=^K:AL=\E[%p1%dL:DL=\E[%p1%dM:UP=\E[%p1%dA:DO=\E[%p1%dB:LE=\E[%p1%dD:RI=\E[%p1%dC:IC=\E[%p1%d@:WS=\E[8;%p1%d;%p2%dt$<1000>'
    #xterm understands both im/ic and doesn't have a status line.
    #Note: Do not specify im and ic in the real termcap/info file as
    #some programs (e.g. vi) will (no,no, may (jw)) not work anymore.
    termcap xterm|fptwist hs@:cs=\E[%i%d;%dr:im=\E[4h:ei=\E[4l
    terminfo xterm|fptwist hs@:cs=\E[%i%p1%d;%p2%dr:im=\E[4h:ei=\E[4l
    # Long time I had this in my private screenrc file. But many people
    # seem to want it (jw):
    # we do not want the width to change to 80 characters on startup:
    # on suns, /etc/termcap has :is=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;3;4;6l:
    termcap xterm 'is=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;4;6l'
    terminfo xterm 'is=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;4;6l'
    # Do not use xterms alternate window buffer.
    # This one would not add lines to the scrollback buffer.
    #termcap xterm|xterms|xs ti=\E7\E[?47l
    #terminfo xterm|xterms|xs ti=\E7\E[?47l
    #make hp700 termcap/info better
    termcap hp700 'Z0=\E[?3h:Z1=\E[?3l:hs:ts=\E[62"p\E[0$~\E[2$~\E[1$}:fs=\E[0}\E[61"p:ds=\E[62"p\E[1$~\E[61"p:ic@'
    terminfo hp700 'Z0=\E[?3h:Z1=\E[?3l:hs:ts=\E[62"p\E[0$~\E[2$~\E[1$}:fs=\E[0}\E[61"p:ds=\E[62"p\E[1$~\E[61"p:ic@'
    #wyse-75-42 must have defflow control (xo = "terminal uses xon/xoff")
    #(nowadays: nx = padding doesn't work, have to use xon/off)
    #essential to have it here, as this is a slow terminal.
    termcap wy75-42 nx:xo:Z0=\E[?3h\E[31h:Z1=\E[?3l\E[31h
    terminfo wy75-42 nx:xo:Z0=\E[?3h\E[31h:Z1=\E[?3l\E[31h
    #remove some stupid / dangerous key bindings
    bind ^k
    #bind L
    bind ^\
    #make them better
    bind \\ quit
    bind K kill
    bind I login on
    bind O login off
    bind } history
    # Modified Liberty, Display the status on the gnome terminal title
    #hardstatus string "[screen %n%?: %t%?] %h"
    termcapinfo xterm*|rxvt*|urxvt* 'hs:ts=\E]2;:fs=\007:ds=\E]2;screen\007'
    hardstatus string "[screen: %w] %h"
    # scrollback buffer size
    defscrollback 5000
    Solved by adding this to .zshrc
    case $TERM in
    xterm*|rxvt*|screen*)
    precmd() { print -Pn "\e]0;%m:%~\a" }
    preexec () { print -Pn "\e]0;$1\a" }
    esac
    Last edited by helloworld1 (2011-04-12 16:25:53)

    I have
    defhstatus "^Et"
    in my .screenrc. Maybe there's something you like even better, e.g. there's also "^EH" which I used to use. Just checkout what can be done with defhstatus, you'll find what you want.

  • [Solved] Zsh prompt issues

    Hello,
    Ive recently restored my arch system from a backup due to some problems. However I am now having an issue with my zsh prompt.
    I have a .zshrc file in my home dir that was always obeyed by zsh before. Now when I log in the ~/.zshrc file is loaded because all my aliases still work but my prompt is not the one specified in ~/.zshrc file.
    If I copy ~/.zshrc to /etc/zsh/zshrc then the prompt is loaded along with all the other aliases etc.
    Can anyone suggest why this maybe as id like to keep the zsh settings on a per-user basis?
    Thanks
    EDIT: Sorry fixed by reinstalling zsh
    Last edited by ck3mp (2013-04-07 13:01:27)

    Not sure if this is directly relevant to your situation or not, but I encountered a very similar issue starting the other week; loading promptinit and selecting a theme would work, but setting a custom PS1= etc. through my ~/.zshrc no longer did, even though it was still being loaded. I similarly did not think to re-install the package, until I came across this thread. As part of doing so I had to remove several packages with a Zsh dependency. After re-installing Zsh, my normal PS1 etc. came back, but went away again after re-installing the other packages.
    In my case, it appears extra/grml-zsh-config was the culprit; this package adds a lengthy /etc/zsh/zshrc, and the behaviour occurs when that file is present. I couldn't say if this is a bug or just intended behaviour (indeed, I only had GRML-Zsh-Config installed as a dependency for another package); either way, once identified, workarounds became possible.
    Would be curious to know if this was also the case at your end (and if not, well... it seems there are a number of ways one can lose their Zsh prompt configuration!)

  • Multiline zsh prompt messes RPROMPT

    Hello,
    I have a multiline zsh prompt which is fine, but I'd like to add the hour in the RPROMPT. Unfortunately, the RPROMPT displays at the end of the second line of the prompt, whereas I want it at the first line. What I have looks like this:
    ~
    >>= archey 3:22
    And I would like this:
    ~ 3:22
    >>= archey
    So, I tried adding a control character to move the cursor up one line, but it still doesn't work. Before adding a control char:
    autoload -U colors && colors
    setopt prompt_subst
    PROMPT=$'%{$fg[blue]%}%~%{$reset_color%}
    %{$fg[red]%}>>=%{$reset_color%} '
    RPROMPT="%D{%L:%M:%S}"
    And after:
    autoload -U colors && colors
    setopt prompt_subst
    PROMPT=$'%{$fg[blue]%}%~%{$reset_color%}
    %{$fg[red]%}>>=%{$reset_color%} '
    RPROMPT="\033[1A%D{%L:%M:%S}"
    Could you help me sort this out ?
    Last edited by Mathuin (2014-04-23 14:36:57)

    You may want to move precmd() outside of the setprompt() function ...
    Also, there's no reason to create $PR_COLORS. ZSH supports %B...%b for bold and %F{color}...%f for foreground colors. If you're using a 256 color terminal, you can specify 001-255 in %F{}.
    Here is my prompt;
    setprompt () {
    # Need this so the prompt will work.
    setopt prompt_subst
    # see if we can use colors.
    autoload colors zsh/terminfo
    colors
    if [[ $UID == 0 ]] ; then
    PROMPT='[%B%F{red}%n%f%b@%F{green}%m%f:%y] %B%F{yellow}%~%f%b %# '
    else
    PROMPT='[%F{025}%n%f@%F{200}%m%f:%y] %B%F{035}%~%f%b %# '
    fi
    setprompt
    See also
    man zshall | less -p "Visual effects"

  • Question regarding Dashboard and column prompt

    My question regarding Dashboard and column prompt:
    1) Dashboard prompt usually work with only for columns which are in subject area. In my report I've created some of the columns which are based on other columns. Like I've daysNumber column that is based on two other columns, as it calculates the difference of two dates. When I create dashboard prompt I can't find this column there. I need to make a prompt on this column.
    2)For one of the column I've only two values 1 and 0. When I create prompt for this column, is it possible that in drop down list It shows 'Yes' for 1 and 'No' for 0 and still filter the request??

    Hi Toony,...
    I think there was another way of doing this...
    In the dashboard prompt go to Show option > select SQL Results from dropdown.
    There you need to write your Logical SQL like...
    SELECT CASE WHEN 1=0 THEN PERIODS.YEAR ELSE difference of date functionality END FROM SubjectAreaName
    Here.. Periods.Year is the column which is already exists in repository's presentation layer..
    and difference of date functionality is the code or formula of column which you want to show in drop-down...
    Also write the CASE WHEN 1=0 THEN PERIODS.YEAR ELSE difference of date functionality END code in fx of that prompt.
    I think it helps you in doing this..
    Just check and inform me if it works...
    Thanks & Regards
    Kishore Guggilla
    Edited by: Kishore Guggilla on Oct 31, 2008 9:35 AM

  • I am using Windows 7 Home Premium 64-bit OS.  I've never had this problem before... today I opened iTunes and it prompted me to download the newest version.  I use iTunes all the time and have updated it multiple times with no issues.  During the installa

    I am using Windows 7 Home Premium 64-bit OS.I've never had this problem before... today I opened iTunes and it prompted me to download the newest version.  I use iTunes all the time and have updated it multiple times with no issues.  During the installation process it gave me an error message that said: 
    Runtime error! 
    Program C:\Program Files\iTunes.exe
    R0634
    An application has made an attempt to load the C runtime library incorrectly.
    Please contact the application's support team for more information.
    I quit the installation, uninstalled iTunes and rebooted my computer.  I now receive a similar message with a slight difference:
    Runtime error! 
    Program C:\Program Files (x86)...
    R0634
    An application has made an attempt to load the C runtime library incorrectly.
    Please contact the application's support team for more information.
    I did not leave anything out from the error message.  It doesn't point to a specific file, it just ends with "(x86)..."  Every time I boot up my computer, this error message pops up on my desktop.
    How do I repair this issue?  I have found multiple suggested solutions but am unsure which one is the best, and I don't want to try a bunch of different things for fear I may make the problem worse.  I would like to try and fix this myself if possible but I need to know if that is really possible or if I need to take my computer to someone for repairs.  Any suggestions will be greatly appreciated!!

    Hi lustyln,
    I'm having a little trouble understanding all of what you are trying to explain. From what I can tell, it sounds like your PC has a lot of software problems and you want to know what is supposed to be there and what isn't.
    For reference, here are your product specifications:
    http://h10025.www1.hp.com/ewfrf/wc/document?cc=us&dlc=en&docname=c01893242&lc=en&product=4043282
    To get your PC software back to how it was when it was first purchased, run a system recovery:
    http://h10025.www1.hp.com/ewfrf/wc/document?cc=us&dlc=en&docname=c01867418&lc=en&product=4043282
    I hope this helps.
    ...an HP employee just trying to help where I can, but not speaking on behalf of HP.

  • How do i stop an old apple ID and password prompt from always popping up on my phone during normal use ?

    How do i stop an old apple ID and password prompt from popping up on my phone screen during normal operations ?

    How to change the Apple ID on my iOS Device
    Settings > iTunes & App stores.
    Tap your Apple ID, sign out then sign back in with new AppleID.
    Settings > Facetime.
    Tap your Apple ID, sign out then sign back in with new AppleID.
    Settings > Messages.
    Turn off iMessages, wait 10 seconds, then turn it back on.  Go to 'Receive messages at' and then tap your Apple ID.  Sign out of the old ID, then sign in with new Apple ID.
    Settings > iCloud.
    Delete the account (make sure to KEEP the information on your phone), then turn it back on with new Apple ID.
    Also, delete any apps that were downloaded with the 'old' Apple ID, then reinstall them with your 'new' ID.

  • ICloud has my old Apple ID and is prompting for a password, but I want to put in the new id, I can't because it is grey and there is no edit option.  I'm prompted for a password to an account that doesn't exist

    iCloud has my old Apple ID and is prompting for a password, but I want to put in the new id, I can't because it is grey and there is no edit option.  I'm prompted for a password to an account that doesn't exist.  Anyone know what I can do to fix this or why this is happening.?  I had no issue putting in my new Apple ID everywhere else, I could sign out of the old and inactive account and then sign back in using my new and proper one.  However, after the update to 7.3 it did a whole welcome to yr iPad and a set up thing and it went to set up iCloud and had my old Apple ID in grey where I can't change or edit it, it wants the password, when I put in the old password, it say yr Apple ID is incorrect but yet it won't let me change it??????? Anyone???

    Sign out and back into your apple id from Settings>iTunes and App stores>(Your apple ID)>Sign Out and then sign in again with the new address. Close app store from running in the background (or restart the phone if your unsure how to do this). If when trying to update any apps they are still asking for the old apple ID, delete and re-install those apps.

  • Downloaded iOs 5.0.1 but songs did not restore to my phone. Tried to synch to iTunes today and it prompted me to "restore" my phone again. Did that but songs did not restore. Each time I try to synch, it prompts me to restore with the same result. Help!

    When I first downloaded iOS 5.0.1 on Monday night I received an error message (I didn't capture it, sorry). So I re-attempted. After downloading and restoring my phone from backup, it prompted me again to restore my phone. I complied. And it prompted me to restore my phone from the backup again. I tried it again with the same result. Finally frustrated I stopped.
    I didn't realize until the next day that my music was empty on the phone. I tried to synch today to get my songs back on the phone and instead it AGAIN asked me to restore my phone from the backup. I complied but my music is still missing. I need help!
    Please note I am using iTunes as the backup storage on my PC, I haven't turned on iCloud because I don't have wireless service in my home.
    I am soooo frustrated right now. I need my music to go running in the morning.
    Any tips would be greatly appreciated!

    Make sure iTunes is up to date and try again.

  • I was sycing my ipod with my computer to get a new album and itunes prompted me saying that there was a previous account for the ipod or something and if I should carry on and deletle it or cancel the sync. I wanted the album so I clicked carry on an

    I was sycing my ipod with my computer to get a new album and itunes prompted me saying that there was a previous account for the ipod or something and if I should carry on and deletle it or cancel the sync. I wanted the album so I clicked carry on and delete the account. When I checked my ipod afterwards all almost all of my music was gone exept for what I had just downloaded. This was thosands of songs that I had carefully picked over the years and now they are all gone. Someone please help me!!!

    Get all that music back in itunes and sync again.

  • HT4061 dtr plugged in phone to itunes and it prompted an error and now phone says it has to be restored.  She doesn't want to to do this as she will loose all pics...the screen is stuck on prompt to plug in to itunes

    My dtr plugged her phone in to link to itunes and it prompted an error message.  Now itunes saying she has to restore the phone which she doesn't want to do as will lose all pics...the phone has a screen that will only prompt to reconnect to itunes even after turning off.  What can I do to save what is in the phone? Please and thanks!

    Reset, hold both home and power buttons until the iPhone begins to start, try this a few times if necessary. If still problem, you may have to just Restore your iPhone to get it working. In the future sync your iPhone with iTunes routinely and when it contains important data, iCloud when set correctly will do this for you continuously.

  • I am unable to upload the latest version of iTunes.  It worked before and when prompted uploaded the newest version.  Now I'm unable to access iTunes..."Error 7 Windows Error126.  Insufficient privileges".  What do I do?

    I am unable to upload the latest version of iTunes.  It worked before and when prompted uploaded the newest version.  Now I'm unable to access iTunes..."Error 7 Windows Error126.  Insufficient privileges".  What do I do?

    Hey thomashfrompa,
    Thanks for the question. I understand that you are experiencing issues with iTunes for Windows. The following article outlines the error message you are receiving and a potential resolution:
    iTunes 11.1.4 for Windows: Unable to install or open
    http://support.apple.com/kb/TS5376
    Some Windows customers may experience installation issues while trying to install or open iTunes 11.1.4.
    Symptoms may include:
    "The program can't start because MSVCR80.dll is missing from your computer"
    "iTunes was not installed correctly. Please reinstall iTunes. Error 7 (Windows Error 126)”
    "Runtime Error: R6034 - An application has made an attempt to load the C runtime library incorrectly"
    "Entry point not found: videoTracks@QTMovie@@QBE?AV?$Vector@V?$RefPtr@VQTTrack@@@***@@$0A@VCrashOnOverf low@@***@@XZ could not be located in the dynamic link library C:\Program Files(x86)\Common Files\Apple\Apple Application Support\WebKit.dll”
    Resolution
    Follow these steps to resolve the issue:
    Check for .dll files
    1. Go to C:\Program Files (x86)\iTunes and C:\Program Files\iTunes and look for .dll files.
    2. If you find QTMovie.DLL, or any other .dll files, move them to the desktop.
    3. Reboot your computer.
    Note: Depending on your operating system, you may only have one of the listed paths.
    Uninstall and reinstall iTunes
    1. Uninstall iTunes and all of its related components.
    2. Reboot your computer. If you can't uninstall a piece of Apple software, try using the Microsoft Program Install and Uninstall Utility.
    3. Re-download and reinstall iTunes 11.1.4.
    Thanks,
    Matt M.

  • I can't email a photo directly from iPhoto.  First, I only have two "themes" to choose from instead of 8, and when prompted to fill in the "to" and "from", the "from" box has "MobileMe" already in it, and I can't get rid of or change it. I have OSXLion

    I can't email a photo directly from iPhoto.  First, I only have two "themes" to choose from instead of 8, and when prompted to fill in the "to" and "from", the "from" box has "MobileMe" already in it, and I can't get rid of or change it. I have OSXLion

    I understand, as that was the place I would change it before 8.3 but now that option of Mail Days to Sync is not available?  Any idea why that would be?

  • Trying to dowload newest version of Firefox and after prompted 2 drag Firefox icon into Applications folder get message that task can't be completed bc Firefox is in use but only use I'm making is to have FF open to download new version.

    Trying to download newest version and after prompted to drag the Firefox icon into the Applications folder get message that task can't be completed bc Firefox is in use, but only use I'm making of Firefox is to have it open to download the newest version.

    If there are problems with updating or with the permissions then easiest is to download the full version and trash the currently installed version to do a clean install of the new version.
    Download a new copy of the Firefox program and save the disk image (dmg) file to the desktop
    * Firefox 7.0.x: http://www.mozilla.com/en-US/firefox/all.html
    * Trash the current Firefox application to do a clean (re-)install
    * Install the new version that you have downloaded
    Your profile data is stored elsewhere in the Firefox Profile Folder, so you won't lose your bookmarks and other personal data if you uninstall and (re)install Firefox.
    * http://kb.mozillazine.org/Profile_folder_-_Firefox

Maybe you are looking for

  • Why a new trailers not formatting in hd play?

    Why are new trailers not formatting in HD play?

  • Missing Part List !!

    HI Is there any std report to see the missing part list. I mean material issued to prod order and we wana see the shortage. Thank You

  • Workitem in SRM

    What is workitem in SRM?

  • CS3 Color Issue-seeing Green

    All my images have a green cast to them in PS CS3 & Bridge My monitor is calibrated Images are fine in other applications, just not photoshop This issue started after a disk crash and was installed on a new hard disk. We have uninstalled it once and

  • IMac restarts when trying to boot up

    Since about 2 weeks ago,  my iMac has been having problems. The only problems which have occurred were during booting up. Whenever I try to boot up, there's a cycle - I press the back button, the chime plays, the grey screen, apple logo and loading w