Skip to content
This repository has been archived by the owner on Apr 25, 2023. It is now read-only.

Can not determine session name on debian with gnome3 #9

Open
pdavydov108 opened this issue Mar 8, 2014 · 11 comments
Open

Can not determine session name on debian with gnome3 #9

pdavydov108 opened this issue Mar 8, 2014 · 11 comments

Comments

@pdavydov108
Copy link

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

@iberianpig
Copy link
Owner

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'.

@pdavydov108
Copy link
Author

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.

@iberianpig
Copy link
Owner

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

@pdavydov108
Copy link
Author

It's output is "default"

@MostFrabjous
Copy link

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];

@pdavydov108
Copy link
Author

@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.

@mscalone
Copy link

mscalone commented Apr 5, 2014

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

@iberianpig
Copy link
Owner

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"

@ozank
Copy link

ozank commented Oct 3, 2014

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

@A-Shahbazi
Copy link

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.

@mscalone
Copy link

mscalone commented Nov 1, 2015

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants