Here is my desktop entry to run "PRGM.sh"  [Desktop Entry] Encoding=UTF-8 Name=PRGM Comment=Launch PRGM Exec=gksu /home/markku/PRGM.sh Icon=utilities-terminal Type=Application Terminal=true   The program runs in terminal and at the end outputs a code I want to check. But the desktop entry runs the program in terminal and closes when it finishes so can't check the code. How can I modify the desktop entry to not close the terminal after execution? (It is required to use gksu)
14957
I have the following shortcut which opens an SSH instance. How can I modify it so that when SSH closes, the terminal stays open?  [Desktop Entry] Terminal=true Type=Application Name[en_US]=ssh Icon=/logo_sprite.png Exec=gnome-terminal --geometry=... --window-with-profile=... --title=... -e 'bash -c "ssh -t -i ~/dsa.key cle@12.210.9.17 sudo -s"'
62273
For an interactive session via SSH on a Linux cluster in Rstudio, it is very easy to accidentally execute the keyboard shortcut for "run in terminal" when commands are highlighted in Rstudio console. This results in behavior such as  \&gt; library   or  Var1&gt;Var2   being executed in terminal, which creates a library or Var2 file in the remote working directory if the terminal is logged in at the bash prompt.   In a worst case scenario this would result in overwriting files in the remote working directory.   I would like to disable ">" in these sessions, but I am not sure how to do this.
59624
I want Ubuntu to open a terminal in the lower right corner when I log in, with the always on top mode enabled. I have made a script which does this when I run it from a terminal, but it does not work when I run the script by using Startup Applications. The window appears in the right spot, but always on top is not enabled. Below is my script.  #!/bin/bash gnome-terminal --title="abvtrm" --geometry 80x10-0--255 wmctrl -a abvtrm -b add,above exit   The idea is that I want to force the name of the window into being something I decide, so I have a name to refer to for wmctrl. I have noticed that if I run the command   wmctrl -a abvtrm -b add,above   manually in a terminal (after logging, having the window present but not in  always on top mode), it has no effect, which suggests to me that for some reason I am not allowed to pick a name for the window when working through Startup Applications.  I call the script by envoking the command  bash myscriptname.sh   Bonus question: Intuition tells me that in order to have the window appear in the bottom right, I should put  gnome-terminal --title="abvtrm" --geometry 80x10-0-0   but when I do this, the window ends up somewhere in the mid-right area of my screen. Why is this?
104679
I use Tilda (drop-down terminal) on Ubuntu as my "command central" - pretty much the way others might use GNOME Do, Quicksilver or Launchy.  However, I'm struggling with how to completely detach a process (e.g. Firefox) from the terminal it's been launched from - i.e. prevent that such a (non-)child process   is terminated when closing the originating terminal  "pollutes" the originating terminal via STDOUT/STDERR   For example, in order to start Vim in a "proper" terminal window, I have tried a simple script like the following:  exec gnome-terminal -e "vim $@" &amp;&gt; /dev/null &amp;   However, that still causes pollution (also, passing a file name doesn't seem to work).
116330
I need a C code to be executed when some particular keys are pressed in Linux "Desktop" environment.  What are the ways to register for such an event and How?  Should I write ISR for that? I need an exact part of Linux from where I can get this call.  Which part of OS handles stuff like these, Is it part Desktop environment like GNOME or part of some service?
112957
The Linux desktop can perform several actions which is otherwise not available to the user when logged in from a terminal. Actions such as system shutdown, and changing system time are accessible only to a sudo user after entering the password. How does this work. Is there a root daemon running which takes command from the login user. Please guide me to the right answer.  I am running Ubuntu 13.10.
8591
I'm writing a simple desktop initiation script which waits for disk idle, and then launches next external program (like Firefox, Skype or ) using &amp;, like:  ps cax | grep conky &gt; /dev/null if [ $? -eq 0 ]; then   echo "Conky is already running." else   wait-for-disk-idle sda   conky &amp; fi   That's easy.   The problem is that some programs spew a lot of debug output to the terminal, which gets mixed with the messages produced by my initialization script.  The question:  Is there any way to asynchronously launch an external program so that its standard output is discarded?   What I already tried:   conky &amp; &gt;/dev/null 2&gt;/dev/null  bash -c conky &amp;     The correct answer:  bash -c "conky &gt;/dev/null 2&gt;/dev/null &amp;"
15977
I recently tried to install GIMP (photo-editor) using the terminal and I think it required me to install flatpak, which I don't really understand and shouldn't have installed it I guess, because now I can't do what I could before. I have since uninstalled flatpak, but still have same problem. Earlier, when I was using dpkg --list to get the name of a program I wanted to uninstall, I could see a full list of all installed programs. Now I just get this weird list that doesn't look like programs, and it starts in alphabetical order but only starting at the letter &quot;L&quot;, e.g.: libgphoto2-6:a 2.5.16-2     amd64        gphoto2 digital camera library  is the first entry. And then: zlib1g:amd64   1:1.2.11.dfs amd64        compression library - runtime  is the last entry. It doesn't seem to be listing programs. Like, I have clementine installed and its no longer listed with that command. I am so confused. To give another example, I installed and uninstalled a media player successfully earlier today using the terminal, using dpkg --list to determine said program's name. I can no longer see any real programs using this or similar commands I have found here. EDIT: apt list --installed gives the same stupid incorrect list. Maybe it's showing libraries instead of programs now??
33061
I'd like to run a particular application (let's call it foo) from the command line, but I don't want it holding up the terminal, putting any junk in the terminal from its output or error streams, and also want it to keep running even if I close said terminal. In Bash, I can do that using (foo &amp;&gt;/dev/null &amp;), but I don't know how I would do that in Windows shell. Could someone please help me?
35098
GNOME Terminal shows up in several places:   launchers which start terminal commands the Launch Terminal keyboard shortcut the menu items added by nautilus-open-terminal   Does each of these explicitly specify GNOME Terminal, or is there some centralized setting they reference?  I have checked for:   A setting in System Settings ▸ System Info ▸ Default Applications An analog of  or  An environment variable containing gnome-terminal. This one actually looks hopeful:  $ env | grep gnome-terminal COLORTERM=gnome-terminal   but I'm not sure where to go with it.   If such a setting exists, my goal is to change it to use a different terminal emulator by default.
68588
When I launch certain programs from the command line like eclipse and document viewer in 11.10 it spews a load of information that seems inconsequential.   Also when they are run in the background they sometimes continue to produce output to the terminal which I am currently working on, which is irritating.  I would like them just launch and keep the background stuff in the background. My reasoning is that if you launch these programs through the GUI (eg double clicking on an icon) these messages are never shown to me, so I don't need them in the command line.
71756
I want to run a simple bash script automatically when I log in. For example  #!/bin/bash echo "start spotify" gnome-terminal -e spotify --title spotify   When I run this command, one gnome-terminal shows up and spotify show up. I also want the gnome-terminal to popup "hidden" in a different virtual desktop. (one of the other four virtual desktops you can choose from taskbar)   I tried to add this to /home/me/.bash_login or something, but that didn't work..
16777
Some GUI apps launch cleanly via the Terminal command line, but some don't, and they cause the Terminal to wait for the app to terminate. Even then, some don't "release" the command line.  The mysterious ampersand &amp; suffix seems to cause the terminal to put the process into the background (but I'm not sure what happens there).  Is there a way to launch an app via the Terminal so that there is no "hang on" effect, just like launching something via Alt+F2?  I'd like to have the command line available again immediately, without something still in the background and printing in the terminal.
7276
I have always recommended pressing ALT+F2 and typing for example gksu nautilus or gksudo nautilus both are equivalent; to run graphical programs with root privileges.  However, I have just installed raring on a test system and this no longer works.  gksu and gksudo are not installed as part of a default raring install; though they are in the repositories. In 12.04 at least gksudo was just a symbolic link to gksu  The reasons I have always done this are because while it is often safe to use sudo under some circumstances it can cause problems with graphical applications because gksu has you running the program as root while with sudo you are running as yourself but with elevated privileges.  This can mean you inadvertently change the owner of critical system files.  This can cause problems.  This reasoning is explained better here:         Why was command removed from a fresh install and what should we be using instead?
5524
Is there any application (or sequence of commands) for this function: seeing the result of the actions, while using a GUI interface, being automatically translated into a Terminal (or similar CLI environment) on the same machine.  I saw this in action long years ago in VBA for Applications (for example the Macros in Excel). I wonder if there is same function in Linux.
23183
I am running Ubuntu Gnome 16.10 (64bit). Gnome-shell version 3.20.4.   When I start my computer, I eventually see GDM3 offering a login prompt, as expected.   After I login, my monitors flash a little (like they're unplugged and then replugged in), and then I am brought to the gnome 3 desktop.   However, if I hit  CTRL + ALT + F1, I am brought back to GDM3, offering a login prompt.   If I then hit CTRL + ALT + F2,  I am brought back to my Gnome 3 desktop.  So it seems like GDM3 continues to run in TTY1 while the desktop runs in TTY2.   Questions   Is this how things are supposed to work? I thought the desktop was supposed to use the same TTY (or whatever you call it) as the display manager.  Am I using more graphical resources by having things setup this way? Is there a way to have GDM3 pass off the display to Gnome Desktop after I login? Is there any advantage do doing #3?
37894
There's already  which point to various executables (with or without full path). , not necessarily the name of the executable (in xterm it's xterm-color, and in gnome-terminal it's xterm-256color). Is there a variable which is expected to contain the name or path of the executable to use as the default terminal in Linux? (Or Arch Linux, if there is a custom convention.) Maybe this is nonsensical, since GUI programs are rarely spawned from shells which know of these variables…