Ticket #4130 - Style sheet in Ubuntu (and others) not loaded on startup

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
User avatar
sgrogan
Posts: 5424
Joined: Wed Oct 22, 2014 5:02 pm

Re: Style sheet in Ubuntu not loaded on startup.

Postby sgrogan » Wed Jun 12, 2019 8:52 pm

openBrain wrote:
Tue Jun 11, 2019 7:36 am
@sgrogan, maybe you can be of some help here.
May I guess right that this is due to way that AppImage works ?
I think so. I don't have a working linux right now, but it looks like it may be possible to hack into the config file and set the path to somewhere permanent? ie copy the style sheet to the .FreeCAD folder somewhere and manually set the path to it in the .cfg file? I'll try to find time time to test this on my win system. I think <FCBool Name="UseStyleSheet" Value="0"/> is because dark-blue is first on the list, index 0?
Blunt0
Posts: 13
Joined: Mon Jun 10, 2019 6:59 pm

Re: Style sheet in Ubuntu not loaded on startup.

Postby Blunt0 » Fri Jun 14, 2019 10:49 am

I copied the /stylesheet folder from the /tmp folder, put that in my freecad documents folder, and pointed to it in the user.cfg file, like suggested. after initial testing it seems to work well.

"" <FCBool Name="UseStyleSheet" Value="0"/> ""

Seems to be for something else, as changing the stylesheet does not change the value for me.

Thanks allot for the help.
TheMarkster
Posts: 1060
Joined: Thu Apr 05, 2018 1:53 am

Re: Style sheet in Ubuntu not loaded on startup.

Postby TheMarkster » Fri Jun 14, 2019 11:45 pm

You don't need to use the app image if you're on ubuntu. You can add the ppa instead. There's one for the latest stable and another for the daily build.

https://www.freecadweb.org/wiki/Install_on_Unix
Blunt0
Posts: 13
Joined: Mon Jun 10, 2019 6:59 pm

Re: Style sheet in Ubuntu not loaded on startup.

Postby Blunt0 » Fri Jun 14, 2019 11:56 pm

Thanks for the suggestion, it seemed a bit involved for me, being new to Linux and FreeCAD a month ago, however now I have a bit more experience, it seems doable, thanks for the reminder, am going to give it a shot, seems like a cleaner way to install than using appimages anyway.
Blunt0
Posts: 13
Joined: Mon Jun 10, 2019 6:59 pm

Re: Style sheet in Ubuntu not loaded on startup.

Postby Blunt0 » Sat Jun 15, 2019 1:35 am

Hmm the method outlined in the wiki seems outdated, for ubuntu 18.04.2, there is no "ubuntu software center", only ubuntu software and there seems to be now way to add repositories via gui.

Also the Terminal method does not work, I get dependency issues:
""
The following packages have unmet dependencies:
freecad : Depends: freecad-python3 but it is not going to be installed or
freecad-python2 but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
""

I can find Freecad in 0.18 in the software manager, however, with that I would need to use the terminal to launch FreeCAD, and I am trying to keep terminal as much out of my life as possible, So I will remain using the Appimage, as I see that as the best solution so far.
OficineRobotica
Posts: 60
Joined: Thu Feb 21, 2019 8:17 am

Re: Style sheet in Ubuntu not loaded on startup.

Postby OficineRobotica » Wed Jul 03, 2019 4:06 pm

I have the same problem but i'm forced to use the app image because i'm on kde neon and the daily ppa gives dependency problems. I tried to modify the user.cfg to point to a "home folder" stylesheet insted of the one in tmp but it gets user.cfg re rewiten everytime i start freecad. Do i miss something? Also there are other preferences that are not saved like background color of the 3d view etc. It gets really fiddly re setting up everything everytime freecad restarts .
openBrain
Posts: 2170
Joined: Fri Nov 09, 2018 5:38 pm

Re: Style sheet in Ubuntu not loaded on startup.

Postby openBrain » Wed Jul 03, 2019 4:33 pm

Could you be a bit more specific on the dependency issues with daily PPA ? Do you also get them with the stable PPA ?
OficineRobotica
Posts: 60
Joined: Thu Feb 21, 2019 8:17 am

Re: Style sheet in Ubuntu not loaded on startup.

Postby OficineRobotica » Wed Jul 03, 2019 7:52 pm

Oh , sorry, i forgot to include my app image info also.
I think that this is a known issue on KDE NEON. Anyway , i get this when triyng to install freecad stable from the ppa. The same story with the daily one.

Code: Select all

