Find the answer to your Linux question:
Results 1 to 5 of 5
I would like to write a script that would remove and/or create shortcuts in Gnome desktop in RHEL 6.3... I googled all over the place could never find what I ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Sep 2013
    Posts
    13

    Create/remove desktop short cuts via command line RHEL 6.3....


    I would like to write a script that would remove and/or create shortcuts in Gnome desktop in RHEL 6.3...

    I googled all over the place could never find what I needed...

    Any help would be greatly appreciated!

    Thank you!

  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,706
    You will probably have to write your own tools to do this. The gnome shortcuts for RHEL 6 have this format:
    Code:
    [Desktop Entry]
    Name=NameOfApplication
    Type=Application
    StartupNotify=true|false (usually true)
    Path=location of application executable such as /usr/bin/appname
    Icon=icon name (optional)
    Note that this is only for application shortcuts.

    Removal is simple - just remove them from the user's Desktop directory, such as "rm -f /home/username/Desktop/appname".
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  3. #3
    Just Joined!
    Join Date
    Sep 2013
    Posts
    13
    Interesting Rubberman...I stumbled across the appname.desktop files under Desktop directories yesterday. With your suggestion, I think I'm starting to wrap my head around a couple of possibilities.

    While I'm fortunate to still have your attention (at least hope still I do ) I was curious if you knew of a way to lockdown the icons on the desktop altogether so that a user cannot rename, delete......and in a perfect world....perhaps not even able to move?

    I tried creating a short cut then chown/chgrp to, for example, root but I was still able to rename and delete...along with some other funky stuff happening.

    Really appreciate the help!!

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,706
    User-specific desktop shortcuts are owned by the user, though I think you can create some that are inherited by all users which only root could remove. I'm not sure offhand where they are kept - you need to read some docs to find out.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  6. #5
    Just Joined!
    Join Date
    Sep 2013
    Posts
    13
    Gotcha...I think we kind of did something similar in CDE in solaris. Been a while since I messed with this desktop stuff tho, so I need to do some more digging!

    Thanks again!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •