Author Topic: Debian netinstall + Fluxbox possible permissions issue  (Read 259 times)

0 Members and 1 Guest are viewing this topic.

Offline UncleMaterial

  • Jr. Member
  • **
  • Posts: 2
  • Karma: 0
  • I've just joined!
    • View Profile
    • Awards
Debian netinstall + Fluxbox possible permissions issue
« on: October 26, 2020, 10:51:06 pm »
Sorry that I could not make this more brief.

I'm thinking that these issues are related, and I'm hoping it's just my naivety that's making the issue drag on a bit and not a corrupted install. Mostly my system is working very well and I much prefer the speed and simplicity.

I recently made the break from using live CDs of full desktop environments, to using the Debian netinstall iso and adding Fluxbox to this. I'm using PCManFM for a file manager and as far as possible the simplest option for programs, to minimise slowing things down. A few problems seem to have arisen from this which I'd like to resolve and learn from. I have had a few stabs at this with partial success.

(1) For example, when I used LightDm for a display manager there was no problem in running this in the terminal:

sudo leafpad /etc/default/grub

But with both xdm and Slim as display manager, the terminal responds:

No protocol specified
leafpad: Cannot open display

The same happens if I use root to attempt the same task (which is just an example here, I don't need to change grub right now).

I can use nano in place of leafpad without issue.

It may have been a bad or dicey habit, but I used to use 'gksu nautilus' to do things like changing a line in a gtk theme in /sur/share/themes/ when I used a full DE. I see that gksu is discontinued. I can't open PCManFM with sudo (though I used to with LXDE without any issue visible to me).

(2) This doesn't happen with LightDM, but with xdm if I try to run Audacity the terminal says this:

'ScreenToClient cannot work when toplevel window is shown.'

A smaller box comes up with the gtk theme headed 'an assertion failed', and then states what the terminal also does:

'../src/gtk/dcclient.cpp(2038): assert "m_window" failed in DoGetSize(): GetSize() doesn't work without window'

There were three installs of Debian 10 on three machines and one of them used a second download of the same iso, so I'm thinking the install is okay and that something just needs to be corrected.

Has this gone how it was bound to go due to my current probably naivety since adopting the netinstall method or have I seemed to make a mistake somewhere?

Why will Leafpad not run in the example given where nano will?

Most applications work, like Fadein (screenwriting software) or Gimp. Why are some applications working but not others? Why is PCManFM working less well than it does within LXDE in terms of not automounting the SD card?

(3) So, are these issues related? And if I'd added Xfce (as opposed to using the Xfce iso) instead of Fluxbox, for example, would these issues not have occurred? (I would really rather not change DE, as netinstall + Fluxbox seems noticeably smoother than using even the LXDE iso.)

Would appreciate assistance in solving this once and for all after a few weeks of partial success and working round/ ignoring things.

Thanks.

Offline Mad Penguin

  • Administrator
  • Hero Member
  • *****
  • Posts: 1475
  • Karma: 10024
  • Gender: Male
    • View Profile
    • Awards
Re: Debian netinstall + Fluxbox possible permissions issue
« Reply #1 on: October 27, 2020, 05:39:17 pm »
Hi, this sounds like an environmental issue, have you tried running leafpad via the desktop launcher rather than via the terminal? I'm guessing this might work for you ...

If you open a terminal session and type;
Code: [Select]
echo $DISPLAY
What you should see is a colon followed by a zero;
Code: [Select]
:0
This environment variable is read by graphical applications in order to work out which display to use. This will be set automatically by your desktop UI for applications launched from the UI, but is set by the environment when you launch from the command line. So typically "cannot open display" either means that you are trying to launch a graphical application from a terminal session without the X display system running (maybe if you booted Linux in recovery mode for example) or, if the DISPLAY environment variable isn't set, or is set incorrectly.

Valid options for DISPLAY that should work (assuming X is running);
Code: [Select]
:0
localhost:0
localhost:0.0
Caveat; UNLESS you've changed the X server configuration in some way, in which case DISPLAY will need to match whatever you've put in the config .. :)
(nano works because it's not a graphical application and does not use the X server / DISPLAY variable)

The Linux Community Forum

Re: Debian netinstall + Fluxbox possible permissions issue
« Reply #1 on: October 27, 2020, 05:39:17 pm »

Offline UncleMaterial

  • Jr. Member
  • **
  • Posts: 2
  • Karma: 0
  • I've just joined!
    • View Profile
    • Awards
Re: Debian netinstall + Fluxbox possible permissions issue
« Reply #2 on: October 28, 2020, 07:13:50 am »
Yes, it does show :0, although when I tried this last night it said 0:0.

The sudo leafpad thing does work now also, though with the familiar reversion to the Raleigh gtk theme for both. (The only thing different on the system is I installed the Gnome polkit application, but have not actively set it up at all if it needs it, which I imagine it does.)

But replacing sudo with pkexec I still get the display gripe. Apparently using sudo for this isn't good practice and pkexec is since gksu's deprecation, so I'm wondering if I can put this right without too much stress... I do seem to remember following many instructions over the years where sudo leafpad/mousepad/gedit were used though.

I do at times wonder if I'm almost being 'gaslighted' by a bug, thinking I'm doing something wrong, that it's my mind, when there's a glitch in the distro. While doing scattergun googling last night I found references to the sort of thing I'm seeing in relation to the Raspberry Pi for example - people who know what they're doing well enough to be putting work on Github but who are still seeing puzzling things. Not unheard of for Debian to carry a bug somewhere.

Maybe I'm required to be very familiar with polkit and writing configs for it? I think that is likely to be beyond me. If I abandon Audacity and Gmusicbrowser (which can't see a mounted sd card) then I have a system working very well, but if only a bit more knowledge will iron things out I'm keen to carry on.

If you have any more ideas they're welcome. Thanks.

Offline Mad Penguin

  • Administrator
  • Hero Member
  • *****
  • Posts: 1475
  • Karma: 10024
  • Gender: Male
    • View Profile
    • Awards
Re: Debian netinstall + Fluxbox possible permissions issue
« Reply #3 on: October 28, 2020, 10:53:42 am »
Mmm, you will find that Debian is (IMO) not as polished as some Debian derivatives (like Ubuntu) so generally more knowledge is needed to circumvent odd issues (like this). Personally I tend to stick to Ubuntu distros, not because sorting out issues like this isn't fun, but it can be time-consuming and using a fully-functional installation can also be a huge amount of fun .. :) .. So my observation would be that if you were using a current Ubuntu based distro, I would not expect you to be having the problems you're describing.

Sometimes Ubuntu do get it wrong, there were some massive upheavals I think back around versions 11/12/13 with networking, but I've had no substantial problems in more recent years. On machines with a decent amount of memory (8G+) I use KUbuntu, otherwise XUbuntu, both work very well. I gave up on native Ubuntu years ago, too many problems with both Unity and GNome. I think the last time I had to worry about messing with X / DISPLAY was over 10 years ago running XDCMP over a network with thin clients against a couple of Linux servers, it's not something I would expect to be an issue on a modern Workstation. (and if I hit it, my immediate reaction would be to switch to something else, because it shouldn't be an issue these days)

Incidentally, the format of DISPLAY is; <host>:<display>.<screen> , so 0:0 would be referencing a host of "0", so I would not expect this to work ....
« Last Edit: October 28, 2020, 10:55:32 am by Mad Penguin »

 


SimplePortal 2.3.3 © 2008-2010, SimplePortal