Giter VIP home page Giter VIP logo

Comments (16)

hungaborhorvath avatar hungaborhorvath commented on June 22, 2024

Ok, now I am really confused. Apparently, having DE=gnome (which is basically the same as settings XDG_CURRENT_DESKTOP=gnome, seems to solve the problems I was having on_certain_sftp_servers. Same with DE=xfce. That is: if I open an sftp link to my university server, then I can open files and get back mc. However,if I open an sftp link to my raspberry pi on my local network, then somehow the file is not copied into /tmp/mc-username. The weird thing is that the file itself is probably transferred from the pi to my machine, because there is network activity, and I have to wait until the appropriate application opens. (And the waiting time seems to be proportional to the filesize.) It just is not written to disk. And then the application is launched and complains about not finding the file that should be there.

from bunsen-configs.

johnraff avatar johnraff commented on June 22, 2024

Improve xdg-open behaviour by setting XDG_CURRENT_DESKTOP=gnome in the environment and making sure that gvfs-open is installed

Does setting that variable actually fix the issue that user was having with mc (or possibly xdg-open)? exo-open is already available, (comes with thunar-volman) so we could also try XDG_CURRENT_DESKTOP=XFCE
I'm a little bit nervous about announcing to the whole environment that we're using GNOME, and #! users in general are more familiar with the XFCE tools. OTOH the Gnome tools are probably more sophisticated...

btw the xdg-open code you quoted is probably from a later version than what comes with Debian Jessie, where the DE options are more limited.

    if [ -n "${XDG_CURRENT_DESKTOP}" ]; then
      case "${XDG_CURRENT_DESKTOP}" in
         GNOME)
           DE=gnome;
           ;;
         KDE)
           DE=kde;
           ;;
         LXDE)
           DE=lxde;
           ;;
         XFCE)
           DE=xfce
      esac
    fi

from bunsen-configs.

hungaborhorvath avatar hungaborhorvath commented on June 22, 2024

Does setting that variable actually fix the issue that user was having with mc (or possibly xdg-open)?

I tried setting the variable DE=xfce and also tried DE=gnome in the shell before starting jessie. As I wrote, the result is promising. That is: locally it behaves exactly as it should, but using an sftp link it may or may not copy over the file to /tmp/mc-username. More precisely it looks that it always copies the file to RAM, but may or may not put it to /tmp/mc-username. From Thunar I think it works as intended without setting any variables. (I vaguely remember trying this but I am not sure.)

Edit: Also tried setting XDG_CURRENT_DESKTOP=GNOME or XFCE, with the same result as setting DE=gnome or xfce.

from bunsen-configs.

hhhorb avatar hhhorb commented on June 22, 2024

Jens and John, what's your recommendation here?

from bunsen-configs.

johnraff avatar johnraff commented on June 22, 2024

I'd say try to use exo-open, which we already have on the system.
I'm not sure if setting XDG_CURRENT_DESKTOP to XFCE is needed or not.
Someone would have to spend some time playing with this stuff...

@2ion Jens, what do you think?

from bunsen-configs.

 avatar commented on June 22, 2024

Do not leave the setting unset, set to XFCE, that is a reasonable default. I have no chance to investigate ATM but IIRC exo-open should be what the XFCE setting is triggering.


Personally, I'm using KDE here but only because I am already using KDE desktop applications. Using kde-open would launch a KDE daemon, so that'd be a suboptimal solution.

from bunsen-configs.

johnraff avatar johnraff commented on June 22, 2024

OK let's put XDG_CURRENT_DESKTOP=XFCE in the most appropriate file.
(...think a moment...)
~/.config/openbox/environment?
~/.xsessionrc?

from bunsen-configs.

johnraff avatar johnraff commented on June 22, 2024

...hold this a moment.

exo-open still fails the directory-name-with-spaces test (I just checked). On Wheezy gvfs-open failed too, but on Jessie it works OK. (On default BunsenLabs plain xdg-open (with no XDG_CURRENT_DESKTOP set) works too, because open_generic_xdg_mime() checks the bl-file-manager.desktop we installed.)

That's a different issue from what brought this question up of course, but since gvfs-open covers both:

gvfs-bin is a 444kB install. Should we add that to the default system and set XDG_CURRENT_DESKTOP=GNOME after all?

from bunsen-configs.

johnraff avatar johnraff commented on June 22, 2024

More complications - using either GNOME or XFCE will cause some of the .desktop files in /usr/share/applications to hide or show themselves differently. OnlyShowIn and NotShowIn refer to XDG_CURRENT_DESKTOP.
Checking my BunsenLabs install:

