Same here. Removing gksudo and gksu totally sucks if there is no consistent replacement.
I tried every manual on the net. For ubuntu pkexec works, since they are in nautilus,
but in elementary juno we are SCR3WED...
Where in other distributions people are succesful, for elementary os juno NOT ANY forum idea to launch XAMPP via a desktop file will work.
The location of the desktop file: ~/.local/share/applications/file.desktop
I tried:
[Desktop Entry]
Encoding=UTF-8
Name=XAMPP Control Panel
Comment=Start and Stop XAMPP
Exec=pkexec /opt/lampp/manager-linux-x64.run
Icon=/opt/lampp/htdocs/favicon.ico
Categories=Application
Type=Application
Terminal=false
update the desktop files by:
sudo apt-get update -y
No results, so I started going trough ubuntu forums, trying alternatives.
Taking very much time.
In total, my attempts for the Exec= line:
gksu /opt/lampp/manager-linux-x64.run
sudo -c bash '/opt/lampp/manager-linux-x64.run'
pkexec /opt/lampp/manager-linux-x64.run
None of these work in juno! I spend 2 hours debugging my .desktop file, in the end I found a good soul that posted this command at a forum:
grep '^Exec' file.desktop | tail -1 | sed 's/^Exec=//' | sed 's/%.//' | sed 's/^"//g' | sed 's/" *$//g'
Running this you can run file.desktop via terminal so at least you can see what happens. It gives all errors your script will go trough in the terminal, so at least you are a step further. But what really happens: Nothing!... To find you script is ok, but elementary support is crap.
Ubuntu cuts out gksu, Debian daughter distribution developers are depending on it, there is no solution for practical consequenses and the user is SCR3WED.
Is that what linux is all about.
The poster of this question asked his question 4 months ago, and there is no solution yet for an common used application like XAMPP.
Comon guys.
This way people are forced to attempt to force-install gksudo packages from an older kernel in this new architecture o.s. Which is asking for other problems, but users need a solution so who can blame them.
UPDATE:
Because I am crazy I tried it. Install gksudo.
1
wget http://archive.ubuntu.com/ubuntu/pool/main/libg/libgtop2/libgtop-2.0-10_2.32.0-1_amd64.deb
sudo dpkg -i libgtop-2.0-10_2.32.0-1_amd64.deb
2
wget http://archive.ubuntu.com/ubuntu/pool/universe/libg/libgksu/libgksu2-0_2.0.13~pre1-6ubuntu8_amd64.deb
sudo dpkg -i libgksu2-0_2.0.13~pre1-6ubuntu8_amd64.deb
sudo apt -f install -y
(needs: sudo apt -f install -y to fix dependencies)
3
wget http://archive.ubuntu.com/ubuntu/pool/universe/g/gksu/gksu_2.0.2-9ubuntu1_amd64.deb
sudo dpkg -i gksu_2.0.2-9ubuntu1_amd64.deb
Tried to config my file.desktop Exec= line again to gksudo and gksu.
It simply doesn't work. A terminal icon comes up in the pantheon taskbar (panel)
and hangs for 10 seconds and disappears again. Same result.
But when I tried the debug command again:
( in ~/.local/share/applications/file.desktop )
grep '^Exec' file.desktop | tail -1 | sed 's/^Exec=//' | sed 's/%.//' | sed 's/^"//g' | sed 's/" *$//g'
It DID open the gksudo command prompt!
Why, I don't now. This is the most frustrating one of all.
It is a great thing John Mcenroe isn't a elementary OS juno user.
pkexec
work instead ofgksu
? It should already be installed.