What could be the reason for GTK1 lazarus even after compiling for GTK2? lazarus / 1-Linux ---------------------------------------------------------------------- bobo · 2009-10-04 09:57 I have a fresh install of KUbuntu 9.10 beta which is the KDE version of Ubuntu (like the look much better than the gnome version). Have the latest FPC SVN compiled and installed. Have the latest Lazarus SVN compiled with LCL_PLATFORM=gtk2  parameter and installed. Still when starting up Lazarus, it shows the ugly GTK1 look, not what is on the screenshot for GTK2 Lazarus. What could be missing? (installed the libx11-dev and libgtk2.0-dev packages after some errors during compilation, until it all compiled OK) ---------------------------------------------------------------------- Vincent Snijders · 2009-10-04 11:19 Maybe you start a different (the system default) lazarus executable? ---------------------------------------------------------------------- bobo · 2009-10-04 20:18 But it is a clear install and compile from purely SVN sources.  It was a clean KUbuntu 9.10 beta install. There was no FPC or Lazarus package installed. In any case I checked with "sudo which startlazarus" and it starts the one in /usr/local/share/lazarus/startlazarus (through a symlink in /usr/local/bin/startlazarus) which is the correct place where "make install" puts lazarus after compilation. The only other lazarus on the system is the svn checkout directory where the original compilation takes place ("sudo make clean all") before "sudo make install" ========= OK, if I start  Lazarus with sudo startlazarus it is not gtk2 but when I start Lazarus with startlazarus it is gtk2 and looks nice. When I try to start it as root (after a "sudo su -") it does not even start , just gives an error message that it "cannot open display" ---------------------------------------------------------------------- bobo · 2009-10-05 00:55 and when I see the nice gtk2 look of Lazarus the File->Open crashes the editor right away: [WARNING] Out of OEM specific VK codes, changing to unassigned            [WARNING] Out of unassigned VK codes, assigning $FF                        TLazarusManager.Run starting /usr/local/share/lazarus/lazarus ...          [WARNING] Out of OEM specific VK codes, changing to unassigned [WARNING] Out of unassigned VK codes, assigning $FF TMainIDE.ParseCmdLineOptions:   PrimaryConfigPath="/home/myuserdir/.lazarus"   SecondaryConfigPath="/etc/lazarus" TMainIDE.DoNewProject A TMainIDE.DoNewEditorFile END unit1.pas TApplication.HandleException Invalid floating point operation   Stack trace:   $00E623C1   $00E83C8C   $00A68281   $00AF2DC2   $00AF4891   $009EA3C4   $00356719   $00358092   $0036D3EE   $0036E908   $0036EF06   $00B0683E   $009E40F0   $004161E4   $00416193   $00416193   $00439744 (lazarus:24288): Gtk-CRITICAL **: gtk_style_detach: assertion `style->attach_count > 0' failed TApplication.HandleException: there was another exception during showing the first exception   Stack trace:   $009DBAC9   $009DC234   $009E752F   $00356719   $00358092   $0036D3EE   $0036EA7D   $0036EF06   $00B0D3A1   $00A4DDCF   $00364E58   $00356719   $00358092   $0036D000   $0036EA7D   $0036EF06   $00956951 lazarus.pp - unhandled exception [FORMS.PP] ExceptionOccurred [FORMS.PP] ExceptionOccurred [TMainIDE.Destroy] A [FORMS.PP] ExceptionOccurred ---------------------------------------------------------------------- Blaazen · 2009-10-05 13:47 Hi, try to do Lazarus compilation in your /home/username, you will avoid all permissions troubles. I have Kubuntu 9.04/64bit and I made SVN update and recompilation of Lazarus without problems yesterday. I used "make clean all" without any sudo or widgetset specification. (I have Laz. installed twice, with Qt and Gtk2, both works well.) B. ---------------------------------------------------------------------- bobo · 2009-10-06 04:17 Yes, it seems the way to do it is to do the "make all" as user,  and do the "make install" with sudo (or as root) for both FPC and Lazarus. It did compile and install properly that way. Also, you need run Lazarus as a user (not with sudo or as root). However, with the KUbuntu 9.10 beta 1 it seems a File-> Open crashes Lazarus, so I just installed Ubuntu 9.10 Beta 1 and everything works ok there. I guess some more things need to be fixed on KUbuntu.