LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Starting different apps in different workspaces on login (GNOME)? (https://www.linuxquestions.org/questions/linux-general-1/starting-different-apps-in-different-workspaces-on-login-gnome-171371/)

lrt2003 04-17-2004 03:12 PM

Starting different apps in different workspaces on login (GNOME)?
 
hello there!

I was curious to see whether it was possible to configure session startup programs to load certain apps in certain workspaces... that would be so sweet..

basically, so I can log into X and have all my apps on their workspaces all ready for me :D

(I'm on Fedora Core 1 - fully updated - using GNOME)

AutOPSY 04-17-2004 04:20 PM

a file called xinitrc thats a global file.

/etc/X11/xinit/xinitrc

Should have an example at the bottom, I belive its a -1+-1 type format that you use for the location of the upper left corner of the window thats launched.

lrt2003 04-17-2004 06:26 PM

thanks, it's good to know it's possible...

yay, I have that file.. but it has no example :(

I'm on Fedora Core 1 (updated).. I can't get normal apps to start up automatically, other than using the session GUI thing (I don't know how to do it manually)

PS: there is no ~/.Xclients or ~/.xinitrc

eek, this is what I have for /etc/X11/xinit/xinitrc:

#!/bin/sh
# (c) 1999-2002 Red Hat, Inc.

userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
userxkbmap=$HOME/.Xkbmap

sysresources=/etc/X11/Xresources
sysmodmap=/etc/X11/Xmodmap
sysxkbmap=/etc/X11/Xkbmap

# merge in defaults
if [ -f "$sysresources" ]; then
xrdb -merge "$sysresources"
fi

if [ -f "$userresources" ]; then
xrdb -merge "$userresources"
fi

# merge in keymaps
if [ -f "$sysxkbmap" ]; then
setxkbmap `cat "$sysxkbmap"`
XKB_IN_USE=yes
fi

if [ -f "$userxkbmap" ]; then
setxkbmap `cat "$userxkbmap"`
XKB_IN_USE=yes
fi

if [ -z "$XKB_IN_USE" -a ! -L /etc/X11/X ]; then
if grep '^exec.*/Xsun' /etc/X11/X > /dev/null 2>&1 && [ -f /etc/X11/XF86Config ]; then
xkbsymbols=`sed -n -e 's/^[ ]*XkbSymbols[ ]*"\(.*\)".*$/\1/p' /etc/X11/XF86Config`
if [ -n "$xkbsymbols" ]; then
setxkbmap -symbols "$xkbsymbols"
XKB_IN_USE=yes
fi
fi
fi

# xkb and xmodmap don't play nice together
if [ -z "$XKB_IN_USE" ]; then
if [ -f "$sysmodmap" ]; then
xmodmap "$sysmodmap"
fi

if [ -f "$usermodmap" ]; then
xmodmap "$usermodmap"
fi
fi

unset XKB_IN_USE

# run all system xinitrc shell scripts.
for i in /etc/X11/xinit/xinitrc.d/* ; do
if [ -x "$i" ]; then
. "$i"
fi
done

# The user may have their own clients they want to run. If they don't,
# fall back to system defaults.
# set up ssh agent environment if available.

if [ -f $HOME/.Xclients ]; then
[ -x /usr/bin/ssh-agent -a -z "$SSH_AGENT_PID" ] && \
exec ssh-agent $HOME/.Xclients || \
exec $HOME/.Xclients
elif [ -f /etc/X11/xinit/Xclients ]; then
[ -x /usr/bin/ssh-agent -a -z "$SSH_AGENT_PID" ] && \
exec ssh-agent /etc/X11/xinit/Xclients || \
exec /etc/X11/xinit/Xclients
else
# failsafe settings. Although we should never get here
# (we provide fallbacks in Xclients as well) it can't hurt.
xclock -geometry 100x100-5+5 &
xterm -geometry 80x50-50+150 &
if [ -x /usr/bin/netscape -a -f /usr/share/doc/HTML/index.html ]; then
netscape /usr/share/doc/HTML/index.html &
fi
if [ -x /usr/X11R6/bin/fvwm2 ]; then
exec fvwm2
else
exec twm
fi
fi

could you please do an example for a normal program? if possible, one on a different workspace as a different example too. lol I'm pushing it... I'm googling at the momemt too... I found this: http://mail.gnome.org/archives/gnome.../msg00326.html - still reading up

I ask because that file is so confusing.. I can understand this kinda stuff

#!/bin/sh

# if your backspace and delete are reversed, try this:
xmodmap -e "keysym BackSpace=Delete" -e "keysym
Delete-BackSpace"

# make the desktop dark blue
xsetroot -solid darkslateblue

# start some basic applications
xclock -geometry 96x96+2+2 -bg grey40 -fg black -hl white &
xload -geometry 120x96+2+147 -bg grey40 -fg white -hl darkred -update 4

&
xterm -sb -ls -geom 80x25-2+2 -title ?shell? &
xterm -sb -ls -geom 80x25-2-2 &

.. but I don't wanna bugger up my system..

I don't want to appear lazy.. just cautious :D

oh, and could I just create a ~/.xinitrc instead? would that work? without all that other crap (from /etc/*)?

thx, I'm full of questions today!


All times are GMT -5. The time now is 01:19 AM.