Difference between revisions of "Useful ubuntu commands"

From Applied Optics Wiki
Jump to: navigation, search
(Created page with "This is quick list of useful ubuntu related commands to fix certain problems ===Display issues=== Getting <code> Gtk-WARNING **: cannot open display: </code> Enter <code>DI...")
 
 
(3 intermediate revisions by the same user not shown)
Line 5: Line 5:
 
Getting <code> Gtk-WARNING **: cannot open display: </code>
 
Getting <code> Gtk-WARNING **: cannot open display: </code>
  
Enter <code>DISPLAY=:0.0 ; export DISPLAY; xhost +</code>
+
Enter <code>xhost +</code>
 +
 
 +
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 required;
 +
 
 +
* First add this (and create) to your ~/.profile
 +
<pre>
 +
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
 +
</pre>
 +
 
 +
* 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;
 +
 
 +
<pre>
 +
#!/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
 +
</pre>
 +
 
 +
* Then linking to .xsessions (<code>ln -s ~/.xinitrc ~/.xsession</code>)
 +
 
 +
* And creating a new custom file in xsessions folder <code>/usr/share/xsessions/custom.desktop </code> with;
 +
 
 +
<pre>
 +
[Desktop Entry]
 +
Name=Xsession
 +
Exec=/etc/X11/Xsession
 +
</pre>
 +
 
 +
* 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 <code>startx</code> which calls ~/.xinitrc directly).

Latest revision as of 13:05, 1 June 2017

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

  • 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)
  • And creating a new custom file in xsessions folder /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).