Greetings, I thought people might be interested in how I fixed this. Its kind of specific to sites that have user's $HOME directories in AFS. (Thats how we do things here at N.C. State University) Also, we have a mix of Red Hat Linux and Sun workstations. So we have to worry about people logging into either environment...
First, here is a link to a screen shot of my early efforts. This is with Solaris 10, U2: http://www.eos.ncsu.edu/hardware/images/sol10screenshot.png The way I achived this effect was to write a shell script. The script is /usr/dt/config/Xsession.d/0008.makehomefolder I have a generic home nautilus "launcher" at /opt/unity/desktop/Home.desktop Here is what my script looks like: (Some of it might wrap, sorry) ------------------------------------------------------- #!/bin/sh # Create a $Home folder for anyone logging into our desktop. # Gary Gatling <gsgatlin at eos.ncsu.edu> 3/9/2007 # The next few lines test whether or not our $HOME directory # is in AFS space, If it is we need to deal with # creating a $HOME folder differently. testfilename=/tmp/`whoami`.`perl -le "print int(rand 1000)"` /usr/afsws/bin/fs lq $HOME 2> $testfilename afstest=`cat $testfilename | grep "is not in AFS"` \rm -rf $testfilename if [ "$afstest" != "" ]; then # Our home directory is NOT in AFS! # Creation is relatively simple... if ! [ -d $HOME/Desktop ]; then mkdir -p $HOME/Desktop fi if ! [ -f $HOME/Desktop/Home.desktop ]; then cat /opt/unity/desktop/Home.desktop | sed "s at unit...@`whoami`@" > $HOME/Desktop/Home.desktop fi else # Our $HOME dir *IS* in AFS! # We need to create symlinks so that we have # sepperate desktops spaces for Solaris # and Linux. if ! [ -d $HOME/.realmfiles ]; then mkdir -p $HOME/.realmfiles fi if ! [ -d $HOME/.realmfiles/i386_linux26 ]; then mkdir -p $HOME/.realmfiles/i386_linux26 fi if ! [ -d $HOME/.realmfiles/sun4x_510 ]; then mkdir -p $HOME/.realmfiles/sun4x_510 fi if ! [ -h $HOME/Desktop ]; then if ! [ -d $HOME/Desktop ]; then mkdir -p $HOME/Desktop fi fi if ! [ -h $HOME/Desktop ]; then # We assume if $HOME/Desktop isn't a symlink then they have # already logged into Realm Linux at least once. mv -f $HOME/Desktop $HOME/.realmfiles/i386_linux26/Desktop fi if ! [ -d $HOME/.realmfiles/sun4x_510/Desktop ]; then mkdir -p $HOME/.realmfiles/sun4x_510/Desktop fi if ! [ -h $HOME/Desktop ]; then ln -s $HOME/.realmfiles/@sys/Desktop $HOME/Desktop fi if ! [ -f $HOME/Desktop/Home.desktop ]; then cat /opt/unity/desktop/Home.desktop | sed "s at unit...@`whoami`@" > $HOME/Desktop/Home.desktop fi fi ------------------------------------------------------- This is what /opt/unity/desktop/Home.desktop looks like: ------------------------------------------------------- [Desktop Entry] Encoding=UTF-8 Version=1.0 Type=Application Exec=nautilus --browser . TryExec= Icon=/usr/share/pixmaps/unity-home.png X-GNOME-DocPath= Terminal=false Name=UNITYID's Home GenericName=UNITYID's Home Comment= ------------------------------------------------------- The key here is the line: Exec=nautilus --browser . Which opens a nautilus file browser in $HOME. :) Ok, so what else do I do? I run these commands as root in my openpkg style rpm that sets stuff up at install time: gconftool-2 --direct --config-source xml:readwrite:/etc/gconf/gconf.xml.defaults --type bool --set /apps/nautilus/desktop/home_icon_visible false (We don't want that weird/non-standard "Documents" folder visible) gconftool-2 --direct --config-source xml:readwrite:/etc/gconf/gconf.xml.defaults --type string --set /apps/nautilus/desktop/computer_icon_name "Computer" (Change the name of the icon to match what Red Hat calls this) also, have to do: yes | /usr/sbin/pkgrm SUNWsogm to get rid of the "Star office 7" icon. Also have to delete /usr/share/nautilus/starthere-link.desktop to get rid of that icon. The next thing I am going to do to try to improve the appearance of the Sun JDS system is to create my own gtk "theme" with its own icons. Then I will make that new theme the default rather then using "Blueprint" theme. (It will still be installed in case people actually like that) Anyways... I thought people might be interested in how they can get rid of that "weird" "Documents" folder crap and make their JDS desktop's more Red Hat-ish/standard gnome-ish. Took me a while to figure out how it could be done. This message posted from opensolaris.org
