Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ TheIDE » U++ TheIDE: Installation, Compiling and Running of theide » Gnome won't start TheIDE with double click
Gnome won't start TheIDE with double click [message #49862] Mon, 21 May 2018 21:21 Go to next message
Zbych is currently offline  Zbych
Messages: 325
Registered: July 2009
Senior Member
Hi,

Gnome in ubuntu 18.04 won't start theide binary with the double click. It just shows the message:

index.php?t=getfile&id=5579&private=0

Can you copy theide.desktop file to the same location as theide binary in installation script to get rid of this message?

theide.desktop file:
[Desktop Entry]
Name=TheIDE
Exec=sh -c "$(dirname %k)/theide"
Type=Application
Terminal=false
Name[en_US]=theide

[Updated on: Mon, 21 May 2018 21:22]

Report message to a moderator

Re: Gnome won't start TheIDE with double click [message #51205 is a reply to message #49862] Wed, 20 February 2019 20:57 Go to previous messageGo to next message
Klugier is currently offline  Klugier
Messages: 1075
Registered: September 2012
Location: Poland, Kraków
Senior Contributor
Hello,

I think it is some kind of critical before release. We need to fix the installation on Ubuntu* like distrubtion such as Mint (I am currently using this distribution). What I have noticed is without appropriate .desktop file the application will not run. We need .desktop file preferable after "make install" we should copy this file to "~/.loca/share/applications" folder. The file that I used is from TheIDE installation:
#!/usr/bin/env xdg-open
[Desktop Entry]
Encoding=UTF-8
Name=TheIDE
GenericName=TheIDE
Comment=IDE for cross-platform C++ development
MimeType=application/x-upp;
Exec=/home/klugier/upp/theide
Icon=/home/klugier/upp/TheIDE.png
Terminal=false
Type=Application
Categories=Development;IDE;
StartupNotify=false


What is wrong here is that we can not use directly "~" for home directory. We need to specify full path "/home/klugier". Moreover, we need to specify the path to icon to have one in search bar Wink

I belive we need to do this before release.

Sincerely,
Klugier


U++ - one framework to rule them all.
Re: Gnome won't start TheIDE with double click [message #51206 is a reply to message #51205] Wed, 20 February 2019 21:33 Go to previous messageGo to next message
Zbych is currently offline  Zbych
Messages: 325
Registered: July 2009
Senior Member
Klugier wrote on Wed, 20 February 2019 20:57

What is wrong here is that we can not use directly "~" for home directory. We need to specify full path "/home/klugier".


Why not use the trick with "sh -c" from my example? It shouldn't complain about '~', but it won't solve the problem with path to icon.
Or second solution is to generate the *.desktop content on the fly in makefile script.

[Updated on: Wed, 20 February 2019 21:39]

Report message to a moderator

Re: Gnome won't start TheIDE with double click [message #51208 is a reply to message #51206] Wed, 20 February 2019 21:37 Go to previous messageGo to next message
Klugier is currently offline  Klugier
Messages: 1075
Registered: September 2012
Location: Poland, Kraków
Senior Contributor
Hello,

I tested your solution, but it only works when you put .desktop file into the directory when TheIDE is stored. When you use it with "~/.local/share/applications" it doesn't work. We need more generic solution or we can generate the correct .desktop file on the file while executing "make install".

Sincerely,
Klugier


U++ - one framework to rule them all.
Re: Gnome won't start TheIDE with double click [message #51209 is a reply to message #51208] Thu, 21 February 2019 04:55 Go to previous messageGo to next message
pvictor is currently offline  pvictor
Messages: 67
Registered: December 2015
Member
https://www.ultimatepp.org/forums/index.php?t=getfile&id=5579&private=0

GCC now by default compiles programs to shared object instead of executable, preventing GUI file managers from executing programs.

To disable it, use
make 'LINKOPTIONS=-no-pie'
when compiling TheIde

Also, add
COMMON_LINK = "-no-pie";
to GCC.bm
Re: Gnome won't start TheIDE with double click [message #51212 is a reply to message #51209] Thu, 21 February 2019 19:31 Go to previous messageGo to next message
amrein is currently offline  amrein
Messages: 278
Registered: August 2008
Location: France
Experienced Member
Hi

We have 3 options:

1. "make install" create theide.desktop and copy theide.png in ~/upp using full path (/home/user/upp/theide.desktop)

2. "make install" create theide.desktop and copy theide.png in ~/upp using full path (/home/user/upp/theide.desktop) and also use "xdg-desktop-menu install --mode user --novendor theide.desktop" to create a standard menu entry in "~/.local/share/applications" (xdg-desktop-menu is mandatory here). We will also need to provide an uninstall script to remove the xdg-desktop entry or at least, tell users to use "xdg-desktop-menu uninstall --mode user --novendor theide.desktop" if they want to clean their menu.

3. add "LINKOPTIONS=-no-pie" when using gcc as compiler in "domake" script to compiles programs as executable instead of position-independent executable.

The -pie option is mainly useful for security reasons. Microsoft does the same position-independent executable thing.
Re: Gnome won't start TheIDE with double click [message #51213 is a reply to message #49862] Thu, 21 February 2019 20:00 Go to previous messageGo to next message
amrein is currently offline  amrein
Messages: 278
Registered: August 2008
Location: France
Experienced Member
Option 4:

4. "make install" install binaries, desktop and license in /usr/local by default and the theide will use svn to checkout U++ sources and create ~/.upp at first start.

