Add login background Ubuntu 18.04

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP








up vote
0
down vote

favorite












I was able to modify the login background in gnome3-desktop using the following script way back in Ubuntu 16.04 LTS.



#!/usr/bin/sh

if [ "$IMAGE" = "" ]; then
IMAGE=$(
dbus-launch gsettings get org.gnome.desktop.screensaver picture-uri |
sed -e "s/'//g" |
sed -e "s/^file:////g"
)
fi
IMAGE="/home/chiku/Dropbox/LinuxStuff/Drow.jpg"

if [ ! -f $IMAGE ]; then
echo "unknown IMAGE $IMAGE"
exit 1
fi

echo ''
echo 'using the following image as login background:'
echo $IMAGE
echo ''

if [ -d ~/tmp ]; then
CREATED_TMP="0"
else
mkdir -p ~/tmp
CREATED_TMP="1"
fi

WORKDIR=~/tmp/gdm-login-background
GST=/usr/share/gnome-shell/gnome-shell-theme.gresource
GSTRES=$(basename $GST)

mkdir -p $WORKDIR
cd $WORKDIR
mkdir theme

for r in `gresource list $GST`; do
gresource extract $GST $r >$WORKDIR$echo $r
done

cd theme
cp "$IMAGE" ./

echo "
#lockDialogGroup
background: #2e3436 url(resource:///org/gnome/shell/theme/$(basename $IMAGE));
background-size: cover;
background-repeat: no-repeat;
" >>gnome-shell.css

echo '<?xml version="1.0" encoding="UTF-8"?>
<gresources>
<gresource prefix="/org/gnome/shell/theme">' >"$GSTRES.xml"
for r in `ls *.*`; do
echo " <file>$r</file>" >>"$GSTRES.xml"
done
echo ' </gresource>
</gresources>' >>"$GSTRES.xml"

glib-compile-resources "$GSTRES.xml"

sudo cp "/usr/share/gnome-shell/$GSTRES" "/usr/share/gnome-shell/$GSTRES.backup"
sudo cp "$GSTRES" /usr/share/gnome-shell/

rm -r $WORKDIR

if [ "$CREATED_TMP" = "1" ]; then
rm -r ~/tmp
fi


But the sed command give errors while trying to do the same in the native installation of gnome3 in Ubuntu 18.04.



Do any of you know how to solve it??



Any help is appreciated.







