New answers tagged

0

Simple way may be also just to run System Monitor (if started from Terminal you must write gnome-system-monitor) and under "Processes" tab arrange the running processes by Name and than count the number of occurrences of Bash in the listing (they will be all together if you arrange by name, so it's easy to count). Note that you must look for Bash and not ...


0

Create a script with the editor of your choice. For my example, let's call it btmap and place it in /home/username/scripts/ Of course you would change username in the path with your actual username. Put DISPLAY=":0" antimicro in the editor, save and close. Open a terminal in the scripts folder where the btmap file is. Type in chmod 755 btmap to make ...


0

After you have switched to tty Try this killall -HUP cinnamon. Press Ctrl + Alt + F7. Cinnamon will ask you if you want to restart cinnamon.


0

So I couldn't figure out why the issue was happening but I figured out a work-around. In the same script that mv's tty1.conf into /etc/tty1.conf during the first boot ever, I added a "shutdown -r now" at the end. As long as the system is rebooted once (before or after the error that shows up), everything (including the new tty1.conf file) works as expected ...


0

In Ubuntu 16.04, which uses systemd, the method is slightly different. I'll quote the relevant bits of my related post How do I override or configure systemd services?: Say I want to have TTY2 autologin to my user (this is not advisable, but just an example). TTY2 is run by the getty@tty2 service (tty2 being an instance of the template ...


0

That message comes from the file /etc/issue and/or /etc/issue.net. I would imagine that you either lost these files or they are not readable by root (?!?) or they do not get printed anymore. The files should automatically have been updated. It would be set to the output of lsb_release -d or something of the sort. If that does not work for you, you could ...


1

It's probably possible although I never tried. If you have a single video board and that's an NVidia that you use with the NVidia proprietary drivers, then it won't work (and in that case what you saw was just a "lucky" side effect of some bug.) This is because they (NVidia) do not "properly" divide each video port in a distinct video port. However, it ...


1

You could use tio - a simple tty terminal I/O application: tio /dev/ttyUSB0 See http://tio.github.io


5

If you really need to get the number of terminal you have open, go for counting the files owned by you under /dev/pts (although this might include ones opened by background processes, not by graphical terminal emulators). Alternatively, count the number of child processes of your terminal emulator(s), as shown by Jacob in the first line of his response. ...


1

An awk way: who | awk 'BEGIN{count=0}{ if(NR!=1){count++} }END{print count}' Explanation: In above 1 liner command, awk is used to find the count of terminal. Inside awk program, it is just checking the number of lines return by who command - 1.


5

In a single user situation, if we take the example of xterm, we can simply count the number of pids of xterm; xterm creates a separate pid for each and every window. gnome-terminal however runs a single pid, but the good news is that it creates a child process for each and every window and/or tab. we can retrieve these child processes by the command: pgrep ...


14

Every opened "pseudo-terminal" (or "terminal emulator") have a special file in /dev/pts/ for each of it's windows/tabs and those files/numbers auto-increments, gets freed and are re-used. This simple script is using exactly those numbers to select a color from static configuration table. Append it to your ~/.bashrc: # custom color selector config=( 1 # ...


0

killall xinit works ok. Not sure you're going to find a generic way to gracefully close all possible sessions. For some reason if I start a unity session from TTY, and then run unity in a terminal, it seems to close it fairly gracefully.


0

You can try the w -ous command and check if there is number for DISPLAY. If there isn't a number just use startx and Alt+F7 to go back to GUI.


1

SOLVED IT Reinstalled Cinnamon desktop, removed XFCE and rebooted, it said the disk was full, deleted a few things and I'm now back on track


0

This may be a solution but I have no way of checking if it doesn't work you can always rename the file back .. try mv ~/.config/dconf/user ~/.config/dconf/user.old and then try rebooting again


0

After following links on the subject (a long time ago), I ended up (somehow) installing unity over gnome, which obviously messed everything up. I had to format the computer and reinstall Ubuntu. Now, it works.


0

I was unable to use tab completion when connecting via VNC to a headless XFCE4. The answer listed here did not work but this did: Edit Keyboard Shortcuts in xml file: sudo nano ~/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml Find: <property name="&lt;Super&gt;Tab" type="string" value="switch_window_key"/> Change ...


3

If you are a member of the dialout group you can access serial devices, including ttySx, ttyUSBx, and ttyACMx devices, without changing permissions. $ sudo adduser myusername dialout Alternatively, you could create a udev rule to set the permissions as the device is attached. See http://askubuntu.com/a/112573/471836


1

Yes you can. You can use a terminal and then in each terminal use this command. monitor 1 terminal screen /dev/tty1 monitor 2 terminal screen /dev/tty2



Top 50 recent answers are included