sudo apt install freecad
Lettura elenco dei pacchetti... Fatto
Generazione albero delle dipendenze       
Lettura informazioni sullo stato... Fatto
Starting pkgProblemResolver with broken count: 8
Starting 2 pkgProblemResolver with broken count: 8
Investigating (0) python3-pyside2.qtgui:amd64 < none -> 5.11.2-0ppa2~ubuntu18.04 @un uN Ib >
Broken python3-pyside2.qtgui:amd64 Dipende on libpyside2-py3-5.11:amd64 < none | 5.11.2-0ppa2~ubuntu18.04 @un uH >
  Considering libpyside2-py3-5.11:amd64 8 as a solution to python3-pyside2.qtgui:amd64 1
  Holding Back python3-pyside2.qtgui:amd64 rather than change libpyside2-py3-5.11:amd64
Investigating (0) python3-pyside2.qtwidgets:amd64 < none -> 5.11.2-0ppa2~ubuntu18.04 @un uN Ib >
Broken python3-pyside2.qtwidgets:amd64 Dipende on libpyside2-py3-5.11:amd64 < none | 5.11.2-0ppa2~ubuntu18.04 @un uH >
  Considering libpyside2-py3-5.11:amd64 8 as a solution to python3-pyside2.qtwidgets:amd64 1
  Holding Back python3-pyside2.qtwidgets:amd64 rather than change libpyside2-py3-5.11:amd64
Investigating (0) python3-pyside2.qtcore:amd64 < none -> 5.11.2-0ppa2~ubuntu18.04 @un uN Ib >
Broken python3-pyside2.qtcore:amd64 Dipende on libpyside2-py3-5.11:amd64 < none | 5.11.2-0ppa2~ubuntu18.04 @un uH >
  Considering libpyside2-py3-5.11:amd64 8 as a solution to python3-pyside2.qtcore:amd64 1
  Holding Back python3-pyside2.qtcore:amd64 rather than change libpyside2-py3-5.11:amd64
Investigating (0) libfreecad-python3-0.18:amd64 < none -> 2:0.18.1+dfsg1~201904300243~ubuntu18.04.1 @un uN Ib >
Broken libfreecad-python3-0.18:amd64 Dipende on libpyside2-py3-5.11:amd64 < none | 5.11.2-0ppa2~ubuntu18.04 @un uH >
  Considering libpyside2-py3-5.11:amd64 8 as a solution to libfreecad-python3-0.18:amd64 1
  Holding Back libfreecad-python3-0.18:amd64 rather than change libpyside2-py3-5.11:amd64
Investigating (0) python3-pyside2.qtsvg:amd64 < none -> 5.11.2-0ppa2~ubuntu18.04 @un uN Ib >
Broken python3-pyside2.qtsvg:amd64 Dipende on libpyside2-py3-5.11:amd64 < none | 5.11.2-0ppa2~ubuntu18.04 @un uH >
  Considering libpyside2-py3-5.11:amd64 8 as a solution to python3-pyside2.qtsvg:amd64 0
  Holding Back python3-pyside2.qtsvg:amd64 rather than change libpyside2-py3-5.11:amd64
Investigating (0) freecad-python3:amd64 < none -> 2:0.18.1+dfsg1~201904300243~ubuntu18.04.1 @un uN Ib >
Broken freecad-python3:amd64 Dipende on python3-pyside2.qtcore:amd64 < none | 5.11.2-0ppa2~ubuntu18.04 @un uH >
  Considering python3-pyside2.qtcore:amd64 1 as a solution to freecad-python3:amd64 0
  Holding Back freecad-python3:amd64 rather than change python3-pyside2.qtcore:amd64
Investigating (0) python3-pyside2.qtopengl:amd64 < none -> 5.11.2-0ppa2~ubuntu18.04 @un uN Ib >
Broken python3-pyside2.qtopengl:amd64 Dipende on libpyside2-py3-5.11:amd64 < none | 5.11.2-0ppa2~ubuntu18.04 @un uH >
  Considering libpyside2-py3-5.11:amd64 8 as a solution to python3-pyside2.qtopengl:amd64 0
  Holding Back python3-pyside2.qtopengl:amd64 rather than change libpyside2-py3-5.11:amd64
Investigating (0) python3-pyside2.qtuitools:amd64 < none -> 5.11.2-0ppa2~ubuntu18.04 @un uN Ib >
Broken python3-pyside2.qtuitools:amd64 Dipende on libpyside2-py3-5.11:amd64 < none | 5.11.2-0ppa2~ubuntu18.04 @un uH >
  Considering libpyside2-py3-5.11:amd64 8 as a solution to python3-pyside2.qtuitools:amd64 0
  Holding Back python3-pyside2.qtuitools:amd64 rather than change libpyside2-py3-5.11:amd64
