I have installed porteus with xfce. In my system default user is root. When logged in, I am facing with warnings why I using root account as default.
By this reason I want to disable root user warnings like "warning, you are using the root account, you may harm your system"
Could you please help me about this problem.
Thanx
Disabling root user warnings?
-
- Ronin
- Posts: 3
- Joined: 24 Jun 2015, 08:32
- Distribution: porteus
- Location: New York
-
- Contributor
- Posts: 657
- Joined: 26 Jun 2013, 14:03
- Distribution: x64 Openbox
- Location: against russian attacks and lies
- Contact:
Re: Disabling root user warnings?
Maybe you can find file in xfce module containing "warning, you are using the root account, you may harm your system" and modify it.
You have mind and feelings. Be wise and clever.
- sunnysideofthesun
- Black ninja
- Posts: 62
- Joined: 24 Apr 2015, 22:16
- Distribution: other
- Location: check the logs
Re: Disabling root user warnings?
Remove this code from thunar-window.c and recompile Thunar
Code taken from http://code.openhub.net/file?fid=u_dTYd ... ed=true#L0
They just check if you are root and spawn infobar and label if so without asking you.
The same with Mousepad
Code taken from ftp://213.85.246.177/pub/FreeBSD/ports/ ... c/window.c
I don't know where the very original of sourcecode is stored.
Code: Select all
/* check if we need to add the root warning */
if (G_UNLIKELY (geteuid () == 0))
{
/* add the bar for the root warning */
infobar = gtk_info_bar_new ();
gtk_info_bar_set_message_type (GTK_INFO_BAR (infobar), GTK_MESSAGE_WARNING);
gtk_table_attach (GTK_TABLE (window->table), infobar, 0, 1, 2, 3, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0);
gtk_widget_show (infobar);
/* add the label with the root warning */
label = gtk_label_new (_("Warning, you are using the root account, you may harm your system."));
gtk_container_add (GTK_CONTAINER (gtk_info_bar_get_content_area (GTK_INFO_BAR (infobar))), label);
gtk_widget_show (label);
}
They just check if you are root and spawn infobar and label if so without asking you.
The same with Mousepad
Code: Select all
/* check if we need to add the root warning */
if (G_UNLIKELY (geteuid () == 0))
{
/* install default settings for the root warning text box */
gtk_rc_parse_string("style\"mousepad-window-root-style\"{bg[NORMAL]=\"#b4254b\"\nfg[NORMAL]=\"#fefefe\"}\n"
"widget\"GtkWindow.*.root-warning\"style\"mousepad-window-root-style\"\n"
"widget\"GtkWindow.*.root-warning.GtkLabel\"style\"mousepad-window-root-style\"\n");
/* add the box for the root warning */
ebox = gtk_event_box_new();
gtk_widget_set_name(ebox, "root-warning");
gtk_box_pack_start(GTK_BOX(vbox), ebox, FALSE, FALSE, 0);
/* add the label with the root warning */
label = gtk_label_new(_("Warning, you are using the root account, you may harm your system."));
gtk_misc_set_padding(GTK_MISC(label), 6, 3);
gtk_container_add(GTK_CONTAINER(ebox), label);
separator = gtk_hseparator_new();
gtk_box_pack_start(GTK_BOX(vbox), separator, FALSE, FALSE, 0);
}
I don't know where the very original of sourcecode is stored.