Jump to content

Getting Fish to run as root from a shortcut


Recommended Posts

I have never been a keen command line enthusiast, although I do use it now and then, and I thought I might try 'Fish' to see if it was any better than 'Bash'. I installed it on Linux Mint first and I did find it to be slightly better so I then tried it on Mandriva but came unstuck.

 

It is my normal practice to have shortcuts to programs I use often in a sidebar, particularly root instances of shells and file managers. The shortcuts contain commands such as 'gksu terminal' for example. Trouble is that as soon as I installed 'Fish' this functionality died. Every time I click the shortcut I get the warning 'failed to communicate with gksu-run-helper'. The strange thing is that if I open a user mode terminal and type the same command it loads the root instance normally. The user mode instance runs correctly as well it is only the root mode that wont work as I want it to.

 

If I return the shell to bash, the shortcut works again. It also works normally in Mint.

 

This behaviour is beyond me perhaps someone here can understand it.

Link to comment
Share on other sites

what are the contents of the shortcut file? (open it with a text editor)

 

Before I could answer that I would have to know where the shortcut file lived - and I don't (the shortcut is a launcher that lives in an xfce4-panel, but thinking about it that probably doesn't make much difference because if I use Alt/F2 followed by 'gksu terminal' that fails as well - unless I am using a bash shell)

 

have you tried recreating the short cuts while fish is selected (instead of bash)?

 

I hadn't before, but I have now and it makes no difference.

 

Thanks for trying anyway tyme.

Link to comment
Share on other sites

if I use Alt/F2 followed by 'gksu terminal' that fails as well - unless I am using a bash shell
Then the shortcuts definitely don't have anything to do with it. I don't really know a lot about fish - perhaps it has something analogous to BASH's environment variables, and you need to set those up properly.

 

Try giving the full path to the gksu binary - I'm not sure what it would be on Mandriva (whereis gksu should tell you), but assuming /usr/bin/gksu do something like:

/usr/bin/gksu terminal

and see if that works.

Edited by tyme
Link to comment
Share on other sites

Thank you once again for replying tyme. Your suggestion was interesting and gave me the following results. Unfortunately I can't actually decode what they mean, perhaps you can.

 

/usr/bin/gksu terminal
GConf Error: Failed to contact configuration server; some possible causes are th
at you need to enable TCP/IP networking for ORBit, or you have stale NFS locks d
ue to a system crash. See http://www.gnome.org/projects/gconf/ for information. 
(Details -  1: Failed to get connection to session: Did not receive a reply. Pos
sible causes include: the remote application did not send a reply, the message b
us security policy blocked the reply, the reply timeout expired, or the network 
connection was broken.)

Link to comment
Share on other sites

  • 1 month later...
Better use gksudo, not gksu.

The situation is explained here: http://linuxgator.org/forums/viewtopic.php?f=31&t=1563

 

That is an interesting post indeed, although I would have to read it more than once to take it all in. The only problem with it is that it isn't true. I am using a buntu base distro to post this (Linux Mint) and if I run:

 

gksu thunar

 

or

 

gksudo thunar

 

the result is exactly the same in both cases - I get a root instance of thunar. I do not get any warnings at all. (except the one that says 'be careful you are running this as root')

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...