john@bunsen:~$ grep -r 'OnlyShowIn' /usr/share/applications
/usr/share/applications/exo-file-manager.desktop:OnlyShowIn=XFCE;
/usr/share/applications/software-properties-gnome.desktop:OnlyShowIn=GNOME;
/usr/share/applications/xfce4-notifyd-config.desktop:OnlyShowIn=XFCE;
/usr/share/applications/exo-mail-reader.desktop:OnlyShowIn=XFCE;
/usr/share/applications/synaptic-kde.desktop:OnlyShowIn=KDE;
/usr/share/applications/exo-preferred-applications.desktop:OnlyShowIn=XFCE;
/usr/share/applications/exo-terminal-emulator.desktop:OnlyShowIn=XFCE;
/usr/share/applications/exo-web-browser.desktop:OnlyShowIn=XFCE;
/usr/share/applications/rxvt-unicode.desktop:OnlyShowIn=Unity
john@bunsen:~$ grep -r 'NotShowIn' /usr/share/applications
/usr/share/applications/gdebi.desktop:NotShowIn=KDE;
/usr/share/applications/xfce4-power-manager-settings.desktop:NotShowIn=GNOME;KDE;Unity;
/usr/share/applications/synaptic.desktop:NotShowIn=KDE;
/usr/share/applications/software-properties-gtk.desktop:NotShowIn=GNOME;
/usr/share/applications/flash-player-properties.desktop:NotShowIn=KDE;
/usr/share/applications/nm-connection-editor.desktop:NotShowIn=KDE;
/usr/share/applications/lxappearance.desktop:NotShowIn=GNOME;KDE;XFCE;
/usr/share/applications/org.gnome.FileRoller.desktop:NotShowIn=KDE;
/usr/share/applications/ibus-setup.desktop:NotShowIn=GNOME;Unity;
/usr/share/applications/nm-applet.desktop:NotShowIn=KDE;

But... this: https://bugs.launchpad.net/ubuntu/+source/lightdm/+bug/1212408 suggests that not having XDG_CURRENT_DESKTOP set might possibly be responsible for the suspend/locking issues some users are getting.

from bunsen-configs.

 avatar commented on June 22, 2024

That's true; as I have said earlier, not having XDG_CURRENT_DESKTOP set causes all kinds of unexpected or broken in software. This also affects proprietary programs which some users might use.

While some of the settings are questionable (lxappearance not in GNOME/KDE/XFCE?), XFCE is maybe a good choice because we are using thunar as the file manager already, aren't we?

from bunsen-configs.

hhhorb avatar hhhorb commented on June 22, 2024

XFCE is maybe a good choice because we are using thunar as the file manager already, aren't we?

Thunar, as well as xfce4-volumed, xfce4-notifyd and xfce4-power-manager.

from bunsen-configs.

johnraff avatar johnraff commented on June 22, 2024

Yes, XFCE looks like the better choice on the whole, for compatibility.
It's a pity the LXDE devs decided not to show lxappearance if XDG_CURRENT_DESKTOP=XFCE though. It won't affect our hard-coded menu, but anyone with a dynamically generated menu will find lxappearance missing, unless we ship a modified lxappearance.desktop in skel/.local/share/applications - which would not be out of the question to do of course.

OK as for the best place to set XDG_CURRENT_DESKTOP, ~/.config/openbox/environment would apply to any session using Openbox, while ~/.xsessionrc would apply for all X sessions.

I'm starting to think that in the long term we should have a startbunsen script to hold things we want only for BunsenLabs, leaving LXDE or XFCE sessions clean. It could be triggered from a /usr/share/xsessions/bunsenlabs.desktop which we would set as default in lightdm.conf.

But that's for our next release maybe, so for now I'll put export XDG_CURRENT_DESKTOP=XFCE in skel/.config/openbox/environment if that sounds OK?

from bunsen-configs.

johnraff avatar johnraff commented on June 22, 2024

More reason not to use GNOME:

john@bunsen:~$ grep -r 'NotShowIn' /etc/xdg/autostart
/etc/xdg/autostart/pulseaudio.desktop:NotShowIn=KDE;
/etc/xdg/autostart/xfce4-power-manager.desktop:NotShowIn=GNOME;KDE;Unity;
/etc/xdg/autostart/nm-applet.desktop:NotShowIn=KDE;
john@bunsen:~$ grep -r 'OnlyShowIn' /etc/xdg/autostart
/etc/xdg/autostart/gsettings-data-convert.desktop:OnlyShowIn=GNOME;Unity;
/etc/xdg/autostart/gnome-keyring-secrets.desktop:OnlyShowIn=GNOME;Unity;MATE;
/etc/xdg/autostart/gnome-keyring-pkcs11.desktop:OnlyShowIn=GNOME;Unity;MATE;
/etc/xdg/autostart/pulseaudio-kde.desktop:OnlyShowIn=KDE;
/etc/xdg/autostart/xfce4-volumed.desktop:OnlyShowIn=XFCE;
/etc/xdg/autostart/polkit-gnome-authentication-agent-1.desktop:OnlyShowIn=GNOME;XFCE;Unity;
/etc/xdg/autostart/gnome-keyring-gpg.desktop:OnlyShowIn=GNOME;Unity;MATE;
/etc/xdg/autostart/gnome-keyring-ssh.desktop:OnlyShowIn=GNOME;Unity;MATE;
/etc/xdg/autostart/at-spi-dbus-bus.desktop:OnlyShowIn=GNOME;Unity;
/etc/xdg/autostart/clipit-startup.desktop:OnlyShowIn=GNOME;XFCE;LXDE;Unity;

