PDA

View Full Version : [SOLVED] Share desktop icons with all users



Jasonx86
January 10th, 2010, 09:52 PM
Hi,

Another simple GNOME related question...

Is there a common desktop folder shared between all users of a system? i.e. If i place an icon in this common folder then all user desktops will have this icon.

If not how can this be achieved?


Thanks.

stinkeye
January 11th, 2010, 01:36 AM
Hi,

Another simple GNOME related question...

Is there a common desktop folder shared between all users of a system? i.e. If i place an icon in this common folder then all user desktops will have this icon.

If not how can this be achieved?


Thanks.
/usr/share/icons

same deal for
/usr/share/fonts
/usr/share/themes

Boondoklife
January 11th, 2010, 02:34 AM
I think you are asking a way to have the same desktop links on each desktop, no?

If so then really the best I could think of would be to change the default home directory skeleton and have it include the wanted desktop icons, but this would only work for new users and it would not update.

You could always write a startup script to be run by each user copying the links from a common folder to the desktop each login. This would be more what you want and easier to manage.

Hope that helps

Jasonx86
January 11th, 2010, 09:05 PM
I think you are asking a way to have the same desktop links on each desktop, no?

Yes.

Shame there is no efficient way of doing this. In the end I created a script which copied the icons/lauchers to the Desktop folder for every user from the location of a folder which contains common launchers:



LAUNCHER_SRC=/usr/share/launchers
USERS_DIR=/home
cd "$USERS_DIR"
find -maxdepth 1 -type d | while read N
do
(
LAUNCHER_DEST="$N"/Desktop
cd "$LAUNCHER_DEST" > /dev/null
if test "$?" = "0"
then
user_name=${N//[-.\/_]/}
echo "Recreating desktop icons for $user_name"
rm -R *.desktop > /dev/null
cp -R "$LAUNCHER_SRC"/*.* "./" > /dev/null
cd "$USERS_DIR"
fi
)
done

Moddemeijer
March 17th, 2011, 09:28 PM
Make a directory anywhere on the system.
Set the acces properties so that everyone has access
Make a symbolic link towards this directory

It would be something like

mkdir /anwhere/icons
cd /anywhere
chmod gua+rwx icons
ln -s /anywhere/icons ~user1/icons
ln -s /anywhere/icons ~user2/icons
and soon .....

stpgod
July 29th, 2011, 06:55 PM
Jason, I need to do exactly the same thing. How did you get the script to run for each user?