Buggy right now as theide doesn't use pkg-config to create working GCC.bm for other Linux distributions (or BSD like distributions) but only for Debian and its forks.
Re: Gnome won't start TheIDE with double click [message #51214 is a reply to message #51213] Thu, 21 February 2019 21:39 Go to previous messageGo to next message
Klugier is currently offline  Klugier
Messages: 1075
Registered: September 2012
Location: Poland, Kraków
Senior Contributor
Hello amrein,

It is realy nice to heare you!

Quote:

2. "make install" create theide.desktop and copy theide.png in ~/upp using full path (/home/user/upp/theide.desktop) and also use "xdg-desktop-menu install --mode user --novendor theide.desktop" to create a standard menu entry in "~/.local/share/applications" (xdg-desktop-menu is mandatory here). We will also need to provide an uninstall script to remove the xdg-desktop entry or at least, tell users to use "xdg-desktop-menu uninstall --mode user --novendor theide.desktop" if they want to clean their menu.

3. add "LINKOPTIONS=-no-pie" when using gcc as compiler in "domake" script to compiles programs as executable instead of position-independent executable.


I think the best options for us is to implement both options. The point number two is obvious installation improvement - the application is visible in user application stack and it is easy accessible to him. I agree we should deliver "make uninstall". If uninstall operation will be time consuming we should initialy implement only the first step. Anyway, how wants to remove upp after installation Wink

The third option for me seems like a think that we can implement alongside the second option. If it doesn't break anything and fix some problems (not all). This scenario is not presented on my current distribution (Linux Mint 19.1 since two days Wink ) and on my past (KDE based).

Sincerely,
Klugier


U++ - one framework to rule them all.
Re: Gnome won't start TheIDE with double click [message #51220 is a reply to message #51214] Fri, 22 February 2019 18:04 Go to previous messageGo to next message
amrein is currently offline  amrein
Messages: 278
Registered: August 2008
Location: France
Experienced Member
[DONE] - Option 2.
[W.I.P] - Option 3.

I'm not sure that option 3 is a good idea. With option 2 you can run theide from the menu, start theide using theide.desktop in ~/upp or start theide in command line. You keep the distribution security compilation strategy intact.
If we still want to apply this solution, please apply the attached patch like this:

cd trunk
patch -p0 < ../add_LINKOPTIONS.patch

[Updated on: Fri, 22 February 2019 18:17]

Report message to a moderator

Re: Gnome won't start TheIDE with double click [message #51240 is a reply to message #51220] Sun, 24 February 2019 21:20 Go to previous messageGo to next message
Klugier is currently offline  Klugier
Messages: 1075
Registered: September 2012
Location: Poland, Kraków
Senior Contributor
Hello Amrein,

FYI, If you are not sure, I decided to not apply this change. If anyone has different opinion on that topic - please let me know.

Sincerely,
Klugier


U++ - one framework to rule them all.

[Updated on: Sun, 24 February 2019 21:20]

Report message to a moderator

Re: Gnome won't start TheIDE with double click [message #51244 is a reply to message #51240] Mon, 25 February 2019 09:21 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Should we add -no-pie to theide builders or something?
Re: Gnome won't start TheIDE with double click [message #51248 is a reply to message #51244] Mon, 25 February 2019 11:13 Go to previous messageGo to next message
amrein is currently offline  amrein
Messages: 278
Registered: August 2008
Location: France
Experienced Member
I agree with Klugier. I think it's better not to apply the "LINKOPTIONS=-no-pie" patch.
Re: Gnome won't start TheIDE with double click [message #51369 is a reply to message #51248] Sat, 16 March 2019 13:06 Go to previous messageGo to next message
Klugier is currently offline  Klugier
Messages: 1075
Registered: September 2012
Location: Poland, Kraków
Senior Contributor
Hello,

To sum everything works as expected - the installation process is required to launch TheIDE on some distribution. So if you encounter that problem it means that you need to execute following command:
make install

Then TheIDE is installed for the local user and it is listed in your system application menu. So, you can freely launched it from "Start" menu. No need to launch it from file manager.

___________________
amrein - sorry for the chaos I made in this topic. I just didn't know what exactly "make install" command do. Literally speaking - we do not need to do anything in installation area. Thanks for the help!

Sincerely,
Klugier


U++ - one framework to rule them all.

[Updated on: Sat, 16 March 2019 13:06]

Report message to a moderator

Re: Gnome won't start TheIDE with double click [message #51377 is a reply to message #51369] Sun, 17 March 2019 08:58 Go to previous messageGo to next message
amrein is currently offline  amrein
Messages: 278
Registered: August 2008
Location: France
Experienced Member
It's cool. 2019.1 should be a great release.
Re: Gnome won't start TheIDE with double click [message #53803 is a reply to message #51377] Sat, 02 May 2020 20:53 Go to previous messageGo to next message
omari is currently offline  omari
Messages: 264
Registered: March 2010
Experienced Member
theide.desktop creation fail when ~/.local/share/applications is absent.

~/.local/share/applications should created first if it not exists.


regards
omari.
Re: Gnome won't start TheIDE with double click [message #53805 is a reply to message #53803] Sun, 03 May 2020 09:47 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
omari wrote on Sat, 02 May 2020 20:53
theide.desktop creation fail when ~/.local/share/applications is absent.

~/.local/share/applications should created first if it not exists.


Good catch, thanks. Now it does (trunk).

Mirek
Previous Topic: Nightly doesn't compile with make on linux
Next Topic: U++ TheIDE don't work on my Mac os x 10.13.6
Goto Forum:
  


Current Time: Thu Mar 28 21:24:04 CET 2024

Total time taken to generate the page: 0.01081 seconds