Useful ubuntu commands
From Applied Optics Wiki
Revision as of 13:03, 1 June 2017 by Rikesh Patel (talk | contribs)
This is quick list of useful ubuntu related commands to fix certain problems
Display issues
Getting Gtk-WARNING **: cannot open display:
Enter xhost +
Happens when root programs (e.g. software managers) are trying to use your session
x2go on Ubuntu Mate
Big problems here, but it does work with fiddling (Jun 2017) - not sure how much of this is require;
- First add this (and create) to your ~/.profile
export GSETTINGS_SCHEMA_DIR=/usr/share/gconf/schemas/:/usr/share/mate:/usr/share/mate:/usr/local/share/:/usr/share/:/var/lib/snapd/desktop export XDG_DATA_DIRS=/usr/share/gconf/schemas/:/usr/share/mate:/usr/share/mate:/usr/local/share/:/usr/share/:/var/lib/snapd/desktop
- I then had to create a new custom session for me to log in locally and use Mate for x2go - I did this by creating a ~/.xinitrc file, making it executable and adding;
#!/usr/bin/env bash unset DBUS_SESSION_BUS_ADDRESS & # redirect to /dev/null due to x2go bug 914 dbus-launch /usr/bin/mate-session > /dev/null
- Then linking to .xsessions (
ln -s ~/.xinitrc ~/.xsession<\code>)
- And creating a new custom file in xsessions folder <code>/usr/share/xsessions/custom.desktop with;
[Desktop Entry] Name=Xsession Exec=/etc/X11/Xsession
- You then need to log in to this custom session on your pc and use x2go to login using Mate environment. I'm sure there's a way of reusing the custom session in x2go, but so far, I can't get it to work (I've tried just
startx
which calls ~/.xinitrc directly).