Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: how to remove "set as desktop background" in dropdown menu in ubuntu 16.04

  1. #1
    Join Date
    May 2014
    Beans
    16

    how to remove "set as desktop background" in dropdown menu in ubuntu 16.04

    Hi there,

    My native language is Dutch, but i'm trying to write in English, so sorry for faults in my writings.

    A friend of mine is a school teacher and has 30 computers with Ubuntu 16.04
    One big problem!
    The students keeps changing the wallpaper lol.

    Is there a way to prevent that.
    Can in the dropdown menu (if rightclicking) de "set as background" menu been removed?

  2. #2
    Join Date
    Nov 2008
    Location
    Metro Boston
    Beans
    13,304
    Distro
    Kubuntu 18.04 Bionic Beaver

    Re: how to remove "set as desktop background" in dropdown menu in ubuntu 16.04

    If the students don't have individual log in accounts, but just use a common shared account, then your friend should make the configuration files for that account read-only. Changing the background is only one of the possible ways students could futz with the desktop settings and many other things.

    The real solution for this is to give each student a separate account with authentication handled by a server using a solution like NIS, LDAP, or RADIUS.

    Your English is fine!
    If you ask for help, do not abandon your request. Please have the courtesy to check for responses and thank the people who helped you.

    Blog · Linode System Administration Guides · Android Apps for Ubuntu Users

  3. #3
    Join Date
    May 2014
    Beans
    16

    Re: how to remove "set as desktop background" in dropdown menu in ubuntu 16.04

    Hi SeijiSensei,

    I believe the desktops are not connected to a server because of the lack on financial recources.
    So each student has it's own log in account.

  4. #4
    Join Date
    Nov 2008
    Location
    Metro Boston
    Beans
    13,304
    Distro
    Kubuntu 18.04 Bionic Beaver

    Re: how to remove "set as desktop background" in dropdown menu in ubuntu 16.04

    Any one of the machines could be a "server" as well as functioning as a desktop. They would need to be wired together with Ethernet, of course.

    I just fired up my Ubuntu 16.04 virtual machine and changed my desktop background. The change was recorded in the file /home/myusername/.config/dconf/user. That's a binary file, as it turns out, so it's not directly editable.

    However the administrator can freeze the settings as follows:

    1) Set the appropriate background from the desktop..
    2) Now the administrator can open a terminal and enter the following:
    Code:
    cd /home
    sudo chattr +i */.config/dconf/user
    That chattr command turns on the "(i)mmutable" bit. Immutable files cannot be changed, even by their owners. Even root has to first turn off the bit with "chattr -i" in order to change or delete the file.

    The command I wrote would be applied to every user's directory under /home.

    This is a tedious process if the machines are not connected to a network, but it will prevent the students from changing the backgrounds.
    If you ask for help, do not abandon your request. Please have the courtesy to check for responses and thank the people who helped you.

    Blog · Linode System Administration Guides · Android Apps for Ubuntu Users

  5. #5
    Join Date
    Jun 2007
    Beans
    16,777

    Re: how to remove "set as desktop background" in dropdown menu in ubuntu 16.04

    You could look here, whether this ever worked correctly in Ubuntu is debatable.
    https://help.gnome.org/admin/system-...ckdown.html.en

    Making a user's .config/dconf/user file unwritable may cause issues, never tried but many apps write to it..

  6. #6
    Join Date
    May 2014
    Beans
    16

    Re: how to remove "set as desktop background" in dropdown menu in ubuntu 16.04

    Hi dear SeijiSensei,

    You are a wonderfull person.
    The command did the trick.
    Users can't change their background enymore.

    Now my question is:

    If the school want a new background on their computers, how can i undo this woderfull trick?

  7. #7
    Join Date
    Nov 2008
    Location
    Metro Boston
    Beans
    13,304
    Distro
    Kubuntu 18.04 Bionic Beaver

    Re: how to remove "set as desktop background" in dropdown menu in ubuntu 16.04

    The administrator needs to run
    Code:
    sudo chattr -i /home/username/.config/gconf/user
    before making any changes, then freeze them with "chattr +i".

    I don't know if making this file immutable will cause "collateral damage" as mc4man is concerned about. You'll probably discover any problems pretty quickly.
    If you ask for help, do not abandon your request. Please have the courtesy to check for responses and thank the people who helped you.

    Blog · Linode System Administration Guides · Android Apps for Ubuntu Users

  8. #8
    Join Date
    May 2014
    Beans
    16

    Re: how to remove "set as desktop background" in dropdown menu in ubuntu 16.04

    Hi dear SeijiSensei,

    I believe the last command you wrote is faulty, because i have it changed to dconf instead of gconf
    gconf file is not in the .conf

    but it works splendid so far...
    thanks for that.

  9. #9
    Join Date
    May 2014
    Beans
    16

    Re: how to remove "set as desktop background" in dropdown menu in ubuntu 16.04

    Quote Originally Posted by SeijiSensei View Post
    You'll probably discover any problems pretty quickly.
    Well eh... yes, i can't set the hidden files back to hidden after the first command:

    Code:
    sudo chattr +i */.config/dconf/user

  10. #10
    Join Date
    Apr 2011
    Location
    Mystletainn Kick!
    Beans
    8,857
    Distro
    Ubuntu

    Re: how to remove "set as desktop background" in dropdown menu in ubuntu 16.04

    Quote Originally Posted by Hendrik_Van_Marcke View Post
    Hi dear SeijiSensei,

    I believe the last command you wrote is faulty, because i have it changed to dconf instead of gconf
    gconf file is not in the .conf

    but it works splendid so far...
    thanks for that.
    gconf was the old configuration setup...
    easy to confuse the two.
    Splat Double Splat Triple Splat
    Earn Your Keep
    Don't mind me, I'm only passing through.
    Once in a blue moon, I'm actually helpful
    .

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

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