LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices



Reply
 
Search this Thread
Old 04-17-2004, 04:12 PM   #1
lrt2003
Member
 
Registered: Mar 2004
Distribution: Fedora 10
Posts: 182

Rep: Reputation: 30
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

(I'm on Fedora Core 1 - fully updated - using GNOME)
 
Old 04-17-2004, 05:20 PM   #2
AutOPSY
Member
 
Registered: Mar 2004
Location: US
Distribution: Redhat 9 - Linux 2.6.3
Posts: 836

Rep: Reputation: 31
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.
 
Old 04-17-2004, 07:26 PM   #3
lrt2003
Member
 
Registered: Mar 2004
Distribution: Fedora 10
Posts: 182

Original Poster
Rep: Reputation: 30
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

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!

Last edited by lrt2003; 04-17-2004 at 07:46 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Change workspaces with mouse in gnome GT_Onizuka Linux - Software 8 07-29-2007 05:30 PM
Starting applications at login in GNOME janisj Linux - Software 1 08-07-2004 07:40 AM
Switching workspaces in Gnome 2.4 php Linux - Software 0 09-30-2003 01:26 PM
fluxbox: starting programs in different workspaces at startup kirneh Linux - Software 1 08-06-2003 02:58 AM
Switching Workspaces in Gnome 2 n00dles Linux - Newbie 0 10-10-2002 01:46 PM


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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration