LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Ubuntu (https://www.linuxquestions.org/questions/ubuntu-63/)
-   -   Remove greeter virus when customizing Ubuntu 18.04 (https://www.linuxquestions.org/questions/ubuntu-63/remove-greeter-virus-when-customizing-ubuntu-18-04-a-4175642422/)

seasoned_geek 11-15-2018 11:05 AM

Remove greeter virus when customizing Ubuntu 18.04
 
1 Attachment(s)
Has anyone found a reliable way of removing the greeter virus in Ubuntu 18.04? (see annoying-greeter attachment). Everything I have found on-line doesn't work. I even created a script to get run as part of a ubiquity/success_command


#
#
sed -i 's/Exec=/#Exec=/' /usr/share/applications/gnome-initial-setup.desktop
sed -i 's/Exec=/#Exec=/' /usr/share/gdm/greeter/applications/gnome-initial-setup.desktop
sed -i 's/Exec=/#Exec=/' /usr/share/ubuntu-wayland/applications/gnome-initial-setup.desktop
sed -i 's/Exec=/#Exec=/' /usr/share/ubuntu/applications/gnome-initial-setup.desktop

sed -i 's/OnlyShowIn=GNOME;/OnlyShowIn=KDE;/' /usr/share/applications/gnome-initial-setup.desktop
sed -i 's/OnlyShowIn=GNOME;/OnlyShowIn=KDE;/' /usr/share/gdm/greeter/applications/gnome-initial-setup.desktop
sed -i 's/OnlyShowIn=GNOME;/OnlyShowIn=KDE;/' /usr/share/ubuntu-wayland/applications/gnome-initial-setup.desktop
sed -i 's/OnlyShowIn=GNOME;/OnlyShowIn=KDE;/' /usr/share/ubuntu/applications/gnome-initial-setup.desktop


and __still__ this virus comes back.


Has anyone found a reliable way to nuke it when building a custom ISO from a "live" disk?

jefro 11-16-2018 08:35 PM

Do you mean this? https://askubuntu.com/questions/1044...efault-greeter

seasoned_geek 11-17-2018 07:50 AM

Quote:

Originally Posted by jefro (Post 5926906)

No, I mean that popup survey dialog attached to the original post. That is where Canonical attempts to gather more information than Google on you. It keeps coming back just like a virus. I haven't found a command line way of getting rid of it when customizing an ISO. What I'm looking for is something I can put in the preseed file to nuke it.

hydrurga 11-17-2018 08:42 AM

If you don't mind me saying so, here's why your post may not have received much attention:

. The welcome screen isn't a greeter. More about greeters: https://wiki.archlinux.org/index.php/LightDM#Greeter

. The welcome screen isn't a virus, no matter your opinion of it. Many people won't be opening your post because they think it's to do with virus detection. In fact, the welcome screen allows you to turn off some of the default data collection.

. "Everything I have found on-line doesn't work" provides no information at all on what you have actually tried. Folk aren't going to spend time researching alternative solutions for you if there's the possibility you're going to just turn around and say "Oh no, that was one of the things I tried". In addition, this makes it appear that you have tried everything and that, unless someone has very specific knowledge, there's nothing that can be done.

For example, have you looked at this thread?

https://askubuntu.com/questions/1028...welcome-screen

seasoned_geek 11-18-2018 09:30 AM

Quote:

Originally Posted by hydrurga (Post 5927018)
If you don't mind me saying so, here's why your post may not have received much attention:

. The welcome screen isn't a greeter. More about greeters: https://wiki.archlinux.org/index.php/LightDM#Greeter

. The welcome screen isn't a virus, no matter your opinion of it. Many people won't be opening your post because they think it's to do with virus detection. In fact, the welcome screen allows you to turn off some of the default data collection.

. "Everything I have found on-line doesn't work" provides no information at all on what you have actually tried. Folk aren't going to spend time researching alternative solutions for you if there's the possibility you're going to just turn around and say "Oh no, that was one of the things I tried". In addition, this makes it appear that you have tried everything and that, unless someone has very specific knowledge, there's nothing that can be done.

For example, have you looked at this thread?

https://askubuntu.com/questions/1028...welcome-screen

Yep.

Only someone who actually succeeded will be of any use. I've been to every link on the first 3 pages of results for Google, Ask and Bing. I've even added this:

set +e
#
# Try to get rid of that virus known as the Ubuntu greeter
#
sed -i 's/Exec=/#Exec=/' /usr/share/applications/gnome-initial-setup.desktop
sed -i 's/Exec=/#Exec=/' /usr/share/gdm/greeter/applications/gnome-initial-setup.desktop
sed -i 's/Exec=/#Exec=/' /usr/share/ubuntu-wayland/applications/gnome-initial-setup.desktop
sed -i 's/Exec=/#Exec=/' /usr/share/ubuntu/applications/gnome-initial-setup.desktop

sed -i 's/OnlyShowIn=GNOME;/OnlyShowIn=NONE;/' /usr/share/applications/gnome-initial-setup.desktop
sed -i 's/OnlyShowIn=GNOME;/OnlyShowIn=NONE;/' /usr/share/gdm/greeter/applications/gnome-initial-setup.desktop
sed -i 's/OnlyShowIn=GNOME;/OnlyShowIn=NONE;/' /usr/share/ubuntu-wayland/applications/gnome-initial-setup.desktop
sed -i 's/OnlyShowIn=GNOME;/OnlyShowIn=NONE;/' /usr/share/ubuntu/applications/gnome-initial-setup.desktop

set -e


To a script run on Ubitquity success. Upon success of my install, I've even tried to trigger the uninstall of gnome-initial-setup.

The thing is a virus.

So far the only person I've found who had _any_ success, built their own ISO from scratch and put in a kickstart rule to block the initial installation of this package. Once it is there, seems like there are not enough antibiotics in the programming world to get rid of it.

So, yes, I expected an extremely limited response. There might be 3 people in the world who have successfully gotten rid of this when building a custom ISO from a live disc. I have no doubt that most everything I found in those links worked at some point, but the virus has adapted. It refuses to be killed.

pan64 11-18-2018 10:49 AM

I installed ubuntu several times and I can't remember if that was an issue at all. I think that's why you won't find a solution (because it is not a problem at all - therefore noone wanted to solve it). And it is still neither a greeter nor a virus, but a what's new information.
You need to learn the boot process (of ubuntu) and check what is running and especially how the initial [first] boot was configured. This sed is not the right approach I think.

seasoned_geek 11-18-2018 11:06 AM

Quote:

Originally Posted by pan64 (Post 5927361)
I installed ubuntu several times and I can't remember if that was an issue at all. I think that's why you won't find a solution (because it is not a problem at all - therefore noone wanted to solve it). And it is still neither a greeter nor a virus, but a what's new information.
You need to learn the boot process (of ubuntu) and check what is running and especially how the initial [first] boot was configured. This sed is not the right approach I think.

It's a problem for everyone building custom ISOs meant to run specific things. Not so much a boot process issue. The thing seems to leave pieces of itself all over. Doesn't appear one can ever truly remove it once it has been installed...other than low level formatting and using a different distro, the standard solution for a virus.

pan64 11-18-2018 01:24 PM

if that was the biggest problem in my life ...

seasoned_geek 11-18-2018 04:10 PM

Quote:

Originally Posted by pan64 (Post 5927414)
if that was the biggest problem in my life ...

When the client wants it to work a certain way and won't pay until it does, it becomes the biggest problem in your life. Has to do with eating and living indoors.

ondoho 11-20-2018 01:57 AM

i find your attitude a little lacking here; if someone had ever been in the exact same situation, don't you think they would've come forward already? we're trying to help you as best we can, but you seem to be holding that against us as a lack of understanding or ability, even though you don't have anything better to offer either.

anyhow, here's a thought: very likely this welcome screen has a checkbox at the end that has to be either checked or unchecked to avoid seeing this every time after login.
the program then usually stores an empty file somewhere, or adds a configuration option to an existing file, or something similar, that signifies "user has seen the welcome screen and doesn't want it anymore" - maybe you can manually add that to the .iso itself and thus avoid the problem.

seasoned_geek 11-20-2018 08:00 AM

1 Attachment(s)
Quote:

Originally Posted by ondoho (Post 5927907)
i find your attitude a little lacking here; if someone had ever been in the exact same situation, don't you think they would've come forward already? we're trying to help you as best we can, but you seem to be holding that against us as a lack of understanding or ability, even though you don't have anything better to offer either.

I'm not trying to hold it against anyone, just trying to point out this isn't one of those questions where a 12 year old can do a search with ask.com or duckduckgo.com and have the exact answer within the first 12 results. (Google would take 40-50 results for you to wade through all of the paid search results before you got to any real search results.) I realize that's the norm for places like this and stack overflow, but, this is actually the kind of question LinuxQuestions.org was formed to handle. The obscure.

As the link in one of the earlier responses shows, many, many people have this exact problem. Every time a functioning solution gets posted publicly it appears Canonical upgrades the virus to be resistant to the change. Just look at how many places they now hide the exact same file so the virus can continue to replicate itself.

Code:

sed -i 's/Exec=/#Exec=/' /usr/share/applications/gnome-initial-setup.desktop
sed -i 's/Exec=/#Exec=/' /usr/share/gdm/greeter/applications/gnome-initial-setup.desktop
sed -i 's/Exec=/#Exec=/' /usr/share/ubuntu-wayland/applications/gnome-initial-setup.desktop
sed -i 's/Exec=/#Exec=/' /usr/share/ubuntu/applications/gnome-initial-setup.desktop

There also appears to be files with different names hiding the same content because even if you disable all of these the virus still surfaces on initial log in.

No, if someone defeated this they won't post it publicly here because every time that has happened the virus appears to get upgraded. It would be a private message, once they are certain I don't work for Canonical.

Quote:

Originally Posted by ondoho (Post 5927907)
anyhow, here's a thought: very likely this welcome screen has a checkbox at the end that has to be either checked or unchecked to avoid seeing this every time after login.
the program then usually stores an empty file somewhere, or adds a configuration option to an existing file, or something similar, that signifies "user has seen the welcome screen and doesn't want it anymore" - maybe you can manually add that to the .iso itself and thus avoid the problem.

There is no checkbox. One must click the Next button through each and every screen in Canonical's pursuit of invading your privacy even more than Google. If you just happy key through it gives them the rights to collect everything ever known about you (or sure seems that way).

I am liking the "look for the change" idea. Perhaps over the holiday I will look for a script which will build a list of all file names (not paths, names) sorted by last modified timestamp. I could then create two accounts, Test5 and Test6, run the script to get the top 100 latest files. Log into Test5 and click my way through the Virus, log out, run the script again. Sure, there will be some dry-fires, but, one of them should have been tweaked as a result.

Not as good as complete removal of this virus (see attachment) but visually, almost as good.

pan64 11-20-2018 08:05 AM

that is nonsense. I have now a working ubuntu 16.04 desktop and there is no such file at all (gnome-initial-setup.desktop).
By the way a desktop file cannot be a virus and cannot replicate itself.
Furthermore you do not need to edit them, but replace the file pointed by Exec=. (copy /bin/true over it for example - when you prepare your installation image).

seasoned_geek 11-20-2018 09:15 AM

Quote:

Originally Posted by pan64 (Post 5928008)
that is nonsense. I have now a working ubuntu 16.04 desktop and there is no such file at all (gnome-initial-setup.desktop).
By the way a desktop file cannot be a virus and cannot replicate itself.
Furthermore you do not need to edit them, but replace the file pointed by Exec=. (copy /bin/true over it for example).

Why would 16.04 have this file. That still had the God foresaken Unity desktop. This virus was implemented after Unity was taken into the woods and had two put behind the ear.

Furthermore a .desktop file can replicate itself as much as it likes if via no other means than the target of Exec=

seasoned_geek 11-20-2018 11:15 AM

[Solved] Remove greeter virus
 
Quote:

Originally Posted by seasoned_geek (Post 5928041)
Why would 16.04 have this file. That still had the God foresaken Unity desktop. This virus was implemented after Unity was taken into the woods and had two put behind the ear.

Furthermore a .desktop file can replicate itself as much as it likes if via no other means than the target of Exec=

I did find it. You cannot get rid of the .desktop files, at least not successfully. Bit of a self-replicating virus there. You can tunnel all the way down and find one file which, the .destop application seems to handle when missing. When building a custom ISO from a Live Disk, you can put in a shell script which is run as part of ubiquity ubiquity/success_command string
Code:

#
#  Try to get rid of that virus known as the Ubuntu greeter
#
pushd
    cd /usr/lib/gnome-initial-setup
    mv gnome-welcome-tour ignore-gnome-welcome-tour
popd


When building .deb package which installs under a user it creates you can hide this virus in the following manner:

postinst
Code:

        # Remove annoying gnome greeter virus if it exists
        #
        if [ -f "/usr/lib/gnome-initial-setup/gnome-welcome-tour" ]; then
                pushd
                        cd /usr/lib/gnome-initial-setup
                        mv gnome-welcome-tour ignore-gnome-welcome-tour
                popd
        fi


postrm
Code:

    # Restore annoying gnome greeter virus if it exists
    #
    if [ -f "/usr/lib/gnome-initial-setup/ignore-gnome-welcome-tour" ]; then
        pushd
            cd /usr/lib/gnome-initial-setup
            mv ignore-gnome-welcome-tour gnome-welcome-tour
        popd
    fi

postinst and postrm are files specific to Debian packaging.

Renaming this file appears to leave Gnome greeter fully functional without any harmful side effects.

Now we can start the clock to see how long it takes developers at Canonical to adapt this virus so it can recover from the missing tour file.

l0f4r0 11-20-2018 12:13 PM

Please use [CODE] tags in all the appropriate posts from you (see my sig for HOWTO) ;)


All times are GMT -5. The time now is 03:36 PM.