1

I am running Xubuntu 18.04 in a desktop computer, installed last week. I am having problems to open files if the path has a blank space and I believe this is producing other problems too (for example this). Just to give an example, I have placed an Inkscape document in a directory ~Escritorio/New Folder. The file is called dibujo.svg. If I double click it I get two errors:

enter image description here

enter image description here

Google Translate has "Error when loading the requested file" as the translation of "error al carger el archivo pedido" from Spanish.

However if I open a terminal in that place and write inkscape dibujo.svg everything works fine.

If I make "right click --> open with" and select a program other than Inkscape (say a text editor or an image viewer) there is no strange behavior.

I have tried with two file managers, Thunar and PCManFM, and am experiencing similar problems with both.

6
  • It is likely an issue with the corresponding .desktop file, that passes the filename unquoted to the inkscape executable. Post the output of cat /usr/share/applications/inkscape.desktop to verify.
    – vanadium
    Oct 17, 2018 at 12:29
  • On closer inspection, that will likely not be the issue. The placeholder in .desktop files must (and should) not be quoted.
    – vanadium
    Oct 17, 2018 at 12:37
  • Is this a rehash of askubuntu.com/questions/1083321/…? And why are you persisting in naming folders with spaces in their names when you know that you're having problems?
    – DK Bose
    Oct 17, 2018 at 15:55
  • @DKBose I have open a new question because this seems to be an issue with Ubuntu/Xubuntu rather than Lyx or Inkscape. I do not insist in using directories with blank spaces in their names, they are already created. In fact I have multiple computers, all running Xubuntu, synchronized with the Dropbox app, and in this PC (only in this one) things just don't work as expected. Could it be related with the fact that in this PC the home directory is encrypted?
    – user171780
    Oct 18, 2018 at 11:37
  • @user171780 if this only occurs in this once instance, just rename the folder, as suggested in my answer. If it happens elsewhere too, then keep digging for a solution. Maybe it's a problem with the File Manager in Xubuntu.
    – heynnema
    Oct 18, 2018 at 13:22

2 Answers 2

0

This is a common problem.

Generally, if I create a folder, and I want a space, I replace the desired space location with an underscore, like "New_Folder". This is especially true with source code folders.

If your problem only occurs with this one instance, just rename the folder. If it happens elsewhere too, then keep digging for a solution. Maybe it's a problem with the File Manager in Xubuntu.

Generally, in scripts, if you've already got "New Folder" in your path, you must either quote or escape the space, like:

~Escritorio/"New Folder"/dibujo.svg

~Escritorio/New\ Folder/dibujo.svg
3
  • 1
    Okay, I installed Inkscape on my Xubuntu 18.04, created a folder called New Folder in my home folder, copied over an svg file from /usr/share/icons/Humanity/apps/24/accessories-dictionary.svg to New Folder, set Inkscape to always open svg files, double-clicked and it opened. Just to be clear, I'm not arguing that having spaces in files or folders is a good idea or that, in such cases, the spaces don't need to be escaped or quoted. I just feel there's something wrong with the poster's system. I don't know what.
    – DK Bose
    Oct 17, 2018 at 14:09
  • @DKBose you may be right.
    – heynnema
    Oct 17, 2018 at 14:13
  • Yes, in fact from terminal everything works ok. The problem is when double clicking.
    – user171780
    Oct 18, 2018 at 11:31
0

Almost accidentally I found the solution. I let it here for future reference.

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .