xSwipe icon indicating copy to clipboard operation
xSwipe copied to clipboard

Can not determine session name on debian with gnome3

Open pdavydov108 opened this issue 12 years ago • 11 comments

Hi! Thanks for your work, xSwipe is cool. I'm trying it on debian now with a patched synaptics driver (https://github.com/felipejfc/xserver-xorg-input-synaptics). Unfortunately, xSwipe is not able to detect gnome environment, session name is always set to 'other'. Is it a bug, or should I install some package to fix it? My gnome session version is 3.8.4

pdavydov108 avatar Mar 08 '14 07:03 pdavydov108

Hi @pdavydov108, Thank you for telling the issue! Please run code below, pgrep -lf ^gnome-session | sed -e 's/.*gnome-session --session=//g' xSwipe is using this output as session-name detecting. If the output is no display, it must be detect as 'other'.

iberianpig avatar Mar 08 '14 15:03 iberianpig

Yeah, this command really outputs nothing for me, and the session name is set to 'other'. But is it correct? I'm using gnome in fact.

pdavydov108 avatar Mar 08 '14 17:03 pdavydov108

Please run code below, echo $DESKTOP_SESSION and tell me the output.

iberianpig avatar Mar 09 '14 02:03 iberianpig

It's output is "default"

pdavydov108 avatar Mar 09 '14 03:03 pdavydov108

Same problem here with arch linux and gnome 3.10

$ pgrep -lf ^gnome-session | sed -e 's/.*gnome-session --session=//g'
537 gnome-session
$ echo $DESKTOP_SESSION
gnome

xSwipe tries to split the reported session in line 94 and afterwards the string is empty. I fixed it locally, but don't know if this breaks other systems:

94c94
< my $sessionName = (split "-session", (split" ", $data[0])[1])[0];
---
> my $sessionName = (split "session=", $data[0])[1];

MostFrabjous avatar Mar 09 '14 15:03 MostFrabjous

@Henry78, you code doesn't work for me as well, it seems that I don't have gnome-session running at all.. The only way that I was able to find to detect my desktop environment is to check $XDG_DATA_DIRS variable, as it is described here http://unix.stackexchange.com/questions/116539/how-to-detect-the-desktop-environment-in-a-bash-script.

pdavydov108 avatar Mar 09 '14 16:03 pdavydov108

I have the same problem. On Ubuntu 14.04 using Unity. Command outputs:

~$ pgrep -lf ^gnome-session | sed -e 's/.*gnome-session --session=//g'
 1903 gnome-session
~$ echo $DESKTOP_SESSION
ubuntu

mscalone avatar Apr 05 '14 00:04 mscalone

Sorry for late reply. Please check below code and tell me the output and whether it is right desktop environment.

if [ "$XDG_CURRENT_DESKTOP" = "" ]
then
  desktop=$(echo "$XDG_DATA_DIRS" | sed 's/.*\(xfce\|kde\|gnome\).*/\1/')
else
  desktop=$XDG_CURRENT_DESKTOP
fi

desktop=${desktop,,}  # convert to lower case
echo "$desktop"

iberianpig avatar Jul 24 '14 06:07 iberianpig

On Ubuntu14.04 it gives: unity but couldn't run the XSwipe on Ubuntu even with the patched synaptics driver

ozank avatar Oct 03 '14 14:10 ozank

I have a similar issue on ubuntu 14.04 x64(I could compile the modified synaptics driver and run the script but it seems my session is detected as 'other') I confirm both @ozank and @mscalone outputs on ubuntu 14.04.

A-Shahbazi avatar Oct 04 '14 12:10 A-Shahbazi

Hello people, FYI y upgraded to Ubuntu 15.10 this modified driver didn't compiled. I found a fork that work: https://github.com/Chosko/xserver-xorg-input-synaptics

mscalone avatar Nov 01 '15 14:11 mscalone