share|improve this question
























    up vote
    0
    down vote

    favorite












    I was able to modify the login background in gnome3-desktop using the following script way back in Ubuntu 16.04 LTS.



    #!/usr/bin/sh

    if [ "$IMAGE" = "" ]; then
    IMAGE=$(
    dbus-launch gsettings get org.gnome.desktop.screensaver picture-uri |
    sed -e "s/'//g" |
    sed -e "s/^file:////g"
    )
    fi
    IMAGE="/home/chiku/Dropbox/LinuxStuff/Drow.jpg"

    if [ ! -f $IMAGE ]; then
    echo "unknown IMAGE $IMAGE"
    exit 1
    fi

    echo ''
    echo 'using the following image as login background:'
    echo $IMAGE
    echo ''

    if [ -d ~/tmp ]; then
    CREATED_TMP="0"
    else
    mkdir -p ~/tmp
    CREATED_TMP="1"
    fi

    WORKDIR=~/tmp/gdm-login-background
    GST=/usr/share/gnome-shell/gnome-shell-theme.gresource
    GSTRES=$(basename $GST)

    mkdir -p $WORKDIR
    cd $WORKDIR
    mkdir theme

    for r in `gresource list $GST`; do
    gresource extract $GST $r >$WORKDIR$echo $r
    done

    cd theme
    cp "$IMAGE" ./

    echo "
    #lockDialogGroup
    background: #2e3436 url(resource:///org/gnome/shell/theme/$(basename $IMAGE));
    background-size: cover;
    background-repeat: no-repeat;
    " >>gnome-shell.css

    echo '<?xml version="1.0" encoding="UTF-8"?>
    <gresources>
    <gresource prefix="/org/gnome/shell/theme">' >"$GSTRES.xml"
    for r in `ls *.*`; do
    echo " <file>$r</file>" >>"$GSTRES.xml"
    done
    echo ' </gresource>
    </gresources>' >>"$GSTRES.xml"

    glib-compile-resources "$GSTRES.xml"

    sudo cp "/usr/share/gnome-shell/$GSTRES" "/usr/share/gnome-shell/$GSTRES.backup"
    sudo cp "$GSTRES" /usr/share/gnome-shell/

    rm -r $WORKDIR

    if [ "$CREATED_TMP" = "1" ]; then
    rm -r ~/tmp
    fi


    But the sed command give errors while trying to do the same in the native installation of gnome3 in Ubuntu 18.04.



    Do any of you know how to solve it??



    Any help is appreciated.







    share|improve this question






















      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I was able to modify the login background in gnome3-desktop using the following script way back in Ubuntu 16.04 LTS.



      #!/usr/bin/sh

      if [ "$IMAGE" = "" ]; then
      IMAGE=$(
      dbus-launch gsettings get org.gnome.desktop.screensaver picture-uri |
      sed -e "s/'//g" |
      sed -e "s/^file:////g"
      )
      fi
      IMAGE="/home/chiku/Dropbox/LinuxStuff/Drow.jpg"

      if [ ! -f $IMAGE ]; then
      echo "unknown IMAGE $IMAGE"
      exit 1
      fi

      echo ''
      echo 'using the following image as login background:'
      echo $IMAGE
      echo ''

      if [ -d ~/tmp ]; then
      CREATED_TMP="0"
      else
      mkdir -p ~/tmp
      CREATED_TMP="1"
      fi

      WORKDIR=~/tmp/gdm-login-background
      GST=/usr/share/gnome-shell/gnome-shell-theme.gresource
      GSTRES=$(basename $GST)

      mkdir -p $WORKDIR
      cd $WORKDIR
      mkdir theme

      for r in `gresource list $GST`; do
      gresource extract $GST $r >$WORKDIR$echo $r
      done

      cd theme
      cp "$IMAGE" ./

      echo "
      #lockDialogGroup
      background: #2e3436 url(resource:///org/gnome/shell/theme/$(basename $IMAGE));
      background-size: cover;
      background-repeat: no-repeat;
      " >>gnome-shell.css

      echo '<?xml version="1.0" encoding="UTF-8"?>
      <gresources>
      <gresource prefix="/org/gnome/shell/theme">' >"$GSTRES.xml"
      for r in `ls *.*`; do
      echo " <file>$r</file>" >>"$GSTRES.xml"
      done
      echo ' </gresource>
      </gresources>' >>"$GSTRES.xml"

      glib-compile-resources "$GSTRES.xml"

      sudo cp "/usr/share/gnome-shell/$GSTRES" "/usr/share/gnome-shell/$GSTRES.backup"
      sudo cp "$GSTRES" /usr/share/gnome-shell/

      rm -r $WORKDIR

      if [ "$CREATED_TMP" = "1" ]; then
      rm -r ~/tmp
      fi


      But the sed command give errors while trying to do the same in the native installation of gnome3 in Ubuntu 18.04.



      Do any of you know how to solve it??



      Any help is appreciated.







      share|improve this question












      I was able to modify the login background in gnome3-desktop using the following script way back in Ubuntu 16.04 LTS.



      #!/usr/bin/sh

      if [ "$IMAGE" = "" ]; then
      IMAGE=$(
      dbus-launch gsettings get org.gnome.desktop.screensaver picture-uri |
      sed -e "s/'//g" |
      sed -e "s/^file:////g"
      )
      fi
      IMAGE="/home/chiku/Dropbox/LinuxStuff/Drow.jpg"

      if [ ! -f $IMAGE ]; then
      echo "unknown IMAGE $IMAGE"
      exit 1
      fi

      echo ''
      echo 'using the following image as login background:'
      echo $IMAGE
      echo ''

      if [ -d ~/tmp ]; then
      CREATED_TMP="0"
      else
      mkdir -p ~/tmp
      CREATED_TMP="1"
      fi

      WORKDIR=~/tmp/gdm-login-background
      GST=/usr/share/gnome-shell/gnome-shell-theme.gresource
      GSTRES=$(basename $GST)

      mkdir -p $WORKDIR
      cd $WORKDIR
      mkdir theme

      for r in `gresource list $GST`; do
      gresource extract $GST $r >$WORKDIR$echo $r
      done

      cd theme
      cp "$IMAGE" ./

      echo "
      #lockDialogGroup
      background: #2e3436 url(resource:///org/gnome/shell/theme/$(basename $IMAGE));
      background-size: cover;
      background-repeat: no-repeat;
      " >>gnome-shell.css

      echo '<?xml version="1.0" encoding="UTF-8"?>
      <gresources>
      <gresource prefix="/org/gnome/shell/theme">' >"$GSTRES.xml"
      for r in `ls *.*`; do
      echo " <file>$r</file>" >>"$GSTRES.xml"
      done
      echo ' </gresource>
      </gresources>' >>"$GSTRES.xml"

      glib-compile-resources "$GSTRES.xml"

      sudo cp "/usr/share/gnome-shell/$GSTRES" "/usr/share/gnome-shell/$GSTRES.backup"
      sudo cp "$GSTRES" /usr/share/gnome-shell/

      rm -r $WORKDIR

      if [ "$CREATED_TMP" = "1" ]; then
      rm -r ~/tmp
      fi


      But the sed command give errors while trying to do the same in the native installation of gnome3 in Ubuntu 18.04.



      Do any of you know how to solve it??



      Any help is appreciated.









      share|improve this question











      share|improve this question




      share|improve this question










      asked May 11 at 7:39









      XChikuX

      184114




      184114

























          active

          oldest

          votes











          Your Answer







          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "89"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          convertImagesToLinks: true,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );








           

          draft saved


          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1034802%2fadd-login-background-ubuntu-18-04%23new-answer', 'question_page');

          );

          Post as a guest



































          active

          oldest

          votes













          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes










           

          draft saved


          draft discarded


























           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1034802%2fadd-login-background-ubuntu-18-04%23new-answer', 'question_page');

          );

          Post as a guest













































































          Popular posts from this blog

          Unable to execute new pre-installation script (/var/lib/dpkg/tmp.ci/preinst)

          Running the scala interactive shell from the command line

          Do not install recommended packages of dependencies