Can I remove Unity now and how?
With the gnome-session-flashback
, there are parts of it that use parts of Unity
. So, not every part of Unity
should be removed. LightDM
is the Display Manger for Unity, where GDM
is the Display Manager for the GNOME Desktop Environment
.
To install GDM
it is:
sudo apt-get install gdm
Note: If you already have GDM installed, run the following command to bring up the following setup:
sudo dpkg-reconfigure lightdm
During the install, you should see some screens like below:
Press Enter for OK and on the next screen, select the Display Manager you want:
Press Enter to select the Display Manager.
After it is selected, reboot your system for changes to take effect:
sudo reboot
After the host is rebooted, you should be in a gnome-session
or gnome-shell
from the terminal window, you should be able to start removing parts of Unity. I do not recommend removing all of Unity as there are still applications that rely on parts of Unity to work. One example I can think of in applications that rely other parts of desktops is k3b
. k3b
is a very good disc burning application that relies on parts of the KDesktop Environment
, so parts of KDE
would be installed for k3b
to work.
It is safe to remove Unity itself:
sudo apt-get remove unity
it is also safe to remove LightDM:
sudo apt-get remove lightdm
it is also safe to remove the Ubuntu Desktop, which is the Unity Desktop itself.
sudo apt-get remove ubuntu-desktop
If you are removing any of the above and you see an application that it wants to remove that you are unsure of, do not remove it until you find out more information about the application.
Related videos on Youtube
Matthew Schell
Updated on September 18, 2022Comments
-
Matthew Schell over 1 year
I am trying to make a C program about a Nuclear Missile launch. Below is my source code so far:
#include <stdio.h> #include <stdlib.h> #include <unistd.h> int nukeLaunchCode = 618243; int NLC_input; char *address; int main(void) { address = malloc(sizeof(char) * 60); printf("\033[0;34m[INFO] C.E.R.B.E.R.U.S Activating"); fflush(stdout); for (int i = 0; i < 3; i++){ printf("."); sleep(1); } fflush(stdout); printf("\n"); printf("\033[0;32m[INFO] C.E.R.B.E.R.U.S Initialized. Enter destination for nuke in address form: "); fgets(address, 60, stdin); printf("\033[0;32m[INFO] Geo locating address via Advanced UAV"); fflush(stdout); for (int i = 0; i < 6; i++) { printf("."); fflush(stdout); sleep(1); } printf("\n"); fflush(stdout); printf("\033[0;31m[WARNING] Target Acquired. Enter 6-digit Nuke Confirmation code to proceed: "); fgets(&NLC_input, 7, stdin); return 0; }
The problem is the fgets at the end of the code. I get a warning saying:
Incompatible pointer types passing 'int *' to parameter of type 'char *'
I've tried using scanf wiht the
"%d"
conversion symbol and then I get another warning saying:'scanf' used to convert a string to an integer value, but function will not report conversion errors; consider using 'strtol' instead
Can someone please tell me what I'm doing wrong? Also, I've included the fflush functions because i was trying to do something cool. I wanted to print a certain amount of dots every second after a sentence was printed to animate a loading kind of thing. For some reason, without the fflush functions, commands are executed out of order and the dots don't print. But even with the fflush functions, the first line that's printed doesn't print the 3 dots until the next line is printed. I'm pretty sure this is a misplacement in the fflush functions, but can someone help me with that too please? Thank you!
-
Admin almost 9 yearsStart with
sudo apt-get purge unity unity-2d
, and see how much that removes. See also this question. -
Admin almost 9 yearsI have only 3 Unity-related packages installed, only because I have Pidgin installed (which I can probably remove). I'm also running a KDE system, so I have no need for Unity. The only downside of removing Unity is that you won't be able to boot into the Unity DE, and might not be able to use applications that depend on Unity.
-
David C. Rankin over 3 years
int NLC_input;
so&NLC_input
is what? (hint: Pointer toint
) The prototype offgets()
ischar *fgets(char *s, int size, FILE *stream);
where the 1st argument ischar*
notint*
. Just usechar tmp[1024]
andfgets (tmp, sizeof tmp, stdin)
and thenif (sscanf (tmp, "%d", &NLC_input) != 1) { /* error invalid integer input */ }
-
Craig Estey over 3 yearsThe warning to use
strtol
instead is a new one ... But, personally, I've never been a fan ofscanf
[primarily for the stated reason]. I've always usedfgets
followed bystrtol
. For some code that illustrates what I mean, see my recent answer: stackoverflow.com/questions/65011769/… It has some precanned routines for prompting a user for a string or a number, which is what I think you're looking for. -
Elliott over 3 yearsPlease read how to ask a question. You should focus on one little problem at a time when asking questions, then you should reduce your code to provide a minimal working example. There's not a huge amount of code here, but it's very far from minimal. This should really be a one-line problem (and when reduced, it's actually probably two or three little problems that should be separate questions, or - more likely - already have good answers).
-
-
WinEunuuchs2Unix almost 7 yearsThis answer is to a version 15.04 question. Is it possible to update answer with 16.04 reference too? ie does or does not work.
-
Sergei G almost 7 yearsI have followed instructions these instructions on Ubuntu 16.04 LTS. It worked, but generated error related to plymouthd crashing (very similar if not the same is here: <bugs.launchpad.net/ubuntu/+source/ubuntu-gnome-default-settings/…) The solution was to execute the line at the end of the bug report: sudo dpkg-reconfigure Plymouth
-
sage almost 7 yearsI followed without errors just now on 'Ubuntu 16.04.2 LTS', '4.4.0-79-generic #100-Ubuntu SMP Wed May 17 19:58:14 UTC 2017'
-
iiqof almost 7 yearsFollowed in 17.04 and works perfectly
-
Benjamin almost 6 yearsThis helped me a lot to get rid of unity desktop and switch to gdm3 at 18.04 from 17.10
-
Matthew Schell over 3 yearsWow thank you! But I have a warning. I know warnings might not be too fatal but I always like to fix and optimize as much as possible because I think it's good practice. In the sscanf function, I'm getting told to use strtol again. Can you please explain why?
-
David C. Rankin over 3 yearsAlways enable full warnings and do not accept code until it compiles without warning.
strtol()
versessscanf()
can be used in many of the same circumstances. Ideally,strtol()
is used when you do not know the number of integers contained in the string and need to work your way down the input string converting values as you go. That said,strtol()
provide far superior error detection and reporting thansscanf()
.sscanf()
on the other hand is used when you do know how many inputs and that they will not overflow. It is use is convenient and provides a success/failure of conversion. -
David C. Rankin over 3 yearsThe prototype for
strtol()
islong int strtol(const char *nptr, char **endptr, int base);
The end-pointer parameterendptr
can beNULL
. The number-pointernptr
must point to a character string containing the digits to be converted. Thebase
is the number base, e.g.2
,8
,10
,16
, etc.. Use of0
for the base will use the base suggested by either octal, decimal or hex formatted string03
(octal3
) or0xff
(hexff
) Usingendptr
(note it is a pointer to pointer tochar
), you must comparenptr != endptr
to validate digits converted, and thaterrno
is not set. -
David C. Rankin over 3 yearsYou can edit your question and ADD your attempt with
strtol()
as an addition below your original question and I can help further. Or see Detect strtol Failure -
Matthew Schell over 3 yearsI'll try the strtol function tomorrow, it's getting a little late for me. But thanks!
-
Matthew Schell over 3 yearsLet us continue this discussion in chat.