Page 1 of 2 12 LastLast
Results 1 to 10 of 16

Thread: Need help trying to create Gnome Root Terminal menu shortcut.

  1. #1

    Default Need help trying to create Gnome Root Terminal menu shortcut.

    Hello,

    I've been struggling with trying to find a way to add a shortcut to Gnome 3's menu. All I want is a shortcut that says Gnome Root Terminal and it starts Gnome Terminal, after asking for root's password. I'm trying to use
    gnomesu for this. I have my .desktop file in the /home/spork/.local/share/applications directory. My username is spork. When I have gnomesu added to TryExec and Exec, the .desktop file never shows. When I remove the gnomesu part, it shows up fine. Here's the section I'm talking about:
    Code:
    TryExec="gnomesu gnome-terminal"Exec="gnomesu gnome-terminal"
    I've tried it without the double quotes as well, like this:
    Code:
    TryExec=gnomesu gnome-terminal
    Exec=gnomesu gnome-terminal
    So it seems tryExec and Exec don't like the space. Any suggestions on how I can accomplish what I want to accomplish? Thanks!

    Spork Schivago

  2. #2

    Default Re: Need help trying to create Gnome Root Terminal menu shortcut.

    Just incase anyone needed it, here's my full gnome-root-terminal.desktop file:
    Code:
    [Desktop Entry]
    X-SuSE-translate=true
    GenericName=Root Terminal
    Name=GNOME Root Terminal
    Comment=Use the command line as root
    Keywords=root;shell;prompt;command;commandline;cmd;
    TryExec="/usr/bin/gnomesu gnome-terminal"
    Exec="/usr/bin/gnomesu gnome-terminal"
    Icon=utilities-terminal
    Type=Application
    X-GNOME-DocPath=gnome-terminal/index.html
    X-GNOME-Bugzilla-Bugzilla=GNOME
    X-GNOME-Bugzilla-Product=gnome-terminal
    X-GNOME-Bugzilla-Component=BugBuddyBugs
    X-GNOME-Bugzilla-Version=3.18.2
    Categories=GNOME;GTK;System;TerminalEmulator;
    StartupNotify=true
    X-GNOME-SingleWindow=false
    Encoding=UTF-8
    I just added the full path to gnomesu, thinking that might work, but Gnome Root Terminal still doesn't show up in the menu. If I remove gnomesu all together, it shows up just fine. Thanks!

  3. #3

    Default Re: Need help trying to create Gnome Root Terminal menu shortcut.

    I made a little progress by copying YaST.desktop to /home/spork/.local/share/applications after editing it. I stuck with using xdg-su -c "/usr/bin/gnome-terminal". It now asks for the password but when I type in root's password, gnome-terminal does NOT start up. I can't seem to find any log files that tell me why either. Any suggestions?

  4. #4
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    28,169
    Blog Entries
    15

    Default Re: Need help trying to create Gnome Root Terminal menu shortcut.

    Hi
    First off you need to use gnomesu -c <some-command> and you need to mark it as trusted... so open Naultilus and browse down to ~/.local/share/applications in here, you will see the desktop entry looking like a file, double click on it and mark as trusted, then it will show the dektop file with it's icon. Now double click on it and you should be good to go.

    If it's still failing, the add DBusActivatable=true to the desktop file.
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  5. #5

    Default Re: Need help trying to create Gnome Root Terminal menu shortcut.

    Quote Originally Posted by malcolmlewis View Post
    Hi
    First off you need to use gnomesu -c <some-command> and you need to mark it as trusted... so open Naultilus and browse down to ~/.local/share/applications in here, you will see the desktop entry looking like a file, double click on it and mark as trusted, then it will show the dektop file with it's icon. Now double click on it and you should be good to go.

    If it's still failing, the add DBusActivatable=true to the desktop file.
    Thank you Malcolmlewis. This is my new root-terminal.desktop file:
    Code:
    #!/usr/bin/env xdg-open
    [Desktop Entry]
    X-SuSE-translate=true
    Type=Application
    Categories=GNOME;GTK;System;TerminalEmulator;
    Name=Gnome Root Terminal
    Icon=utilities-terminal
    GenericName=Gnome Root Terminal
    Exec=/usr/bin/gnomesu -c "/usr/bin/gnome-terminal"
    Encoding=UTF-8
    Comment=Provide a root shell.
    DBusActivatable=true
    Regardless of whether I use gnomesu -c or xdg-su -c, it still just asks for the password but never opens up the terminal program, even with the DBusActivatable=true key. Even if I hit ALT-F2 and type:
    Code:
    gnomesu -c /usr/bin/gnome-terminal
    The same happens. I get asked for the password but gnome-terminal never starts. Could it have something to do with my user spork running X-Windows but it's somehow trying to look for a X-Windows session that might of been started by root instead of spork?

    Any more suggestions? Thanks!

  6. #6
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    28,169
    Blog Entries
    15

    Default Re: Need help trying to create Gnome Root Terminal menu shortcut.

    On Thu 04 Feb 2016 12:46:02 AM CST, Spork Schivago wrote:

    malcolmlewis;2752320 Wrote:
    > Hi
    > First off you need to use gnomesu -c <some-command> and you need to
    > mark it as trusted... so open Naultilus and browse down to
    > ~/.local/share/applications in here, you will see the desktop entry
    > looking like a file, double click on it and mark as trusted, then it
    > will show the dektop file with it's icon. Now double click on it and
    > you should be good to go.
    >
    > If it's still failing, the add DBusActivatable=true to the desktop
    > file.

    Thank you Malcolmlewis. This is my new root-terminal.desktop file:

    Code:
    --------------------

    #!/usr/bin/env xdg-open
    [Desktop Entry]
    X-SuSE-translate=true
    Type=Application
    Categories=GNOME;GTK;System;TerminalEmulator;
    Name=Gnome Root Terminal
    Icon=utilities-terminal
    GenericName=Gnome Root Terminal
    Exec=/usr/bin/gnomesu -c "/usr/bin/gnome-terminal"
    Encoding=UTF-8
    Comment=Provide a root shell.
    DBusActivatable=true

    --------------------


    Regardless of whether I use gnomesu -c or xdg-su -c, it still just asks
    for the password but never opens up the terminal program, even with the
    DBusActivatable=true key. Even if I hit ALT-F2 and type:

    Code:
    --------------------

    gnomesu -c /usr/bin/gnome-terminal

    --------------------


    The same happens. I get asked for the password but gnome-terminal
    never starts. Could it have something to do with my user spork running
    X-Windows but it's somehow trying to look for a X-Windows session that
    might of been started by root instead of spork?

    Any more suggestions? Thanks!


    Hi
    I have it working on Leap, however it's not actually switching to root
    user environment... need to play some more.

    --
    Cheers Malcolm °¿° LFCS, SUSE Knowledge Partner (Linux Counter #276890)
    SUSE Linux Enterprise Desktop 12 SP1|GNOME 3.10.4|3.12.51-60.25-default
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!


  7. #7
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    28,169
    Blog Entries
    15

    Default Re: Need help trying to create Gnome Root Terminal menu shortcut.

    On Thu 04 Feb 2016 12:46:02 AM CST, Spork Schivago wrote:

    malcolmlewis;2752320 Wrote:
    > Hi
    > First off you need to use gnomesu -c <some-command> and you need to
    > mark it as trusted... so open Naultilus and browse down to
    > ~/.local/share/applications in here, you will see the desktop entry
    > looking like a file, double click on it and mark as trusted, then it
    > will show the dektop file with it's icon. Now double click on it and
    > you should be good to go.
    >
    > If it's still failing, the add DBusActivatable=true to the desktop
    > file.

    Thank you Malcolmlewis. This is my new root-terminal.desktop file:

    Code:
    --------------------

    #!/usr/bin/env xdg-open
    [Desktop Entry]
    X-SuSE-translate=true
    Type=Application
    Categories=GNOME;GTK;System;TerminalEmulator;
    Name=Gnome Root Terminal
    Icon=utilities-terminal
    GenericName=Gnome Root Terminal
    Exec=/usr/bin/gnomesu -c "/usr/bin/gnome-terminal"
    Encoding=UTF-8
    Comment=Provide a root shell.
    DBusActivatable=true

    --------------------


    Regardless of whether I use gnomesu -c or xdg-su -c, it still just asks
    for the password but never opens up the terminal program, even with the
    DBusActivatable=true key. Even if I hit ALT-F2 and type:

    Code:
    --------------------

    gnomesu -c /usr/bin/gnome-terminal

    --------------------


    The same happens. I get asked for the password but gnome-terminal
    never starts. Could it have something to do with my user spork running
    X-Windows but it's somehow trying to look for a X-Windows session that
    might of been started by root instead of spork?

    Any more suggestions? Thanks!


    Hi
    I have it working on Leap, however it's not actually switching to root
    user environment... need to play some more.

    --
    Cheers Malcolm °¿° LFCS, SUSE Knowledge Partner (Linux Counter #276890)
    SUSE Linux Enterprise Desktop 12 SP1|GNOME 3.10.4|3.12.51-60.25-default
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!


  8. #8

    Default Re: Need help trying to create Gnome Root Terminal menu shortcut.

    How did you get it working? I could only get it to open a terminal window if I didn't try opening it as root. What was the trick? Thanks!

  9. #9

    Default Re: Need help trying to create Gnome Root Terminal menu shortcut.

    I added the Terminal=true option. When I double click the .desktop file, I see it displaying error messages. It goes real quick but I believe what I'm seeing says:
    Code:
    (gnomesu:21369): Gtk-WARNING **: gtk_window_set_titlebar() called on a realized window
    Gtk-Message: GtkDialog mapped without a transient parent.   This is discouraged.
    
    (then I type root's password and I believe this is what flashes by)
    
    Error constructing proxy for org.gnome.Terminal:/org/gnome/Terminal/Factory0: Error calling StartServiceByName for org.gnome.Terminal: GDBus.Error:org.freedesktop.DBus.Error.Spawn.ChildExited: Process org.gnome.Terminal exited with status 10

  10. #10

    Default Re: Need help trying to create Gnome Root Terminal menu shortcut.

    I've also tried, from a terminal window, running as root, the localectl command that people suggested on the net to fix this problem. When I rebooted, I thought i was making progress. I would open the terminal window as root, and then close it. I thought maybe all I had to do was remove either the Terminal=true from the .desktop file or the DBus. However, that didn't fix the problem and even with them back in, I now get the previous error message about the proxy stuff.

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •