4

I have the following xsession file:

[Desktop Entry]                                                                 
Name=...
Comment=This session will start ...
Exec=????
TryExec=???
Type=????

After choosing my desktop environment and after logging in I want to see a full screen terminal running echo "Hello World" command.

What values have I pass to Exec, TryExec and Type field fields?

I already tried this:

Exec=gnome-terminal --full-screen -x "echo 'hello'"

But the terminal doesn't start in full screen mode. When I run this command in normal session it starts correctly.

Ionică Bizău
  • 3,371
  • 10
  • 30
  • 49
  • 1
    Why use a desktop environment? If all you need is a full screen terminal, just boot to the command line. Anyway, Type and TryExec aer not important. You need to set up a script that launches the terminal as you like and give that script to Exec. This would be easier to answer if you explained what your final goal is. As it stands, your question doesn't make much sense. – terdon Feb 09 '14 at 15:09
  • @terdon Because I am testing how the xsession works. I tried: `Exec=gnome-terminal --full-screen -x "echo 'hello'"` - but the terminal doesn't start in full screen mode. When I run this command in normal session it starts correctly. – Ionică Bizău Feb 09 '14 at 15:15
  • Well, yes, you also need to start some kind of window manager that can display stuff full screen. Also, remember to mention what you've tried in your question. It helps us understand and shows that you've done your homework. – terdon Feb 09 '14 at 15:18
  • @terdon Would it be possible to start something like the non-gui terminal? – Ionică Bizău Feb 09 '14 at 15:22
  • Yes, that's what I meant by my first comment. Have a look at [this](http://unix.stackexchange.com/q/90554/22222). – terdon Feb 09 '14 at 15:26
  • @terdon Yes, but I would like to open that terminal after logging in the desktop environment. Also a command like `echo "Something"` has to be run. – Ionică Bizău Feb 09 '14 at 15:28
  • let us [continue this discussion in chat](http://chat.stackexchange.com/rooms/12931/discussion-between-terdon-and-ionic-bizu) – terdon Feb 09 '14 at 15:31
  • you can just put the command on ~/.bashrc – totti Oct 08 '14 at 15:29
  • @totti I want to run that command only when starting this desktop environment. My major issue is that I cannot start the terminal in fullscreen mode. – Ionică Bizău Oct 08 '14 at 15:34
  • try to run with some delay, so that display manager cn get ready. – totti Oct 08 '14 at 15:44
  • if all you want is a terminal on a framebuffer then `/etc/X11` might have an `xinit` config for launching only `xterm`. But you dont need `xinit` - you can just do `Xorg {config-args} your_app`. Thats a bit much though - you can get a drm-enabled console with `kmscon` (it replaces `getty` entirely and allocates ptys rather than using the vts. Else get `fbcon` and run `terminology` in it - that d-env to itself - you can put high-def video in the background of your running shell. Also, `wayland/weston` is simply configured and frankly, beautiful for this. `terminology` works there too. – mikeserv Oct 10 '14 at 07:23
  • @mikeserv The thing is that I need an example... – Ionică Bizău Oct 10 '14 at 07:54
  • But of what? Your options are wide-open, but `gnome` doesnt have much of a place there. Im there with you - i prefer a terminal - and due to your other question im experimenting w/ getting `w3m` to print `terminology's` extended escapes inline - it would be cool to just let the terminal draw all of the images and video and what not in a cli webbrowser. Have you looked at [this](http://youtu.be/ibPziLRGvkg)? Thats a couple of years old by now probably, and its got even better since. Also, it would be worth your while to google `kmscon` - i also did an answer on it here somewhere once. – mikeserv Oct 10 '14 at 08:47

2 Answers2

1

The --full-screen switch is supported by the window manager, i.e. the terminal sets a hint that the window should be expanded to cover the entire screen, and the window manager is responsible for appropriately resizing it.

Thus, you need to start both a window manager that respects the fullscreen hint and the terminal.

Simon Richter
  • 4,409
  • 18
  • 20
  • Ok, how can I start the window manager, but only the terminal will appear on entire screen? However, the shortcuts should be disabled. What about starting it as tty or something like that? – Ionică Bizău Oct 08 '14 at 15:17
  • 1
    Normally the window manager is started by the session manager, *gnome-session*, but nothing stops you from starting it yourself as a background task (`x-window-manager &` followed by your terminal invocation). You might want to use a window manager with less functionality, or even something similar to [ratpoison](http://en.wikipedia.org/wiki/Ratpoison). – Simon Richter Oct 08 '14 at 16:01
  • It doesn't work. However, ratpoison is something interesting. – Ionică Bizău Oct 08 '14 at 16:34
  • When adding `x-window-manager &` to the script file that I want to run it's working. :-) So, +1 for now and waiting how can this be improved. I also want to remove any shortcuts for gnome-terminal session (like ctrl + shift + t === new tab etc). – Ionică Bizău Oct 08 '14 at 16:40
  • 1
    Would a regular xterm work for you as well, or does it have to be gnome-terminal? – Simon Richter Oct 08 '14 at 20:41
  • Well, the priority number one is to have a full screen terminal, but also to consume minimal resources. Starting `x-window-manager` and `gnome-terminal` works fine. So, I'd like to see other ways how a full screen terminal can appear in a minimal desktop environment. – Ionică Bizău Oct 09 '14 at 05:28
  • `xterm` is a lot lighter on resource usage. If all you need is a terminal, you can drop the rest of GNOME as well. – Simon Richter Oct 09 '14 at 09:07
  • And how can I do that? Note I want to keep my other desktop environments intact. – Ionică Bizău Oct 09 '14 at 09:28
  • just write `exec xterm` in your `~/.xsession`, log in, and type `startx` – deeenes Oct 09 '14 at 10:42
  • How can we make it do that after logging in from a display manager like GDM (instead of running startx from a VT/TTY)? – trusktr Jun 19 '20 at 06:57
  • 1
    @trusktr GDM has a "traditional X session" mode (at least it had one last time I looked) where it runs the Xsession instead of the normal desktop environment. That setting can be changed either once or permanently by the user, and affects that one account only. – Simon Richter Jun 25 '20 at 10:12
0

Try this Exec=bash -c ' sleep 30; gnome-terminal --full-screen -x "echo hello'" ; sleep 20 .
Also note any time (before/after login) you can press ctrl+alt+F1 to F6 to launch a tty, which is a full screen terminal. You can login from there.

totti
  • 1,464
  • 14
  • 15