Page 1 of 1
Disabling root user warnings?
Posted: 24 Jun 2015, 08:43
by kernelpanic
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
Re: Disabling root user warnings?
Posted: 26 Jun 2015, 16:44
by tome
Maybe you can find file in xfce module containing "warning, you are using the root account, you may harm your system" and modify it.
Re: Disabling root user warnings?
Posted: 02 Jul 2015, 07:15
by sunnysideofthesun
Remove this code from thunar-window.c and recompile Thunar
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);
}
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: 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);
}
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.