You are not logged in.
Hello all,
I recently switched to urxvt and am liking it a lot.
I have setup urxvtd, and 2 urxvtc to launch at startup through .xinitrc.
Here's my .xinitrc
#!/bin/bash
##
## ~/.xinitrc
##
## Executed by startx (run your window manager from here)
##
#
# activate num lock
numlockx &
# start xscreensaver backgrounded
xscreensaver -no-splash &
# set left-pointer
xsetroot -cursor_name left_ptr &
# start unclutter
unclutter -idle 5 -noevents -root &
# start xbindkeys
xbindkeys &
# set wallpaper (start feh)
sh ~/.fehbg &
# start terminal
#roxterm --title=%s &
#roxterm --title=%s &
urxvtd -q -o -f &
urxvtc &
urxvtc &
# set window manager name (for java)
wmname LG3D &
# run conky
conky | while read -r; do xsetroot -name "$REPLY"; done &
# launch dwm
exec /home/x33a/bin/dwm-start.sh
Till yesterday, everything was starting as expected. But, when i switched on
the computer today, my dwm didn't have 2 urxvtc windows started. I checked the
running processes, and found that all other applications from .xinitrc had
started properly, and even urxvtd was running.
Launching urxvtc manually works fine.
I restarted X 2-3 times, but the result was the same. I even restarted the
computer, but still the result was the same.
Anyone has an idea about what's going on?
Last edited by x33a (2011-04-23 12:12:31)
Offline
It may be as simple as urxvtd does not get started soon enough for urxvtc to make the connection. I would try adding a sleep between them, say try 5s (should be more than plenty) to start with, and if that works knock it back until it works with the least amount of time.
Offline
Instead of such a sleep, I'd use a separate script where urxvtc is not called until urxvtd completes (hence without backgrounding urxvtd). Call that script in .xinitrc in the background.
Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.
Offline
@ jac, the sleep trick worked. But, interestingly, it was launching fine without the sleep command previously. Though, i understand that without the daemon, the clients won't launch.
@ ngoonee, your idea seems better, since using sleep adds a certain delay to the overall process. I'll give it a try.
Thanks to both of you.
Offline
@ jac, the sleep trick worked. But, interestingly, it was launching fine without the sleep command previously. Though, i understand that without the daemon, the clients won't launch.
Race condition.
Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.
Offline
You are backgrounding a daemon, it's not necessary. The following works fine for me, admittedly I only spawn one term.
# Start urxvt daemon
urxvtd -q -f -o
# Spawn a terminal
urxvtc &
Offline
You are backgrounding a daemon, it's not necessary. The following works fine for me, admittedly I only spawn one term.
# Start urxvt daemon urxvtd -q -f -o # Spawn a terminal urxvtc &
I thought only the wm line in xinitrc should be foregrounded, rest everything should be backgrounded.
Anyway, i switched to this script from the wiki, and added an extra urxvtc line, to spawn 2 terminals
#!/bin/sh
urxvtc "$@"
if [ $? -eq 2 ]; then
urxvtd -q -o -f
urxvtc "$@"
urxvtc "$@"
fi
Last edited by x33a (2011-04-24 07:02:47)
Offline
I thought only the wm line in xinitrc should be foregrounded, rest everything should be backgrounded.
Backgrounding means the process is instructed to start and then immediately 'ignored', with the next process starting almost immediately. Obviously that causes a problem in your case. As I said, a race condition.
Rules like 'everything should be backgrounded' need more understanding. Yes, in general if you run something in xinitrc it should be backgrounded (or everything after that won't be run till the process exits) but urxvtd, like most daemons, forks off and returns control to the caller.
Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.
Offline
urxvtcd
Offline
edit: nvm, I missed the previous post in which you've already discovered the script
Last edited by Xyne (2011-04-24 19:02:27)
My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline
edit: nvm, I missed the previous post in which you've already discovered the script
Anyway thanks, i'm also using your clipboard script
Offline