Like, with GNOME xfce4-power-manager wouldn't be autostarted any more, and a bunch of other stuff would be...

Anyway, whichever we use, we'll have to check over all those autostarts and see if anything needs adding to or removing from openbox/autostart.

from bunsen-configs.

hhhorb avatar hhhorb commented on June 22, 2024

for now I'll put export XDG_CURRENT_DESKTOP=XFCE in skel/.config/openbox/environment if that sounds OK?

Yes, we can change this down the road if need be.

from bunsen-configs.

johnraff avatar johnraff commented on June 22, 2024

OK test. The variable is in the environment, but isn't affecting the OnlyShowin XFCE autostart items for some reason. More research needed...
(GNOME etc entries removed)

# With no variable set:
john@bunsen:~$ /usr/lib/i386-linux-gnu/openbox-xdg-autostart --list

[*] Screen Locker
      File: /etc/xdg/autostart/light-locker.desktop
      Executes: light-locker

[ ] XFCE Volume Daemon
      File: /etc/xdg/autostart/xfce4-volumed.desktop
      Executes: xfce4-volumed
    * Excluded by: OnlyShowIn (XFCE)

[*] vboxclient
      File: /etc/xdg/autostart/vboxclient.desktop
      Executes: /usr/bin/VBoxClient-all

[*] PulseAudio Sound System
      File: /etc/xdg/autostart/pulseaudio.desktop
      Executes: start-pulseaudio-x11

[ ] PolicyKit Authentication Agent
      File: /etc/xdg/autostart/polkit-gnome-authentication-agent-1.desktop
      Executes: /usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1
    * Excluded by: OnlyShowIn (GNOME, XFCE, Unity)

[*] Power Manager
      File: /etc/xdg/autostart/xfce4-power-manager.desktop
      Executes: xfce4-power-manager

[*] Network
      File: /etc/xdg/autostart/nm-applet.desktop
      Executes: nm-applet

[ ] ClipIt
      File: /etc/xdg/autostart/clipit-startup.desktop
      Executes: clipit
    * Excluded by: OnlyShowIn (GNOME, XFCE, LXDE, Unity)

# and after adding XDG_CURRENT_DESKTOP=XFCE to
# ~/.config/openbox/environment:

john@bunsen:~$ echo $XDG_CURRENT_DESKTOP
XFCE
john@bunsen:~$ /usr/lib/i386-linux-gnu/openbox-xdg-autostart --list

[*] Screen Locker
      File: /etc/xdg/autostart/light-locker.desktop
      Executes: light-locker

[ ] XFCE Volume Daemon
      File: /etc/xdg/autostart/xfce4-volumed.desktop
      Executes: xfce4-volumed
    * Excluded by: OnlyShowIn (XFCE)

[*] vboxclient
      File: /etc/xdg/autostart/vboxclient.desktop
      Executes: /usr/bin/VBoxClient-all

[*] PulseAudio Sound System
      File: /etc/xdg/autostart/pulseaudio.desktop
      Executes: start-pulseaudio-x11

[ ] PolicyKit Authentication Agent
      File: /etc/xdg/autostart/polkit-gnome-authentication-agent-1.desktop
      Executes: /usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1
    * Excluded by: OnlyShowIn (GNOME, XFCE, Unity)

[*] Power Manager
      File: /etc/xdg/autostart/xfce4-power-manager.desktop
      Executes: xfce4-power-manager

[*] Network
      File: /etc/xdg/autostart/nm-applet.desktop
      Executes: nm-applet

[ ] ClipIt
      File: /etc/xdg/autostart/clipit-startup.desktop
      Executes: clipit
    * Excluded by: OnlyShowIn (GNOME, XFCE, LXDE, Unity)

from bunsen-configs.

johnraff avatar johnraff commented on June 22, 2024

Re: above:
/usr/lib/i386-linux-gnu/openbox-xdg-autostart --help

Usage: openbox-xdg-autostart [OPTION]... [ENVIRONMENT]...
ENVIRONMENT specifies a list of environments for which to run autostart
applications. If none are specified, only applications which do not
limit themselves to certain environments will be run.
ENVIRONMENT can be one or more of:
GNOME Gnome Desktop
KDE KDE Desktop
ROX ROX Desktop
XFCE XFCE Desktop
Old Legacy systems

So it's not referring to $XDG_CURRENT_DESKTOP but wants the environment passed as an argument.
(Tested by running /usr/lib/i386-linux-gnu/openbox-xdg-autostart --list XFCE)

Which means our current openbox/autostart entries won't be affected by setting that variable and can stay as they are.

Panic over, I'll just go ahead and set it in openbox/environment in bunsen-configs.

from bunsen-configs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.