Investigating (0) python3-pyside2.qtxml:amd64 < none -> 5.11.2-0ppa2~ubuntu18.04 @un uN Ib >
Broken python3-pyside2.qtxml:amd64 Dipende on libpyside2-py3-5.11:amd64 < none | 5.11.2-0ppa2~ubuntu18.04 @un uH >
  Considering libpyside2-py3-5.11:amd64 8 as a solution to python3-pyside2.qtxml:amd64 0
  Holding Back python3-pyside2.qtxml:amd64 rather than change libpyside2-py3-5.11:amd64
Investigating (0) python3-pivy:amd64 < none -> 0.6.4-0ppa2~ubuntu18.04 @un uN Ib >
Broken python3-pivy:amd64 Dipende on python3-pyside2.qtcore:amd64 < none | 5.11.2-0ppa2~ubuntu18.04 @un uH >
  Considering python3-pyside2.qtcore:amd64 1 as a solution to python3-pivy:amd64 0
  Holding Back python3-pivy:amd64 rather than change python3-pyside2.qtcore:amd64
Investigating (1) freecad:amd64 < none -> 2:0.18.1+dfsg1~201904300243~ubuntu18.04.1 @un puN Ib >
Broken freecad:amd64 Dipende on freecad-python3:amd64 < none | 2:0.18.1+dfsg1~201904300243~ubuntu18.04.1 @un uH >
  Considering freecad-python3:amd64 0 as a solution to freecad:amd64 9999
    Reinst Failed early because of qtdeclarative-abi-5-9-5:amd64
    Reinst Failed because of libpyside2-py3-5.11:amd64
    Reinst Failed because of python3-pyside2.qtcore:amd64
    Reinst Failed because of python3-pivy:amd64
Broken freecad:amd64 Dipende on freecad-python2:amd64 < none | 2:0.18.1+dfsg1~201904300243~ubuntu18.04.1 @un uH >
  Considering freecad-python2:amd64 1 as a solution to freecad:amd64 9999
  Re-Instated python-backports.functools-lru-cache:amd64
  Re-Instated python-dateutil:amd64
  Re-Instated python-pyparsing:amd64
  Re-Instated python-tz:amd64
  Re-Instated python-cycler:amd64
  Re-Instated python-subprocess32:amd64
  Re-Instated python-matplotlib:amd64
  Re-Instated libshiboken2-5.11:amd64
    Reinst Failed early because of qtdeclarative-abi-5-9-5:amd64
    Reinst Failed because of libpyside2-5.11:amd64
    Reinst Failed because of python-pyside2.qtcore:amd64
    Reinst Failed because of python-pivy:amd64
Done
Alcuni pacchetti non possono essere installati. Questo può voler dire
che è stata richiesta una situazione impossibile oppure, se si sta
usando una distribuzione in sviluppo, che alcuni pacchetti richiesti
non sono ancora stati creati o sono stati rimossi da Incoming.
Le seguenti informazioni possono aiutare a risolvere la situazione:

I seguenti pacchetti hanno dipendenze non soddisfatte:
 freecad : Dipende: freecad-python3 ma non sta per essere installato oppure
                    freecad-python2 ma non sta per essere installato
E: Impossibile correggere i problemi, ci sono pacchetti danneggiati bloccati.


The problem seems to be python-pyside.
I'm happy the app image too, if only i can get it to remember preferences

My app image info

Code: Select all

OS: KDE neon User Edition 5.16 (KDE//usr/share/xsessions/plasma)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.17175 (Git) AppImage
Build type: Release
Branch: master
Hash: 507c40669d48ae4732268324cd0140c80cf68222
Python version: 3.7.3
Qt version: 5.9.7
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: Italian/Italy (it_IT)
OficineRobotica
Posts: 60
Joined: Thu Feb 21, 2019 8:17 am

Re: Style sheet in Ubuntu not loaded on startup.

Postby OficineRobotica » Wed Jul 03, 2019 7:59 pm

https://forum.freecadweb.org/viewtopic.php?t=30605

Here there is some discussion about the ppa problem
OficineRobotica
Posts: 60
Joined: Thu Feb 21, 2019 8:17 am

Re: Style sheet in Ubuntu not loaded on startup.

Postby OficineRobotica » Thu Aug 08, 2019 6:25 am

By using the 0.19 appimage on kde neon i noticed that the stylesheet problem still persist. One workaround that i found was :
1- navigate to Tools -> Edit parameters ... -> BaseApp -> Preferences -> MainWindow
2- copy the stylesheet indicated in the "StyleSheet" variable path to your home .FreeCad folder
3- modify the "StyleSheet" path to point to your home folder stylesheet
4- save to disk and restart freecad

I'm posting here for future reference and at least for me this works. For some reason it seems that the app image doesn't have the authorization at start to access that .tmp folder and load the stylesheet. I guess that this could be fixed only by the person who packages the appimage fixing the permissions needed but tbh it's just a guess from my side.

I hope this helped someone.