Disabling root user warnings?

Get help with XFCE specific problems

Disabling root user warnings?

Postby kernelpanic » 24 Jun 2015, 09:43

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
kernelpanic
Ronin
Ronin
 
Posts: 3
Joined: 24 Jun 2015, 09:32
Location: New York
Distribution: porteus

Re: Disabling root user warnings?

Postby tome » 26 Jun 2015, 17:44

Maybe you can find file in xfce module containing "warning, you are using the root account, you may harm your system" and modify it.
tome
Contributor
Contributor
 
Posts: 556
Joined: 26 Jun 2013, 15:03
Location: Poland
Distribution: x64 Xfce (LXDE Openbox)

Re: Disabling root user warnings?

Postby sunnysideofthesun » 02 Jul 2015, 08:15

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.
User avatar
sunnysideofthesun
Black ninja
Black ninja
 
Posts: 62
Joined: 24 Apr 2015, 23:16
Location: check the logs
Distribution: other


Return to XFCE



Who is online

Users browsing this forum: No registered users and 2 guests