You don't need to switch to runlevel 5, this only means that the server boots into the GUI, not that it's useable. You can use runlevel 3 and launch remote X sessions.
Furthermore, you'll have to use xterm
to start the SSH session, not Terminal.app. If you run XQuartz it should open it by default. Then run ssh -X root.website.com
to open the session and from this session you can launch the needed applications. If you need the entire desktop, run gnome-session &
or your desired VM.
Note that you need to have X11Forwarding yes
in your /etc/ssh/sshd.conf
.
It seems like the issue is that when I plug the external screen, it messes with the coordinate system of my Mac's screen, effectively shifting the origin of my screen by the resolution of the external screen.
In other words, from the point of view of XQuartz the origin of my Mac's screen changes from 0,0 to 2560,1440 (which is the resolution of my external screen).
This means that if Inkscape is somewhere near origin (0,0) but still associated with my Mac's main screen then it doesn't appear on the external screen nor in my main screen. It is basically in "limbo" between the 2 screens.
The solution is to move the Inkscape window to a new coordinate that takes into account the size of the external screen, and this is where wmctrl
comes in useful:
brew install wmctrl
wmctrl -r Inkscape -e 0,2560,1440,1200,700
Of course you need to replace 2560,1440
with your own external screen's resolution and 1200,700
to suit your main screen resolution.
In order to make it more convenient I created 2 alias, to fix the coordinates for my Mac screen and for the external screen, respectively:
alias fixInkscape='wmctrl -r Inkscape -e 0,2560,1440,1200,700'
alias fixInkscapeExt='wmctrl -r Inkscape -e 0,0,0,2560,1300'
Remember that each alias only works for the screen that Inkscape is associated with, you still need to drag-and-drop the window in order to switch screens. wmctrl
won't do it automatically, but it certainly helps in "fishing" it from limbo.
Best Answer
What user/env is actually calling
xinit
when you start XQuartz?Under Linux, this would be the user that you logged in as; I'd suspect that it's probably the same for Mac OS X. As for the environment, whatever the current environment is when you run
xinit
, that will be the environment thatXQuartz
runs with, excepting changes to the environment done within one of the files thatXQuartz
reads when it starts up.Where should I put
xmodmap
so that it's called once, and only once, when XQuartz is started?To create your own custom map/table and store it in a configuration file, run:
Make the desired changes to
~/.Xmodmap
and then test the new configuration with:To active your custom table when starting Xorg, that is XQuartz, add the following to your
~/.xinitrc
How do I get the LANG set once, and only once, as an environment variable when I start XQuartz (I need it for unicode support)
To set
LANG
, simply add one of the following to your~/.xinitrc