0

I just wondered if some old computers laying around here could still be used for some games if I completely cut off the display manager. Is there a way to start a gui program from the command line in a new (and only) Xsession, even without lxde? I doubt it doesn't need compiz, but can I somehow configure it to only show that window?

If there is, is it still easy to have at least a small border (or frame or something like that) with a cross to terminate and close the Xserver? I'd like to use it eg. for Minecraft or Starbound.

Thanks! -Peter

  • Try startx openbox, openbox is lightweight window manager – user.dz Feb 21 '15 at 22:20
  • @Sneetsher: I actually look for some command or script to start it like startx openbox "/path/to/program", adapting to your example. – Peter Nerlich Feb 21 '15 at 23:03
1

You may declare a shell function that modifies autostart file and launch openbox-session instead.

This will show 2 windows one for target GUI program and an xterm for openbox. To kill the xsession, close that xterm window.

obox () {
  echo "$@ &" > ~/.config/openbox/autostart;
  startx openbox-session;
}

Example:

obox gedit ~/.config/openbox/autostart
obox winecfg
  • Hm, it would work as workaround for me, but unforunaly, now I can't use lightdm anymore. Do you have an idea what went wrong? Instead of starting a session lightdm comes up again, almost immediately. – Peter Nerlich Feb 22 '15 at 10:09
  • could you add more information about you environment, are you using lubuntu, which release... try running same command from any console tty1-6. – user.dz Feb 22 '15 at 10:41
  • 1
    Oh, found it. chown myusername:myusername ~/.Xauthority works. Well, your suggestion would be a workaround at least. – Peter Nerlich Feb 22 '15 at 11:23
1

I found >Start ubuntu without a desktop environment but start an X application< to be helpful here.

The best answer works for me - exept, when I put the path /media/myusername/I/have/it/on/another/partition/linux64/starbound in, it doesn't show up to choose. I read the tryExec= field looks, if the program is present, else it is ignored. It is not required though, so I'll try without that next.

UPDATE: I figured it out somehow. I played around a little, and it appears that it won't read the /usr/share/xsessions files, since their owner is root. I had places a .sh script there to mount the partition, too, if not already aviable, but I moved it into ~/bin and now it works fine with that.

Thanks for your help, everyone!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.