date int64 1,220B 1,719B | question_description stringlengths 28 29.9k | accepted_answer stringlengths 12 26.4k | question_title stringlengths 14 159 |
|---|---|---|---|
1,475,704,615,000 |
I am having too many artifacts when doing right click (second click) of mouse with the touchpad of UX303UA in Debian 8.5, which is problematic in inspection etc with Mathematica.
Goal to fix: Default Shift+fn+f10 to bring the mouse second click does not work in my hardware (don_crissti)
Characteristics of the system
Inspecting the keystroke Shift+fn+f10 with xev
KeyPress event, serial 33, synthetic NO, window 0x2200001,
root 0x19a, subw 0x0, time 60929622, (375,-9), root:(476,157),
state 0x0, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyPress event, serial 36, synthetic NO, window 0x2200001,
root 0x19a, subw 0x0, time 60931790, (375,-9), root:(476,157),
state 0x1, keycode 121 (keysym 0x1008ff12, XF86AudioMute), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyRelease event, serial 36, synthetic NO, window 0x2200001,
root 0x19a, subw 0x0, time 60931880, (375,-9), root:(476,157),
state 0x1, keycode 121 (keysym 0x1008ff12, XF86AudioMute), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
Settings > Mouse & Touchpad does not have anything relevant about fn keys.
Fig. 1 Pressing literally fn+F10 opens a tab in Google Chrome/Matlab/...; while pressing fn+shift+F10 does nothing
OS: Debian 8.5
Window manager: Gnome 3.14
Hardware: Asus Zenbook UX303UA
Linux kernel: 4.6 of backports
Mathematica: 11
|
No supported solution in Gnome 3.14 of Debian 8.5.
Let's hope the next release of Gnome at Q1-Q2 2017 will target the feature.
| How to second-click by Shift+F10 in Debian? |
1,475,704,615,000 |
I.e. what I want is the Linux equivalent of Windows Public/Pictures.
The problem is that Linux file manager Nautilus doesn't apply default ACLs when you move a file into a folder/directory (nor good old set-group-id). Not even in the expected case, where the file is only in one directory at a time, i.e. it hasn't also been hard-linked into another directory.
So dragging photos from a plugged in camera can't work, even with a default ACL. Other users will be able to read the photos, but they won't be able to write to them. They're shown with a padlock in the file manager.
Amusingly it isn't using rename() in this case, because the move crosses filesystems. Nautilus is just providing consistent semantics in this case by re-applying permissions form the source file :trollface:.
Unfortunately I remembered this too late, after getting fed up instructing fellow users on how to use Digikam. (Digikam worked, because deleting photos from the card is a separate operation. So the photos are necessarily copied, instead of moved). I instructed them to write notes on using the file manager instead. Sigh.
So I know this isn't the expected usage, i.e. multi-user computers have not really been catered for. But is there any sensible way I could set this up for my fellow users?
I'm discounting any method that's harder for people to remember (over about a month) than the file manager one. That excludes Digikam; it has too many pointless choices, and then demands confirmation before removing images from the card, as if this whole operation was fraught with danger. (Also unfortunately, with our software we get an "import photos using Digikam" popup that doesn't work).
I'm also excluding any photo manager that can't save album's names (including a date) to the filesystem. If you can't export to Digikam, then you're not trustworthy enough to make me import from Digikam!
Environment:
Linux
Debian
Standard GNOME desktop
|
I saw another approach suggested in Docker bug comments. There's a FUSE filesystem which alters permissions. There's a performance impact just from using FUSE, but FUSE isn't as bad as you might think. Check out http://bindfs.org/
Example line for /etc/fstab, which allows users who have been added to the photos group:
/home/photos /home/photos fuse.bindfs nofail,allow_other,force-group=photos,perms=g+wX
It may also be possible to address with a few lines of code. Unfortunately it's not a completely trivial exercise. The second link below would work if you don't mind it breaking on newlines (or backslashes, apparently?) in filenames.
https://superuser.com/questions/139513/acl-and-moving-files-in-nautilus
http://positon.org/a-solution-to-the-umask-problem-inotify-to-force-permissions
| Shared, read-write, photo directory tree, for normal users |
1,475,704,615,000 |
I want to organize my VNC connections using the bookmark feature integrated in vinagre 3.18.2.
Since the GUI obviously does not support the adding of sub-folders I had a look at the bookmarks file in ~/.local/share/vinagre/vinagre-bookmarks.xml.
However due to a lack of documentation I could not figure out, what the correct syntax for adding sub-folders to the XML structure is. Hence I had a look at vinagre's source code and found the use of the variable VINAGRE_BOOKMARKS_ENTRY_NODE_FOLDER in several bookmarks-related C and C-header files.
But unfortunately I could not find out the correct syntax for editing the bookmarks XML file from the parser's code either.
Here's the files I searched:
./vinagre/vinagre-window.c
./vinagre/vinagre-bookmarks.c
./vinagre/vinagre-bookmarks-entry.h
./vinagre/vinagre-bookmarks-migration.c
./vinagre/vinagre-bookmarks-tree.c
./vinagre/vinagre-bookmarks-entry.c
./vinagre/vinagre-bookmarks-ui.c
How can I add sub-folders to the bookmarks anyway?
|
Found the answer at vinagre-bookmarks-migration
To introduce a sub-folder do
<folder name="folder name">[..]</folder>
Where [..] may be items or further sub-folders.
Update:
I created a simple XSD file to parse the bookmarks:
<?xml version="1.0" encoding="utf-8"?>
<!--
Vinagre bookmarks XML Schema Description
Maintainer: Richard Neumann <r dot neumann at homeinfo fullstop de>
XXX: Use Venetian Blind Design
-->
<!--<xs:schema
xmlns="https://wiki.gnome.org/Apps/Vinagre/vinagre-bookmarks.xsd"
xmlns:xs="http://www.w3.org/2001/XMLSchema" version="1.0"
targetNamespace="https://wiki.gnome.org/Apps/Vinagre/vinagre-bookmarks.xsd">-->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" version="1.0">
<xs:element name="vinagre-bookmarks" type="VinagreBookmarksRoot">
<xs:annotation>
<xs:documentation xml:lang="en">
Root element for vinagre bookmarks
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:complexType name="VinagreBookmarksRoot">
<xs:annotation>
<xs:documentation xml:lang="en">
Vinagre bookmarks root folder type
</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="folder" type="Folder" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation xml:lang="en">
Sub-folders
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="item" type="Item" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation xml:lang="en">
Connection items
</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
<xs:complexType name="Folder">
<xs:annotation>
<xs:documentation xml:lang="en">
Folder type
</xs:documentation>
</xs:annotation>
<xs:complexContent>
<xs:extension base="VinagreBookmarksRoot">
<xs:attribute name="name" type="xs:string" use="required"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="Item">
<xs:annotation>
<xs:documentation xml:lang="en">
A connection item
</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="protocol" type="xs:string"/>
<xs:element name="name" type="xs:string"/>
<xs:element name="host" type="xs:string"/>
<xs:element name="username" type="xs:string"/>
<xs:element name="port" type="xs:unsignedShort"/>
<xs:element name="fullscreen" type="xs:boolean"/>
<xs:element name="width" type="xs:unsignedInt"/>
<xs:element name="height" type="xs:unsignedInt"/>
<xs:element name="view_only" type="xs:boolean"/>
<xs:element name="scaling" type="xs:boolean"/>
<xs:element name="keep_ratio" type="xs:boolean"/>
<xs:element name="depth_profile" type="xs:unsignedByte"/>
<xs:element name="lossy_encoding" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
| Add sub-folder to vinagre 3.18.2 bookmarks |
1,475,704,615,000 |
In GNOME3 under Fedora 21, is there a way to disable the bottom status bar that pops up every time the mouse cursor touches the bottom of the screen?
Something similar to the extension No Topleft Hot Corner that disables the Activities hot corner in the top left of the screen.
|
Notifications (and this whole bar) have been reworked in newer releases of GNOME, starting with 3.16. That means the easy fix is to upgrade to a newer GNOME release, and since you're on Fedora, that's easily done simply by going to a newer Fedora release. Fedora 23 is just out, and, actually, this is good timing for an upgrade, since Fedora 21 reached end-of-life status just a recently, December 1st, 2015.
| How to disable GNOME3 bottom hotbar |
1,475,704,615,000 |
How do I set the default folder order in Gnome? I'm talking about setting 'type order' as default so the folders will always be listed at the top, and other files after them.
Here is the image:
You see that everything is listed by the type, and I want this to be the default order so when I reboot, it won't reset.
|
you will be able to achieve this by opening nautilus preferences as follow:
open a nautilus window > click on "files" from top menu > preferences (as showed here)
And then from there setup the Default view. Specifically Arrange items: by type
| Default Folder Order in Gnome |
1,475,704,615,000 |
I'd like to configure Google Chrome as my default web browser on Arch Linux. I've already done the following:
Made sure I have a ~/.local/share/applications/google-chrome.desktop which has an Exec line that contains a %U
Pointed everything related to web browsing in ~/.local/share/applications/mimeapps.list to google-chrome.desktop
But still when I go to Settings -> Details -> Default Applications the "Web" dropdown menu doesn't include Google Chrome as one of the choices, and xdg-open still launches Firefox.
What am I missing here? Why doesn't Google Chrome show up in the Default Applications list?
System details:
Gnome Shell version 3.16.3
Google Chrome installed from AUR
Arch Linux
|
Not sure what the issue was, but after uninstalling Firefox and deleting the following files everything seems to be working:
~/.local/share/applications/wine*
~/.local/share/applications/defaults.list
~/.local/share/applications/mimeinfo.cache
I'm not sure if it was the uninstall of Firefox or the removal of those files that made things work... None of those files had any reference to web browsing, Firefox, or Google Chrome.
Note that I left ~/.local/share/applications/google-chrome.desktop there, so I guess that wasn't causing any problems.
| Why doesn't Google Chrome show up in the "Default Applications" list in Gnome 3? |
1,475,704,615,000 |
The machine was running Debian wheezy and was recently upgraded to Jessie. Everything has worked fine for some time. However, after a reboot today the desktop won't load.
/var/log/messages shows gnome-shell: segfault at 0 error 4 in libupower-glib.so.3.0.0
I have tried reinstalling gnome-session, gdm3, libupower.
(Sorry about the formatting, I'm on a phone.)
|
This may probably a bug, you should report it...and the solution.. Temporary install another desktop and waiting for reply, if you have ability, compile it yourself.
PS: first you can find your system installed glib version, then compile the same version of glib replace stock one, have a try...
| Desktop Fails with "Oh no! Something has gone wrong." |
1,475,704,615,000 |
I have Ubuntu 15.04 and GNOME 3.16 installed.
This PPAs are enabled:
deb http://ppa.launchpad.net/gnome3-team/gnome3-staging/ubuntu vivid main
deb http://ppa.launchpad.net/gnome3-team/gnome3/ubuntu vivid main
Interestingly, GDM runs in TTY1 and TTY7. Is there a way to fix this? I would like that GDM runs only in TTY7.
|
Based on this response, I have done the following and it works.
sudo nano /etc/gdm/gdm.conf
In this file, I added the following line.
FirstVT=7
In /etc/gdm/gdm.conf you can set what the 1st terminal should be the
graphical interface. FirstVT=7 will make GDM check tty7 first (by
the way: this could mean it ends up on tty8, tty9 if these are enabled
and tty7 is not free.
If this is inactive in /etc/gdm/gdm.conf it will probably randomly
start with tty1 and if that is active (ie. a terminal session is open)
it will pick tty2 and so on.
Source
| Why does GDM start in TTY2 and TTY7 |
1,475,704,615,000 |
OS: Kali Linux version 1.1.0
gnome version 3.4.2
Using screen, I press CTRL + a and | but nothing is being split. Only the words "No other window" appears in the bottom.
Here is other things I tried
CTRL + a and capital S
CTRL + a and b
CTRL + a and c
CTRL + a and | (Pipe key)
none of the above fixed it for me
What am I doing wrong?
|
Try, in sequence:
CTRL+a, | # create a new pane
CTRL+a, <TAB> # goto the new pane
CTRL+a, c # start a new shell in the pane
| can't split terminal using screen |
1,475,704,615,000 |
Is there a way in Gnome Shell to define a shortcut that will bring up the Overview such that the Workspace List is already showing and available for clicking -- similar to the viewport selector in Compiz?
Note: I'm using Gnome's terminology for this question.
I have recently (been forcibly) migrated to Gnome 3/Gnome Shell on RHEL7 (from Gnome 2/Compiz on Ubuntu 10). As I can't function without 9 virtual workspaces in a 3x3 layout, the loss of Gnome Panel and Gnome Workspace Switcher has been painful.
However, I've found a number of Extensions/tools that have made the experience tolerable. These include
Workspace Grid, which transforms the Workspace List into a 2-D grid (both conceptually and in the Workspace List overlay)
dconf-editor, which reveals that keyboard shortcuts can be assigned for instantaneous switching to up to 12 workspaces
All I'm missing now is a quick way to view all of my workspaces at once (a la Compiz) and select any of them with my mouse. (Yes, I can switch to any workspace I want with the keyboard, but sometimes I prefer to use the mouse.)
My current approach is to either
bring up the Overview in Windows mode using the "hot corner" or the shortcut org.gnome.desktop.wm.keybindings.panel-main-menu and then move my mouse to the right edge of the screen to un-hide the Workspace List, or
bring up the Overview in Applications mode using shortcut org.gnome.shell.keybindings.toggle-application-view and then hit Esc to reveal both the Windows and Workspace List overlays.
Both of these approaches require more key presses and/or mouse movement than was necessary with Compiz. I did find two other Extensions that almost do what I need:
WorkspaceBar, which adds a clickable 1-D workspace selector (but no overview, although the bar does behave like an additional "hot corner")
Frippery Bottom Panel, which adds a quasi-2-D workspace selector (but the interface is actually clumsier to use than that of WorkspaceBar, and again no overview)
Any suggestions on how to go straight to the Workspace List overlay?
|
I have found a solution to my problem.
I don't know the default behavior of the Overview w/o extensions (because I installed the Workspace Grid extension almost immediately), but it turns out that my experience is not the default behavior with Workspace Grid installed. Indeed, the Workspace List is supposed to appear as soon as the Overview is brought up, but there is a configuration option that hides it under certain conditions. The configs in question are explained here:
Workspaces thumbnails sidebar in overview.
This sidebar can get pretty wide if you have multiple columns of
workspaces. The sidebar can be collapse to the side of the screen if it
becomes too wide so that you then hover your mouse over it to uncollapse it.
The relevant settings:
the maximum width the sidebar is allowed to occupy (as a fraction
of screen width):
const MAX_SCREEN_HFRACTION = 0.8;
the width at which the sidebar collapses to the side when you open
the overview (fraction of screen width):
const MAX_SCREEN_HFRACTION_BEFORE_COLLAPSE = 0.3;
So all I needed to do was set the latter value to a much higher fraction (say, .6), and now the Workspace List appears by default when I bring up the Overview.
| Gnome Shell shortcut directly to Workspace List overlay? |
1,475,704,615,000 |
I'm using Centos 7.
gnome-shell --version
Gnome Shell 3.8.4
does this mean I'm using Gnome 3.8.4?
can I upgrade to Gnome 3.10?
Are there any how-tos?
|
Q1: does this mean I'm using Gnome 3.8.4?
Yes you're using GNOME 3.8.4 from that gnome-shell output.
Q2: can I upgrade to Gnome 3.10?
Yes but I've found no repositories that offer it as of yet so your only recourse is to compile it yourself from sources. You can make this a little less painful by trying to use the source RPMS (SRPMS) from a Fedora release that offers it, that's close to CentOS 7. F19 + F20 would be good candidates.
I'll warn you though that this can be trick to do yourself, so I'd probably not attempt it myself.
Q3: Are there any how-tos?
None that I was able to find. It's typically the case that you're picking CentOS because you want ultra stability. The cost of this stability is that you lag behind in versions.
If you truly want to use GNOME 3.10 then you're much better off moving to one of the Fedora releases, specifically F20 or F21.
| Gnome 3.8.4 can I upgrade to Gnome 3.10? |
1,475,704,615,000 |
I noticed an almost half a centimeter thick transparent bar on the bottom of my screen, which is there on top of every other window, and doesn't seem to be interacting with anything, or the mouse. Also, when I try to take a screenshot, it's not in the screenshot.
This is how it looks like, and I'm not really sure how to start diagnosing it.
|
So after talking to Gnome developers here, turns out one can investigate this the the "looking glass", which you can get by pressing alt+f2, and then lg.
Then you click on the target icon on the top left of that panel, and choose the gray transparent area, if it selects it, then it's an application, if not, it's something lower level.
In my case, it selects whatever's behind it, and therefore I guess it's a monitor issue. I'll replace the monitor and hopefully it's fixed.
| Gnome3 v40 transparent bar on the buttom |
1,475,704,615,000 |
I have currently arch linux installed with Gnome 3.38.3. With Psensors, I am unable to show the temperature in the system tray. In the settings of psensor, there is application indicator, from where we can choose what to show in the system tray. But that section is greyed out for me. Hence I am unable to choose it.
Are there any dependencies that I might be missing.
I have installed psensor, lm_sensor, hddtemp, sensors-applet pacakges. Are there any more packages to install.
|
I was unable to show the Psensor readings. But I was able to find a substitute for it. It is a gnome shell extension called Vitals. Over there numerous statistics can be displayed in the system tray.
I personally use temperature, ram usage, CPU usage.
| Unable to show psensor readings in system tray Arch, Gnome 3.38 |
1,475,704,615,000 |
When configuring reportbug, I have an option to store the password for the remote smtp service in $HOME/.reportbugrc. How can I make it use an existing password stored by GNOME Web (Epiphany) or Evolution in GNOME keyring instead, so that I do not need to update $HOME/.reportbugrc if the password in GNOME keyring changes?
I found that I can read the password from GNOME keyring with secret-tools command, which is provided by libsecret-tools package, and use command substitution with $(…) to invoke secret-tools and use its output like this:
$ reportbug --smtppasswd=$(secret-tool lookup uri https://webmail.example.invalid)
or this:
$ reportbug --smtppasswd=$(secret-tool lookup target_origin https://webmail.example.invalid username [email protected])
Unfortunately, reportbug does not seem to perform substitution in ~/.reportbugrc. I tried like this:
smtppasswd "$(secret-tool lookup target_origin https://webmail.example.invalid username [email protected])"
Is there a workaround to this?
|
Ended up defining an alias in ~\.bash_aliases.
alias reportbug-pass='reportbug --smtppasswd="$(secret-tool lookup eds-origin evolution-data-server e-source-uid 7f1e149e069bd66ab5aa1a734baa113943cdf0ee)"'
Using that alias instead of calling reportbug directly invokes reportbug with --smtppasswd already passed to it. Now, if I want to pass my SMTP password to reportbug, I can type that alias instead. You can pass other parameters to it, like the name of the package reported, as you would to reportbug.
$ reportbug-pass
Instead of an alias, the same result can be achieved by defining a function in ~\.bash_aliases
function reportbug-pass() {
reportbug --smtppasswd="$(secret-tool lookup eds-origin evolution-data-server e-source-uid pdljjhvbuo6uvc7mydavpmbjqqhxqq2jyhqdndpmcvamknbih8cifgfg)" "$@"
}
In this function, the "$@" parameter expends to arguments passed to it, so that you could pass the name of the package, for example.
In this case, whether it is an alias or a function, the query against the keyring happens when you call it from the command line. If the keyring is locked, you get a usual graphical prompt to unlock the keyring.
| How to configure reportbug to use smtp password from gnome-keyring? |
1,475,704,615,000 |
I am setting up a new system that is running CentOS 7 and Gnome 3.28.2. I've used CentOS from the command line before but this is my first time using Gnome.
I have found that Gnome does not seem to remember the password for my Network-Attached Storage. When I connect to my NAS, Gnome asks me for the user name and password. I check the box to save the credentials, but Gnome doesn't actually remember them and asks me again the next time I boot the system and connect to the NAS.
I have verified that gnome-keyring and seahorse are installed.
Why else might Gnome be forgetting the credentials? Is there something else I need to install?
|
I figured out a solution. Originally I was reconnecting to the NAS by going to Files > Other Locations > Connect to Server. This always asks for my credentials, even if I check the box to remember them. I got around this by bookmarking the shared folder on the NAS. If I click on the bookmark in Files, it connects and opens the folder immediately without asking for my credentials.
| NAS password not saved in Gnome / CentOS 7 |
1,475,704,615,000 |
I'm making some shortcuts to games I would normally run via terminal. For instance,
UT2004:
cd "$HOME/Unreal Tournament 2004/System/"
./ut2004-bin-linux-amd64
My work so far:
[Desktop Entry]
Encoding=UTF-8
Version=1.0
Type=Application
Terminal=true
Path=/home/nick/Unreal Tournament 2004/System/
Exec="/home/nick/Unreal Tournament 2004/System/ut2004-bin-linux-amd64"
Name=UT2004
Icon=/home/nick/Unreal Tournament 2004/Help/UT2004Logo.png
Unlike Unreal, EDuke32 actually runs, however I can tell it does so in $HOME, and starts littering it with log files. UT2004 doesn't start with the .desktop file at all. I figure, both of these problems could be solved if there was a way to specify the starting path for each application. Unfortunately, I cannot cd ... && ./... in the .desktop files.
How can I specify the "working directory" for each of these shortcuts?
|
The way I worked this out was to have a start-up script that changes to the correct directory and then starts the game.
startup.sh :
#!/bin/bash
cd /path/to/game
game
cd "OLDPWD"
And then in the .desktop file use :
Exec=/bin/bash /path/to/startup.sh
| GNOME ".desktop" shortcut: Specify Start-In path |
1,475,704,615,000 |
form terminal, when I try to run a .jar-file I receive:
$ java -jar ./RemoteDroidServer/RemoteDroidServer.jar
Exception in thread "main" java.awt.HeadlessException
at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:204)
at java.awt.Window.<init>(Window.java:536)
at java.awt.Frame.<init>(Frame.java:420)
at java.awt.Frame.<init>(Frame.java:385)
at AppFrame.<init>(AppFrame.java:42)
at RemoteDroidServer.main(RemoteDroidServer.java:16)
$
under Devian with LX Desktop Environment the same file runs without problem:
$ java -jar ./RemoteDroidServer/RemoteDroidServer.jar
Linux
System-info
$ uname -a
Linux fedora 5.5.10-200.fc31.x86_64 #1 SMP Wed Mar 18 14:21:38 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
relevant packages installed
# rpm -qa | grep -a "jdk"
java-1.8.0-openjdk-headless-1.8.0.242.b08-0.fc31.x86_64
copy-jdk-configs-3.7-4.fc31.noarch
java-latest-openjdk-13.0.2.8-1.rolling.fc31.x86_64
java-11-openjdk-headless-11.0.6.10-0.fc31.x86_64
java-11-openjdk-11.0.6.10-0.fc31.x86_64
java-latest-openjdk-headless-13.0.2.8-1.rolling.fc31.x86_64
# rpm -qa | grep -a "java"
java-1.8.0-openjdk-headless-1.8.0.242.b08-0.fc31.x86_64
javapackages-filesystem-5.3.0-6.fc31.noarch
abrt-java-connector-1.1.4-1.fc31.x86_64
java-latest-openjdk-13.0.2.8-1.rolling.fc31.x86_64
tzdata-java-2019c-2.fc31.noarch
java-11-openjdk-headless-11.0.6.10-0.fc31.x86_64
java-11-openjdk-11.0.6.10-0.fc31.x86_64
java-latest-openjdk-headless-13.0.2.8-1.rolling.fc31.x86_64
RemoteDroidServer on GitHub and GoogleCode:
https://github.com/alrusdi/remotedroid/tree/master/RemoteDroidServer/src
https://github.com/attilla/remotedroid/tree/master/RemoteDroidServer
https://code.google.com/archive/p/remotedroid/
Update based on comments
# java -version
openjdk version "1.8.0_242"
OpenJDK Runtime Environment (build 1.8.0_242-b08)
OpenJDK 64-Bit Server VM (build 25.242-b08, mixed mode)
# cd RemoteDroidServer/ && java -jar RemoteDroidServer.jar
Exception in thread "main" java.awt.HeadlessException
at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:204)
at java.awt.Window.<init>(Window.java:536)
at java.awt.Frame.<init>(Frame.java:420)
at java.awt.Frame.<init>(Frame.java:385)
at AppFrame.<init>(AppFrame.java:42)
at RemoteDroidServer.main(RemoteDroidServer.java:16)
Newest Update
I decided to try KDE-Plasma for other reasons and to my surprise, the .jar-Program works with this DE!!
|
I had the same problem with the AWT-library on a Mobian-LXDE-System (https://wiki.mobian-project.org/doku.php?id=desktopenvironments#lxde). The solution was as simple as installing the default-jre package.
Credits go to:
https://stackoverflow.com/questions/5241850/running-java-gui-applications-through-a-linux-terminal/5242043#5242043
I have not had the chance to test on fedora-GNOME.
UPDATE
the problem seems to have disapperes in the meanwhile thorough dnf update on my fedora-GNOME or it was solved by a KDE-Plasma-5-related package that was installed/updated by having two desktop environments.
| .jar-file fails to start on fedora gnome3 |
1,475,704,615,000 |
The Battery indicator icon is not visible in the top panel.
I am running Fedora 30 with GNOME.
I tried restarting upower but it failed.
$ sudo systemctl restart upower
Job for upower.service failed because the control process exited with error code.
See "systemctl status upower.service" and "journalctl -xe" for details.
$ systemctl status upower.service
● upower.service - Daemon for power management
Loaded: loaded (/usr/lib/systemd/system/upower.service; disabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Wed 2019-06-12 20:10:41 IST; 10s ago
Docs: man:upowerd(8)
Process: 11765 ExecStart=/usr/libexec/upowerd (code=exited, status=226/NAMESPACE)
Main PID: 11765 (code=exited, status=226/NAMESPACE)
Jun 12 20:10:41 localhost.localdomain systemd[1]: upower.service: Service RestartSec=100ms expired, scheduling restart.
Jun 12 20:10:41 localhost.localdomain systemd[1]: upower.service: Scheduled restart job, restart counter is at 5.
Jun 12 20:10:41 localhost.localdomain systemd[1]: Stopped Daemon for power management.
Jun 12 20:10:41 localhost.localdomain systemd[1]: upower.service: Start request repeated too quickly.
Jun 12 20:10:41 localhost.localdomain systemd[1]: upower.service: Failed with result 'exit-code'.
Jun 12 20:10:41 localhost.localdomain systemd[1]: Failed to start Daemon for power management.
Jun 12 20:10:44 localhost.localdomain systemd[1]: upower.service: Start request repeated too quickly.
Jun 12 20:10:44 localhost.localdomain systemd[1]: upower.service: Failed with result 'exit-code'.
Jun 12 20:10:44 localhost.localdomain systemd[1]: Failed to start Daemon for power management.
UPD1:
journalctl -xe
-- Automatic restarting of the unit upower.service has been scheduled, as the result for
-- the configured Restart= setting for the unit.
Jun 13 08:44:23 localhost.localdomain systemd[1]: Stopped Daemon for power management.
-- Subject: A stop job for unit upower.service has finished
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- A stop job for unit upower.service has finished.
--
-- The job identifier is 4358 and the job result is done.
Jun 13 08:44:23 localhost.localdomain audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=upower comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=suc>
Jun 13 08:44:23 localhost.localdomain audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=upower comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=succ>
Jun 13 08:44:23 localhost.localdomain systemd[1]: Starting Daemon for power management...
-- Subject: A start job for unit upower.service has begun execution
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- A start job for unit upower.service has begun execution.
--
-- The job identifier is 4358.
Jun 13 08:44:23 localhost.localdomain audit[6540]: AVC avc: denied { remount } for pid=6540 comm="(upowerd)" scontext=system_u:system_r:init_t:s0 tcontext=system_u:object_r:snappy_snap_t:s0 tclass=filesystem permissive=0
Jun 13 08:44:23 localhost.localdomain systemd[6540]: upower.service: Failed to set up mount namespacing: Permission denied
Jun 13 08:44:23 localhost.localdomain systemd[6540]: upower.service: Failed at step NAMESPACE spawning /usr/libexec/upowerd: Permission denied
-- Subject: Process /usr/libexec/upowerd could not be executed
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- The process /usr/libexec/upowerd could not be executed and failed.
--
-- The error number returned by this process is ERRNO.
Jun 13 08:44:23 localhost.localdomain systemd[1]: upower.service: Main process exited, code=exited, status=226/NAMESPACE
-- Subject: Unit process exited
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- An ExecStart= process belonging to unit upower.service has exited.
--
-- The process' exit code is 'exited' and its exit status is 226.
Jun 13 08:44:23 localhost.localdomain systemd[1]: upower.service: Failed with result 'exit-code'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- The unit upower.service has entered the 'failed' state with result 'exit-code'.
Jun 13 08:44:23 localhost.localdomain systemd[1]: Failed to start Daemon for power management.
-- Subject: A start job for unit upower.service has failed
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- A start job for unit upower.service has finished with a failure.
|
The problem is caused by the issue described here. https://bugzilla.redhat.com/show_bug.cgi?id=1708991
Due to snapd and ``SELinux``` issues. Updating your system should fix it now.
| Fedora - Battery indicator fails to display in top left panel |
1,545,052,371,000 |
In GNOME 3 when I copy some text to clipboard from an application and then exit from that application, the clipboard doesn't hold the copied text (the clipboard is empty). My question is as follows:
How do I make GNOME 3 to not remove the contents of the clipboard when the application I copied text from exits?
|
The problem indicated in the question is so called "Clipboard Persistence bug", which is described, for example, in Ubuntu Wiki.
The best workaround for Gnome 3 is to install Clipboard Indicator Gnome extension which is available at the following link: Clipboard Indicator.
If you're on Ubuntu, pay your attention that since Ubuntu 18.04 version its users can install Gnome Extensions directly from Ubuntu Software Center by typing in search field of the app phrase: "Gnome extensions ", for example:
| Preserve contents of clipboard when a programs from text from copied exits |
1,545,052,371,000 |
I installed ArchLinux with the gnome desktop (but only the minimal packages) So far I tried gnome-software and gnome-applets while gnome-contorol-center and gnome-settings-deamon are installed. Thunderbolt is working (at leat the thunderbolt dock works with my thinkpad T580 but only when I turn off thunderbolt security in BIOS)
This still does not give me the functionality to see the gnome thunderbolt entry in the gnome control center.
Which package contains the functionality of gnome to configure thunderbolt through the gnome control center ?
|
As pointed out by @don_crissti the feature to configure thunderbolt security levels through the gnome-control-center will only be available in verion 3.30 (with the exception of fedora who backported this feature for fedora 28).
The underlying system deamon boltd and the command line tool are however already available on the gitlab side of freedesktop.org.
Update :
Bolt is now in the Arch Linux community repository.
(I can confirm that boltctl works with the lenovo T580 and the thunderbolt3 docking station.)
| Which package contains the functionality of gnome to configure thunderbolt through the gnome control center under ArchLinux? |
1,545,052,371,000 |
I use my machine (GNOME desktop) on my home wifi, at public wifi locations and with no wifi connection.
How can I set up a trigger so that as soon as my machine connects to the internet, it establishes my default VPN connection? In other words:
as soon as I connect to my home wifi
as soon as I connect to a public access point
as soon as I log into a captive portal (at a public access point)
If it's possible to make the VPN connection permanently active but somehow "inert" when offline, that's also great.
|
First, make sure your VPN password field is set to "Store the password for all users". This workaround is required even on a single-user system. (See related bug.)
Then, rather than using the GNOME system menu (in the top right corner) to edit your network settings, launch the nm-connection-editor GUI as follows:
From the command line: nm-connection-editor &
You will be given a list of all network connections, including your wifi and VPN connections.
Open any wifi connection and navigate to the General tab.
You will see the following option: "Automatically connect to VPN when using this connection".
Tick that option, and select your VPN from the associated dropdown.
Click "Save".
Repeat for every wifi connection that requires an automatic VPN connection. The next time you connect using one of these wifi connections, a VPN connection will be established at the same time.
Note: Some public access points require you to first log in via a captive portal. An automatic VPN attempt will fail, because you need to log into the portal first.
| Can I trigger VPN connection based on online status? |
1,545,052,371,000 |
For my grandparents' desktop, I need to show the generic names for apps in the activities menu and panel. I am using gnome 3. Is there a way to do this, maybe in gsettings?
|
You can use Menu Editor - menulibre. Works on more than GNOME.
| app Generic Names in Gnome 3 panel and menu |
1,545,052,371,000 |
I have noticed that the Debian Desktop icons burn through i.e. show up on the screen when they should not in some dynamic cases
Assistive technology On Screen Keyboard On
Debian reportbug active while moving mouse on top of terminal links
I will add here a screenshot if I manage to capture one while the effect is occurring.
Problem: artefacts occurring in graphical interface when interaction with the mouse
Differential condition: hardware problem, motherboard etc.
OS: Debian 9.1
Window manager: Gnome 3.22 on X11
|
I keep getting those artifacts long time.
Their amount decreased to none after changing Gnome start with Wayland instead of X11.
So I think conflicts of X11 with the processes caused those artifacts, indicating a software problem, not a hardware problem.
| Why Debian 9.1 Desktop Icons burn through in Gnome 3.22 on X11? |
1,545,052,371,000 |
I just installed arch on a encrypted LVM.
After the boot process gnome3 tries to start but it looks like I installed the wrong driver. The whole system freezes, its not possible to enter another tty.
Is there a way to prevent the gui from starting direct after the boot process?
I used sudo systemctl enable gdm.services to define the start of the gui.
|
The arch installation media should help you here. Boot into it and follow the directions to mount your encrypted drive and then arch-chroot into the system. Once you are in, you could disable gdm.services. Alternatively, you could install the proper drivers. To be sure that the driver is the problem, you might want to check your logs while you're in there.
| Arch - prevent GUI from start |
1,545,052,371,000 |
Today, I upgraded from Gnome 3.18 to 3.20 and started experiencing some strange graphical issues when changing focus from one application to another, either by alt-tab or clicking the new window with the mouse. So far, I have only seen this issue with gnome-apps (those that have the gnome-specific headerbar, such as Nautilus and gedit), and not with other apps (such as gnome-terminal and Firefox).
The specific graphical glitch varies a bit depending on which program is focused. I uploaded a video, documenting the behavior. It looks like the Nautilus and gEdit windows are trying to resize and switch to black, while the gnome tweak tool window actually resizes as it loses or gains focus. In contrast, the gnome calculator is not affected.
I had disabled all extensions and removed my ~/.config/gtk-3.0/gtk.css, when recording the video. I am on Antergos (an Arch derivative), with kernel 4.5.0-1-ARCH. My machine is a ThinkPad Yoga 12 second edition laptop, with an Intel HD Graphics 5500 (Broadwell GT2) graphics card and the following graphic packages installed.
xf86-video
extra/xf86-video-fbdev 0.4.4-5 (xorg-drivers xorg) [installed]
extra/xf86-video-intel 1:2.99.917+560+gd167280-1 (xorg-drivers xorg) [installed]
extra/xf86-video-vesa 2.3.4-2 (xorg-drivers xorg) [installed]
libva
extra/libva 1.7.0-1 [installed]
extra/libva-intel-driver 1.7.0-1 [installed]
Mesa
extra/glu 9.0.0-4 [installed]
extra/libtxc_dxtn 1.0.1-6 [installed]
extra/mesa 11.2.0-1 [installed]
extra/mesa-libgl 11.2.0-1 [installed]
extra/mesa-vdpau 11.2.0-1 [installed]
multilib/lib32-glu 9.0.0-3 [installed]
multilib/lib32-libtxc_dxtn 1.0.1-5 [installed]
multilib/lib32-mesa 11.2.0-1 [installed]
multilib/lib32-mesa-libgl 11.2.0-1 [installed]
Any advice on what could be the cause of these glitches and how I can fix them?
Update 2016-04-18
Apparently, in addition to disabling the usertheme addon, I needed to select Adwaita as the GTK+ theme in order to get the default gnome behavior. The issue goes away when doing this, so it seems to be a problem unique to the Numix Frost and Numix Frost Light themes, that Antergos use by default. So at least I can work around this by using another theme for now.
|
Turns out this is a bug in the Numix themes and it is being tracked here.
| Gnome 3.20 graphical glitches when switching applications |
1,545,052,371,000 |
I work under Debian Testing with Gnome shell 3.14.2 on a Lenovo
Thinkpad X1 Carbon (3rd gen.). I would like to create a custom
'screenshot' command based on scrot:
scrot -s -b '%Y-%m-%d_%H:%M:%S_screenshot.png' -e 'mv $f ~/Myfolder'
I put this line in a file .scrot.sh and created the Shortcut
command via /bin/sh ~/scrot.sh. Furthermore, I uses "Print" as
the triggering shortcut (so simply pressing PrtScn). However, no
screenshot is produced. Why? And how can this be fixed?
|
... the bug behind is pretty bad... I found this post which links to enter link description here. To make it short, the command is indeed /bin/sh /path/to/script where script is a shell script containing
scrot -s -b '%Y-%m-%d_%H:%M:%S_screenshot.png' -e 'mv $f /home/$USER/Myfolder'
... but assigning this to a shortcut via Settings -> Keyboard -> Shortcuts -> Custom Shortcuts did not work because of a bug in scrot (?); see the above links. A workaround was to add sleep 1; right before scrot.... So this works for now. Pretty bad hack, though.
| How to define a custom screenshot in Gnome 3 and to assign it to a keyboard shortcut? |
1,545,052,371,000 |
I want to add command scrot -s as custom shortcuts via gnome-control-center keyboard. The accelerator key was Super+S.
but it didn't works.
If i remove -s or try other interactive command like xkill, they works fine.
Also, scrot -e 'mv $f ~/Pictures/scrot/' is works fine too.
So my question, why scrot -s didn't work and how can i fix it.
My distro is fedora 21, gnome version is 3.14.2, and scrot version 0.8
[UPDATE] gnome-screenshot -a is failed too.
[UPDATE 2] The default shortcut "Save a screenshot of an area to Pictures" is working fine, but i'm still curious why it didn't work when i set it to custom shortcuts.
[UPDATE 3]
The following is the error log results from custom shortcut command strace -v -s 1000000 -o /tmp/gnomescr.log gnome-screenshot -a:
$ grep -ni CRITICAL /tmp/gnomescr.log
2660:write(2, "\n(gnome-screenshot:8700): Gdk-CRITICAL **: gdk_pixbuf_get_from_surface: assertion 'width > 0 && height > 0' failed\n", 115) = 115
2686:write(2, "\n(gnome-screenshot:8700): Gtk-CRITICAL **: gtk_window_resize: assertion 'width > 0' failed\n", 91) = 91
2748:write(2, "\n** (gnome-screenshot:8700): CRITICAL **: Unable to capture a screenshot of any window\n", 87) = 87
$
|
First, i tried strace parent processes like systemd and Xorg.bin, but i'm new to strace so i can't figure out.
Then i thought it might related to permission issue (su -, sudo, ...etc). So i plan to press the shortcut key as root. So i quickly realized i can use sudo xdotool key Super+s to test it. Then what's surprising me it just works!
So i try xdotool key Super+s without sudo and it still works. So i concluded that xdotool key Super+s is working fine, but still i can't figure out what's the difference between xdotool and key pressed from the strace log.
Then i come out an idea what if i put xdotool key Super+s as a custom shortcut ? So i created a new custom shortcut Super+J and bind to command xdotool key Super+s, in which Super+s already bind to command scrot -s. And it just works when i press Super+j
I tested gnome-screenshot -a and scrot -s and both works like a charm.
[UPDATE] I found this link, Issue 476: Xmonad should release key binding before spawning:
Reported by [email protected], Sep 18, 2011
Using scrot here to take screen shots. Scrot grabs the keyboard to
listen for a keypress as a signal to abort. If the keyboard is not
avaiable, it dies with error:
giblib error: couldn't grab keyboard:Resource temporarily
unavailable
To test:
bind "scrot -s > /tmp/logfile" to a keypress in xmonad.hs
Activate keypress, nothing happens.
Check logfile, find error stated above.
I think it's a race condition because binding to "sleep 0.2; scrot -s"
works here. The real problem is that xmonad is unnecessarily hanging
on to keyboard and the spawned app is expecting it.
What version of the product are you using? On what operating system?
0.9.2/slackware linux
He use sleep to solve the similar problem. I tested it and it works. But I've to put it inside a shell script because custom command doesn't seems to support && or ; for concatenating multiple commands. But the time period of sleep 0.2 sometime doesn't work for me. The safe way is of course increase to sleep 0.5-1 second.
| how to create custom shortcuts for scrot and gnome-screenshot interactive mode |
1,545,052,371,000 |
I am a new Fedora 20 64-bit user and I used Gnome Tweak Tool to customize the appearance of the UI. However, I was not able to get the active application from the top bar. I am providing a screenshot to visualize the situation, Google Chrome is the active application and it is shown in the upper bar, I want that entry to disappear if possible since I already have a bottom bar populated with open applications. How can I do that?
|
The shell extension TaskBar proved useful in my case, it can be accessed via this link. In order to disable the active application icon I went into the preferences of this shell extension then under the Misc tab I switched the slider to on next to the Hide Default App Menu. I do not know if this is the expected effect of this setting but I achieved the desired effect. You may wish to look at the screenshot below:
| Fedora 20 Gnome 3 DE upper bar |
1,545,052,371,000 |
So, somehow I accidentally upgraded to Gnome 3.8 (Don't ask me how, I have no idea). And after a reboot, none of my peripheral devices or interfaces are working. The built in mouse and keyboard do not respond and I have to unplug and replug them before I get any response. Additionally, my realtek ethernet controller is not visible in the network settings window, even though it is listed in /etc/network/interfaces. Also, when using the debian install disk for recovery, all hardware is detected without a problem.
I've searched for an answer for days but I've come up short, and I unfortunately don't know enough about Linux to do much more than examine things. Any help you could provide with be extremely appreciated.
|
This sounds like a partial/incomplete dist-upgrade that has left the kernel and kernel-modules out-of-sync. Look at the output of uname -a (uname -r for just the kernel rev) and the modules in /lib/modules/$(uname -r) lsmod should show various modules are loaded. dmesg might show why they aren't loading.
An interface won't show in NM if it's not actually there -- eth0 won't show if there's no driver loaded for it. Or there could be miscommumication among the millions of behind-the-scenes bits of NM and the rest of the gnome desktop.
| Debian Squeeze not detecting any hardware after Gnome 3.8 upgrade |
1,545,052,371,000 |
Just upgraded from Debian "Squeezy" to "Wheezy". When I logged in the menus were fancier as I expected with Gnome Display Manager 3.
However the issue that occurred was the duplicate UI-elements. The UI-elements such as "Applications", "Places", the Clock and so forth had two instances each.
What I've tried so far:
Though it had something to do with me having a two monitor setup so I
ran nvidia-settings and reconfigured /etc/X11/xorg.conf.
However as I rebooted the UI elements had increased and now there
were three instances. I think this number increases with each reboot...
Tried to manually rewrite the xorg.conf by saving in my home folder
and then pushing it into `/etc/X11/xorg.conf
Renaming ~/.gnome2 to ~/gnome2_backup
Why do I get the duplicate menus and is there a way to remove them/make them not appear after each reboot?
My xorg.conf file:
# nvidia-settings: X configuration file generated by nvidia-settings
# nvidia-settings: version 304.88 (pbuilder@cake) Wed Apr 3 08:58:25 UTC 2013
Section "ServerLayout"
Identifier "Layout0"
Screen 0 "Screen0" 0 0
Screen 1 "Screen1" 1920 0
InputDevice "Keyboard0" "CoreKeyboard"
InputDevice "Mouse0" "CorePointer"
Option "Xinerama" "1"
EndSection
Section "Files"
EndSection
Section "InputDevice"
# generated from default
Identifier "Mouse0"
Driver "mouse"
Option "Protocol" "auto"
Option "Device" "/dev/psaux"
Option "Emulate3Buttons" "no"
Option "ZAxisMapping" "4 5"
EndSection
Section "InputDevice"
# generated from default
Identifier "Keyboard0"
Driver "kbd"
EndSection
Section "Monitor"
# HorizSync source: edid, VertRefresh source: edid
Identifier "Monitor0"
VendorName "Unknown"
ModelName "DELL S2740L"
HorizSync 30.0 - 83.0
VertRefresh 56.0 - 76.0
Option "DPMS"
EndSection
Section "Monitor"
# HorizSync source: edid, VertRefresh source: edid
Identifier "Monitor1"
VendorName "Unknown"
ModelName "Samsung SMBX2440"
HorizSync 30.0 - 81.0
VertRefresh 56.0 - 75.0
Option "DPMS"
EndSection
Section "Device"
Identifier "Device0"
Driver "nvidia"
VendorName "NVIDIA Corporation"
BoardName "GeForce GT 430"
BusID "PCI:1:0:0"
Screen 0
EndSection
Section "Device"
Identifier "Device1"
Driver "nvidia"
VendorName "NVIDIA Corporation"
BoardName "GeForce GT 430"
BusID "PCI:1:0:0"
Screen 1
EndSection
Section "Screen"
Identifier "Screen0"
Device "Device0"
Monitor "Monitor0"
DefaultDepth 24
Option "Stereo" "0"
Option "metamodes" "DFP: nvidia-auto-select +0+0"
SubSection "Display"
Depth 24
EndSubSection
EndSection
Section "Screen"
Identifier "Screen1"
Device "Device1"
Monitor "Monitor1"
DefaultDepth 24
Option "Stereo" "0"
Option "nvidiaXineramaInfoOrder" "CRT-1"
Option "metamodes" "CRT: nvidia-auto-select +0+0"
SubSection "Display"
Depth 24
EndSubSection
EndSection
Section "Extensions"
Option "Composite" "Disable"
EndSection
|
It was some spooky settings or cached data from Gnome 2 that was messing with the interface. I saved the important files to an external drive and emptied the home folder, (including .*-files).
| Gnome 3 UI menus are duplicated |
1,386,256,220,000 |
I got the following problem:
Well, just installed Fedora 19 alongside to my Debian installation. While GNOME Shell is working perfectly fine when running with Debian, there are some strange display errors (e.g. coloured backgrounds of icons; when opening the dash (where all installed applications are listed) the background not only darkens but turns completely black).
Some information about the actual machine running now Fedora 19:
CPU: AMD Athlon 5050e, GPU: nVidia 7800GT (128 MB GFX RAM), RAM: 2 GB
(I assume this is all information that's necessary, if not, please ask in the comments).
Has anyone any ideas on how to fix this?
|
For this card, i should think is nouveau driver. Try the propertary driver in the nvidia page.
| How to fix display error with GNOME Shell on Fedora 19? |
1,386,256,220,000 |
I get an error trying to add a printer on Debian Wheezy that FirewallD is not running. I am trying to add a remote printer. There is no firewall on this computer, iptables blocks nothing, and there is no firewalld in the apt repository. Also system-config-printer, which apparently can work around this, is also no longer in apt-get.
|
There was a mirroring error for the Australian Debian Mirror, I only just spotted the md5 checksum error on apt-get update. Using the main debian site worked, and I now have system-config-printer.
| Adding printer from Gnome 3 on Debian Wheezy, Firewalld not running |
1,386,256,220,000 |
I have been an avid user of RSSOwl & now have ported mine OS to Fedora 18. Everything works fine including the transfer of .rssowl2 (backup folder) to new Fedora. However when minimised or exited to tray tray icon is missing...
notifications are OK I too can right-click tray icon...
/* Details Added */
RssOwl can be downloaded as a zip file. it has a got a binary & an xpm file...You just execute binary (I symlinked it to /bin) & app starts so I manually created .desktop file:
[Desktop Entry]
Categories=Network;
Exec=rssowl
Icon=/home/usama/Programs/rssowl/RSSOwl.png
Name=RSSOwl
Terminal=false
Type=Application
I converted that .xpm file to .png to be used as desktop icon. Now I copied RSSOwl.png to /usr/share/pixmaps with no success & when copied RSSOwl.png to /usr/share/icons/gnome/24x24/apps well success happened but very tiny icon :(
|
I'm not familiar with that app, but I know that means your icon theme doesn't have the required icon, i.e apps/24/XX.png,
A stupid solution is copy it from somewhere, i.e check the Icon= line in /usr/share/applications/XX.desktop, and copy it to your theme dir.
P.S does the app icon show correctly when you search for the app?
| Tray Icon Missing Rssowl Fedora 18 |
1,386,256,220,000 |
I have been using Linux Mint 12 with Gnome 3 and I'm very happy with it except about the fact that it get very slow software updates, hoping that Linux Mint 13 will have Gnome 3.4 and Linux kernel 3.2 shall wait for it?
Or shall I install Debian based Linux Mint which gets rolling updates?
What would be a better option?
|
If you can't afford to live with the risks of a rolling release distro (sometimes things will break and updates won't be smooth - this from my experience with Arch), wait for Mint 13.
Otherwise, the Debian-based Mint should be OK.
| Wait for Linux Mint 13 or install Linux Mint Debian version? |
1,386,256,220,000 |
I've just installed Arch and I have installed gnome, but when I type startx I have the following problem
waiting for X server to shut down Server terminated successfully (0). Closing log file.c: xterm: not found /etc/x11/xinit/xinitrc: line 55: xterm: command not found
What should I do?
|
If you have created a ~/.xinitrc then there's no way that startx should be pointing to /etc/X11/xinit/xinitrc since this is the system-wide file.
All .xinitrc basically is, is a shell script which starts desired clients according to the user's preference. The clients placed in this file will all be ran in the background.
Make sure that you've actually put the . in front of the .xinitrc file and it is in fact in $HOME. If you forgot the . then the file will be viewable from simply performing ls $HOME the . symbolizes a hidden file then you would need ls -a $HOME to view the file.
But, I can assure you there is no way the file is created and in the correct location if startx is pointing to the global file.
| Desktop Manager doesn't start with xorg |
1,386,256,220,000 |
In Gnome 3.14 On Line Account Settings, if I add a Google account, under "use this account for" I can switch Documents on/off.
This in my understanding should synchronize my documents with my Google Drive. So I would expect to see some folder like "Google Drive" on Nautilus showing my Google Drive contents. But I can't see anything like that.
Is my understanding wrong or do I need any extra packages for that?
I'm on Arc Linix.
Thanks!
|
The 'documents' app in gnome is supposed to sync with online resources (google docs, ownCloud, oneDrive). I don't have 3.14, but in 3.10 the application is seriously slow and sucktastic. It's totally useless.
https://help.gnome.org/users/gnome-documents/stable/
| GNOME 3.14 and Google Drive integration |
1,386,256,220,000 |
I love the UI of GNOME 3. I tried it in Fedora and Mint; is there an ideal Linux distribution/version for GNOME 3?
|
Gnome aims to be distribution-independent. However, it happens to be that:
Fedora is the only major distribution shipping Gnome 3 as a default right now. Other distributions either have other defaults or no particular default. (And I'm sure there are some awesome smaller distributions defaulting to Gnome; I don't mean anything really deep with the word "major".)
Many Gnome developers are employed by Red Hat, which also sponsors Fedora and Fedora development. While the projects have different upstream goals, there's generally been a close relationship.
So, for those reasons, Fedora is likely as close to an "ideal" OS for Gnome 3 as exists. However, Gnome 3 should also work very well on any other modern Linux distro, and conversely, non-Gnome desktops work very well on Fedora.
Disclaimer: I'm a Fedora developer and work for Red Hat. Not directly on Gnome, though.
| Is there an ideal operating system for GNOME 3? [closed] |
1,420,476,502,000 |
Used to be able to right click on the tab and change the title. Not sure how to do this anymore. Just upgraded to Fedora 21.
EDIT: I have switched from gnome-terminal to ROXterm
|
Create a function in ~/.bashrc:
function set-title() {
if [[ -z "$ORIG" ]]; then
ORIG=$PS1
fi
TITLE="\[\e]2;$*\a\]"
PS1=${ORIG}${TITLE}
}
Then use your new command to set the terminal title. It works with spaces in the name too
set-title my new tab title
It is possible to subsequently use set-title again (original PS1 is preserved as ORIG).
| How to rename terminal tab title in gnome-terminal? |
1,420,476,502,000 |
My terminal setup is gnome-terminal + tmux + zsh with vi bindings.
In applications like vim or even in the zsh's command line vi editing mode, I need to frequently hit the ESC key but there is a small delay before the effects of this key take place. See GNU Screen makes Vim ESC key slow
After some experimentation, I found that hitting ESC key and immediately another key (say b) has the same effect as hitting Alt+b. I don't know why this is the case (probably for legacy reasons when there was no Alt? I don't know). Either way, I have two Alt keys and I don't want this behaviour with my ESC key. I have tried with C+[ and its the same problem with that too.
I'm not sure who is responsible for this, gnome-terminal or tmux or my OS itself (Ubuntu Natty). Any ideas on how to address this would be great.
Update: I checked without tmux on a different terminal (LXTerminal) and the delay is present there too.
|
Here's an actual fix. Add the following to .tmux.conf:
set -s escape-time 0
As mentioned in the comments: The server may need to be restarted.
tmux kill-server kills the server; you may need to restart it.
Alternatively, you can reload the configuration file
from the command prompt inside tmux by typing your tmux prefix
(default Ctrl+B) followed by :
and entering source-file ~/.tmux.conf.
| ESC key causes a small delay in terminal due to its Alt+ behavior |
1,420,476,502,000 |
I have tested this with both Ubuntu 12.04 and Debian 7. When I do
echo $TERM
I get
xterm
But if I use the dropdown menu "help" > "about" then it says gnome terminal 3.4.1.1.
Does this mean I am using just gnome-terminal? Or just xterm? Or is gnome-terminal an extension of xterm? I'm confused.
|
What is $TERM for?
The $TERM variable is for use by applications to take advantage of capabilities of that terminal.
For example, if a program wants to display colored text, it must first find out if the terminal you're using supports colored text, and then if it does, how to do colored text.
The way this works is that the system keeps a library of known terminals and their capabilities. On most systems this is in /usr/share/terminfo (there's also termcap, but it's legacy not used much any more).
So let's say you have a program that wants to display red text. It basically makes a call to the terminfo library that says "give me the sequence of bytes I have to send for red text for the xterm terminal". Then it just takes those bytes and prints them out.
You can try this yourself by doing tput setf 4; echo hi. This will get the setf terminfo capability and pass it a parameter of 4, which is the color you want.
Why gnome terminal lies about itself:
Now let's say you have some shiny new terminal emulator that was just released, and the system's terminfo library doesn't have a definition for it yet. When your application goes to look up how to do something, it will fail because the terminal isn't known.
The way your terminal gets around this is by lying about who it is. So your gnome terminal is saying "I'm xterm".
Xterm is a very basic terminal that has been around since the dawn of X11, and thus most terminal emulators support what it supports. So by gnome terminal saying it's an xterm, it's more likely to have a definition in the terminfo library.
The downside to lying about your terminal type is that the terminal might actually support a lot more than xterm does (for example, many new terminals support 256 colors, while older terminals only supported 16). So you have a tradeoff, get more features, or have more compatibility. Most terminals will opt for more compatibility, and thus choose to advertise themselves as xterm.
If you want to override this, many terminals will offer some way of configuring the behavior. But you can also just do export TERM=gnome-terminal.
| Which terminal type am I using? |
1,420,476,502,000 |
When we use clear command or Ctrl+L in terminal, it clears terminal but we can still scroll back to view the last used commands. Is there a way to completely clear the terminal?
|
You can use tput reset.
Besides reset and tput reset you can use following shell script.
#!/bin/sh
echo -e \\033c
This sends control characters Esc-C to the console which resets the terminal.
Google Keywords: Linux Console Control Sequences
man console_codes says:
The sequence ESC c causes a terminal reset, which is what you want if
the screen is all garbled. The oft-advised "echo ^V^O" will only make
G0 current, but there is no guarantee that G0 points at table a). In
some distributions there is a program reset(1) that just does "echo
^[c". If your terminfo entry for the console is correct (and has an
entry rs1=\Ec), then "tput reset" will also work.
| How do I clear the Gnome terminal history? |
1,420,476,502,000 |
I am running an application with command $ grails run-app which prints log in terminal like below.
What I want is search a particular text (say user authorities) in this log so that I can verify further. One way using Logging Apis to write in text file but I want to search it in a terminal at the moment.
I found similar question at how to make search a text on the terminal directly which suggests screen command, but I have no idea how screen works in this case.
I tried
$ screen grails run-app
but couldn't move ahead.
I can see screen lists with
prayag@prayag:~/zlab/nioc2egdelonk$ screen -list
There is a screen on:
8076.pts-2.prayag (10/06/2013 12:13:25 PM) (Attached)
1 Socket in /var/run/screen/S-prayag.
|
Ctrl+a (default screen command prefix), [ (enter copy mode) followed by ?SEARCH_TEXT seems to work. Press n to go to the next occurrence. From there, you can copy words, lines, regions, etc to dump into files or paste later on (with Ctrl+a, ]).
| search text on the terminal output |
1,420,476,502,000 |
I'm on Arch linux, and when I open a new terminal tab, it always goes to $HOME. How can I make it so that when I open a new tab, it opens the shell in the directory I was in previously?
|
There is a bug related to this issue
All you need to do is add the following line to your .bashrc or .zshrc:
. /etc/profile.d/vte.sh
At least on Arch, the script checks if you are running either bash or zsh and exits if you are not.
| gnome-terminal: keep track of directory in new tab |
1,420,476,502,000 |
when I ssh to a server over the internet in a gnome terminal tab, if I lost internet connection, the terminal tab will be hang and not accept any input. Why is it hang?
Is there some way to activate the terminal tab, i.e. make it continue running the local shell process?
Is closing the terminal tab the only way?
|
SSH connection goes down automatically after a specified period of time set by ClientAliveInterval and ClientAliveCountMax parameters and their client-side equivalents. If these timeouts are quite high you will experience a frozen shell. However, if you use OpenSSH you don't have to wait for a timeout and can force closing a connection using escape characters:
ESCAPE CHARACTERS
When a pseudo-terminal has been requested, ssh supports a number
of functions through the use of an escape character. A single
tilde character can be sent as ~~ or by following the tilde by a
character other than those described below. The escape character
must always follow a newline to be interpreted as special. The
escape character can be changed in configuration files using the
EscapeChar configuration directive or on the command line by the
-e option.
The supported escapes (assuming the default ‘~’) are:
~.
Disconnect.
(...)
When connection freezes press ~ (that means Shift+` keys together), release it and press ..
Alternatively, if you work with an unstable connection or need to be connected to the remote server all the time you can use autossh to automatically renew lost connection, it's very convenient.
EDIT:
However, if both ClientAliveInterval and ServerAliveInterval are set to 0 explicitly or are not set explicitly and are then set to 0 by default according to sshd_config and ssh_config manpages, timeout settings are set in the following files (from http://tldp.org/HOWTO/TCP-Keepalive-HOWTO/usingkeepalive.html):
# cat /proc/sys/net/ipv4/tcp_keepalive_time
7200
# cat /proc/sys/net/ipv4/tcp_keepalive_intvl
75
# cat /proc/sys/net/ipv4/tcp_keepalive_probes
9
The first two parameters are expressed in seconds, and the last is
the pure number. This means that the keepalive routines wait for
two hours (7200 secs) before sending the first keepalive probe,
and then resend it every 75 seconds. If no ACK response is
received for nine consecutive times, the connection is marked as
broken.
You can modify these 3 files just by using echo and see yourself that a frozen SSH session is disconnected according to these values.
| terminal hang when lost connection and ssh is on |
1,420,476,502,000 |
Is it possible to export a gnome-terminal profile to another computer?
I create a terminal profile using edit>preferences and save it as "def". I would like to save the configuration in a file and use it another computer.
I try to grep "def" within .config/dconf/ and find
Binary file dconf/user matches
Is it possible to extract the information from the configuration (specially about the colours, takes a lot of time to find the right colurs) and use them in another computer.
I am using Fedora 28 with gnome.
4.16.13-300.fc28.x86_64, gnome-terminal-3.28.2-2.fc28.x86_64.
|
You can use dconf(1) to dump and load the gnome-terminal profiles. I got the basic command usage from this source:
https://gist.github.com/reavon/0bbe99150810baa5623e5f601aa93afc
To export all of your gnome-terminal profiles from one system, and then load them on another, you would issue the following:
source system:
$ dconf dump /org/gnome/terminal/legacy/profiles:/ > gnome-terminal-profiles.dconf
destination system (after transferring the gnome-terminal-profiles.dconf file):
$ dconf load /org/gnome/terminal/legacy/profiles:/ < gnome-terminal-profiles.dconf
| How to export a gnome-terminal profile? |
1,420,476,502,000 |
I am creating Log-Reports which are viewable through the Web-browser. Is there an easy way to make links clickable in Linux Terminal? (Gnome-Terminal)
I am copying those links and manually open my web-browser to achieve that right now.
|
If the links are output as full URLs, they should be clickable when you hover over them (with the mouse pointer) while holding Ctrl down.
| Terminal - create hyperlinks |
1,420,476,502,000 |
I'm currently using Fedora 18 gnome-terminal, then started tmux multiplexer in it. After I connected to a CentOS 5 server via ssh command, I find:
ls result has no color
tmux, screen, hexedit, htop all failed to start with error message like: open terminal failed: missing or unsuitable terminal: screen-256color
It seems that ssh passes the $TERM environment variable to the server, but I can't find it in /etc/ssh/ssh_config file of Fedora 18.
Although I can manually change the $TERM variable on the server, each time I connect, it happens again. So how to prevent it?
|
$TERM is to tell applications what terminal they're talking to so they know how to talk to it.
Change it to a value supported by the remote host and that matches as closely as possible your terminal (screen).
Most Linux systems should at least have a screen terminfo entry. If not, screen implements a superset of vt100 and vt100 is universal. So:
TERM=screen ssh host
or
TERM=vt100 ssh host
If you do need the 256 color support, you could try xterm-256color which should be close enough (screen supports 256 colors the same way xterm does) and tell applications your terminal application supports 256 colors and tell them how to use them.
Or you can install the terminfo entry on the remote host.
infocmp -x | ssh -t root@remote-host '
cat > "$TERM.info" && tic -x "$TERM.info"'
| Prevent SSH client passing TERM environment variable to server? |
1,420,476,502,000 |
I have a script which runs in the background (without terminal windows or TTY) and occasionally does something.
I now want it to do another thing when it does something and it is to open a Gnome Terminal window and execute 2 commands. Actually, I only need to execute 1 command but I want to make the terminal window stay open so I can see the output of the command. The command prints both on stdout and stderr and its output changes over time, so just writing it to a file and sending some kind of notification wouldn't do the job very well.
I can get Gnome Terminal to open a window and execute 1 command:
gnome-terminal -e "sleep 10"
I chose sleep as the long-running command for simplicity. However, when adding another command, no terminal window opens:
gnome-terminal -e "echo test; sleep 10"
What's the solution to this?
|
gnome-terminal treats everything in quotes as one command, so in order to run many of them consecutively you need to start interpreter (usually a shell), and do stuff inside it, for instance:
gnome-terminal -e 'sh -c "echo test; sleep 10"'
BTW, you may want the window to stay open even after commands finish their job, in such case just start new shell, or replace a current with the new one:
gnome-terminal -e 'sh -c "echo test; sleep 10; exec bash"'
| Open Gnome Terminal window and execute 2 commands |
1,420,476,502,000 |
I would like to setup my gnome terminal's background(#002b36) and foreground color in ubuntu 13, using bash script.
I tried gconftool but couldn't succeed.
GCONFTOOL-2(1) User Commands GCONFTOOL-2(1)
NAME
gconftool-2 - GNOME configuration tool
My gnome terminal version is
$ gnome-terminal --version
GNOME Terminal 3.6.1
Currently I'm using ubuntu terminal preferences UI to achieve this.
|
Method #1 - Using dconf
Background
You can use the dconf tool to accomplish this, however it's a mult-step process.
DESCRIPTION
The dconf program can perform various operations on a dconf database,
such as reading or writing individual values or entire directories.
This tool operates directly on the dconf database and does not read
gsettings schema information.Therefore, it cannot perform type and
consistency checks on values. The gsettings(1) utility is an
alternative if such checks are needed.
Usage
$ dconf
error: no command specified
Usage:
dconf COMMAND [ARGS...]
Commands:
help Show this information
read Read the value of a key
list List the contents of a dir
write Change the value of a key
reset Reset the value of a key or dir
update Update the system databases
watch Watch a path for changes
dump Dump an entire subpath to stdout
load Populate a subpath from stdin
Use 'dconf help COMMAND' to get detailed help.
General approach
First you'll need to get a list of your gnome-terminal profiles.
$ dconf list /org/gnome/terminal/legacy/profiles:/
<profile id>
Using this <profile id> you can then get a list of configurable settings
$ dconf list /org/gnome/terminal/legacy/profiles:/<profile id>
background-color
default-size-columns
use-theme-colors
use-custom-default-size
foreground-color
use-system-font
font
You can then read the current colors of either the foreground or background
foreground
$ dconf read /org/gnome/terminal/legacy/profiles:/<profile id>/foreground-color
'rgb(255,255,255)'
background
$ dconf read /org/gnome/terminal/legacy/profiles:/<profile id>/background-color
'rgb(0,0,0)'
You can change the colors as well
foreground
$ dconf write /org/gnome/terminal/legacy/profiles:/<profile id>/foreground-color "'rgb(255,255,255)'"
background
$ dconf write /org/gnome/terminal/legacy/profiles:/<profile id>/background-color "'rgb(0,0,0)'"
Example
Get my profile ID
$ dconf list /org/gnome/terminal/legacy/profiles:/
:b1dcc9dd-5262-4d8d-a863-c897e6d979b9/
Use the profile ID to get a list of settings
$ dconf list /org/gnome/terminal/legacy/profiles:/:b1dcc9dd-5262-4d8d-a863-c897e6d979b9/
background-color
default-size-columns
use-theme-colors
use-custom-default-size
foreground-color
use-system-font
font
Change your background blue
$ dconf write /org/gnome/terminal/legacy/profiles:/:b1dcc9dd-5262-4d8d-a863-c897e6d979b9/background-color "'rgb(0,0,255)'"
A Note on colors
You can use either the notation rgb(R,G,B) when specifying your colors or the hash notation #RRGGBB. In the both notations the arguments are red, green, and blue. The values in the first notation are integers ranging from 0-255 for R, G, or B. In the second notation the values are in hexidecimal ranging from 00 to FF for RR, GG, or BB.
When providing either of these to dconf you need to wrap it properly in double quotes with single quotes nested inside. Otherwise dconf will complain.
"'rgb(0,0,0)'"
"'#FFFFFF'"
etc.
Method #2 - Using gconftool-2
On my Ubuntu 12.04 system I was able to change the colors via the command line as follows.
NOTE: The options are ultimately stored in this file, $HOME/.gconf/apps/gnome-terminal/profiles/Default/%gconf.xml.
General approach
First you'll need to get the tree for gnome-terminal's profile.
$ gconftool-2 --get /apps/gnome-terminal/global/profile_list
[Default]
Using the resulting tree we can find out what attributes are configurable.
$ gconftool-2 -a "/apps/gnome-terminal/profiles/Default" | grep color
bold_color_same_as_fg = true
bold_color = #000000000000
background_color = #FFFFFFFFFFFF
foreground_color = #000000000000
use_theme_colors = false
Get/Set the background_color & foreground_color attributes
$ gconftool-2 --get "/apps/gnome-terminal/profiles/Default/foreground_color"
#000000000000
$ gconftool-2 --set "/apps/gnome-terminal/profiles/Default/background_color" --type string "#000000FFFFFF"
Confirm
$ gconftool-2 -R /apps/gnome-terminal/profiles/Default | grep color
bold_color_same_as_fg = true
bold_color = #000000000000
background_color = #000000FFFFFF
foreground_color = #000000000000
use_theme_colors = true
References
CHANGING TERMINAL PREFERENCES IN GNOME 3
base16-gnome-terminal / base16-tomorrow.light.sh
Is there a way to temporarily change the terminal colour?
| set gnome terminal background/text color from bash script |
1,420,476,502,000 |
I'm running old Debian machine:
Distributor ID: Debian
Description: Debian GNU/Linux 5.0.2 (lenny)
Release: 5.0.2
Codename: lenny
I open terminal and run Midnight Commander in it. Now I need to quit by pressing F10. But When I do this I'm getting terminal menu:
How to get MC menu and not terminal one by pressing F10?
|
Go to Edit->Keyboard Shortcuts
And uncheck "Enable the menu shortcut key"
to turn it off.
Reference link : here.
| Pass F10 to the application in Gnome-terminal [duplicate] |
1,420,476,502,000 |
I realize the default of the Nemo's right-click "Open in Terminal"
is to launch "gnome-terminal";
however, my installation is opening "xfce4-terminal" instead.
A while back when "gnome-terminal" was broken, I installed "xfce4-terminal" as an alternative. I configured the system-wide defaults to call "xfce4-terminal" for the terminal.
After the issue with gnome-terminal was resolved, I moved the system-wide defaults back to gnome-terminal. Nautilus starting using gnome-terminal again; however, Nemo continues to launch "xfce4-terminal".
I uninstalled "xfce4-terminal";
then the "Open in Terminal" feature of Nemo stopped working.
In attempts to resolve this issue I have done the following:
Reinstalled Ubuntu 16.04
Purged and reinstalled Nemo
Nemo still will launch only "xfce4-terminal". It appears to be a problem in my home folder's Nemo configuration or some other per-user cache.
I created a new user, and Nemo properly launched "gnome-terminal".
Can someone help me with where to check and fix Nemo's functionality
in my /home/username settings?
Is there some type of editable configuration to check what happens
when clicking on the "Open in Terminal" function?
|
Nemo uses the gsettings configuration. This restored the intended behavior:
$ gsettings set org.gnome.desktop.default-applications.terminal exec gnome-terminal
On Ubuntu it's different for some reason:
$ gsettings set org.cinnamon.desktop.default-applications.terminal exec gnome-terminal
| How to configure Nemo's right-click "Open in Terminal" to launch "gnome-terminal" |
1,420,476,502,000 |
There's a lot of questions around this, but it's because there are so many variables. I had to piece together instructions from many sites before I got this working.
First, I could not easily set up the 16 solarized colour definitions in gnome-terminal (I did it by hand/clicking only to realise that I'd not got the order/mapping correct). Once I fixed that I moved on...
Then I had solarized colours working in vim OK-ish, but there was some odd black backgrounds appearing in certain highlighting. Once I fixed that, I moved on...
Then I realised vim went v. wonky once running inside tmux. This is massively debated, but very few of the answers (which mostly say about setting TERM to xterm-256colors) worked for me. I eventually fixed that too.
Solarized is a very nice palette (although I darkened the darkest base colour and lightened the lightest as I prefer the higher contrast and found tmux's 'white' far far too yellow on my calibrated screen - prob fine on a typical uncalibrated laptop screen as they're usually way too blue!), so I'm posting this question with its answer to share the results of my learning.
|
Solarized gives very specific colours. You can't really achieve these colours in a standard 256 colour palette. The only way you can achieve this is through setting up the exact colours in your terminal emulator, then apps think they're just using standard 16 colours (8 + 8 brights) but these have been accurately mapped to the Solarized palette.
Gnome terminal does not provide a very easy way to export/import palettes or profiles, but you can do it with this bash script:
#!/bin/sh
DARK_BG='#000014141A1A'
# original: DARK_BG='#00002B2B3636'
LIGHTEST='#FFFFFBFBF0F0'
# original: LIGHTEST='#FDFDF6F6E3E3'
gconftool-2 --set "/apps/gnome-terminal/profiles/Default/use_theme_background" --type bool false
gconftool-2 --set "/apps/gnome-terminal/profiles/Default/use_theme_colors" --type bool false
gconftool-2 --set "/apps/gnome-terminal/profiles/Default/palette" --type string "#070736364242:#D3D301010202:#858599990000:#B5B589890000:#26268B8BD2D2:#D3D336368282:#2A2AA1A19898:#EEEEE8E8D5D5:$DARK_BG:#CBCB4B4B1616:#58586E6E7575:#65657B7B8383:#838394949696:#6C6C7171C4C4:#9393A1A1A1A1:$LIGHTEST"
gconftool-2 --set "/apps/gnome-terminal/profiles/Default/background_color" --type string "$DARK_BG"
gconftool-2 --set "/apps/gnome-terminal/profiles/Default/foreground_color" --type string "#65657B7B8383"
Nb. here I've overridden Solarized's darkest and lightest colours. You can use the originals if you like, as commented.
Good enough. Now install the Solarized vim colours file by placing that file in ~.vim/colors/solarized.vim.
Now you can tell Vim to use that colour scheme with colo solarized. But this did not quite work and I had to tell Vim to use a 16 colour pallete, set t_Co=16. I stuck both of those in my ~/.vimrc file.
Now vim colours were working, but not if it ran inside tmux.
This next bit is very confusing. Most advice says about setting TERM outside tmux to xterm-256colors, but when I did that tmux would not even start. It confused me, too: doesn't solarized say that the 256 colour palette is a poor approximation? Well, it is confusing, and anyway, it wasn't working so I needed another way forward:
Create a file /tmp/foo containing:
xterm-16color|xterm with 16 colors,
colors#16, use=xterm,
Then install this with sudo tic /tmp/foo
Finally, alias tmux as follows:
alias tmux='TERMINFO=/usr/share/terminfo/x/xterm-16color TERM=xterm-16color tmux -2'
I now get exactly the right colours in the terminal, in vim, and in vim-inside-tmux. Nb. the -2 option tells tmux to use a 256 colour palette, which is really confusing because the env variables would appear to be telling it otherwise... I genuinely don't know, and I'm afraid I don't really care to climb that learning curve because I now have a beautiful coloured terminal that Just Works.
| How do I get the solarized colour scheme working with gnome-terminal, tmux and vim? |
1,420,476,502,000 |
I'm writing a script which shows the git log for a directory when I cd into it.
Such a log can be overwhelming, containing hundreds of lines. So far I have been limiting that to a hard-coded 30 lines with (... | head -n 30), cool on the big screen at Work, too big at home. I would prefer the log to take up about half the (vertical) screen on any terminal, e.g. Gnome at work, iTerm2 at home. I do not use screen or tmux. But would like to learn them.
How do I find the number of vertical lines available in a terminal from command line?
|
Terminal parameters are stored as $LINES and $COLUMNS variables.
Additionally you can use special term-operation programm, for example tput:
tput lines # outputs the number of lines of the present terminal window.
tput cols # outputs the number of columns of the present terminal window.
| How do I find number of vertical lines available in the terminal? |
1,420,476,502,000 |
I'd like to set the terminal title to user@host so I can easily tell which machine I'm connected to from the window title. Is there a way to do this from SSH or from GNOME Terminal?
|
Yes. Here's an example for bash using PS1 that should be distro-agnostic:
Specifically, the escape sequence \[\e]0; __SOME_STUFF_HERE__ \a\] is of interest. I've edited this to be set in a separate variable for more clarity.
# uncomment for a colored prompt, if the terminal has the capability; turned
# off by default to not distract the user: the focus in a terminal window
# should be on the output of commands, not on the prompt
force_color_prompt=yes
if [ -n "$force_color_prompt" ]; then
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
# We have color support; assume it's compliant with Ecma-48
# (ISO/IEC-6429). (Lack of such support is extremely rare, and such
# a case would tend to support setf rather than setaf.)
color_prompt=yes
else
color_prompt=
fi
fi
TITLEBAR='\[\e]0;\u@\h\a\]'
# Same thing.. but with octal ASCII escape chars
#TITLEBAR='\[\033]2;\u@\h\007\]'
if [ "$color_prompt" = yes ]; then
PS1="${TITLEBAR}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\W\[\033[00m\]\$ "
else
PS1="${TITLEBAR}\u@\h:\W\$ "
fi
unset color_prompt force_color_prompt
Also note that there can be many ways of setting an xterm's title, depending on which terminal program you are using, and which shell. For example, if you're using KDE's Konsole, you can override the title setting by going to Settings->Configure Profiles->Edit Profile->Tabs and setting the Tab title format and Remote tab title format settings.
Additionally, you may want to check out:
this "How to change the title of an xterm" FAQ for other shells
this "Prompt Magic" tip for a good reference of the escape sequences that work in bash.
this Bash Prompt HOWTO for a reference on ANSI Color escape sequences.
| Is it possible to set Gnome Terminal's title to "user@host" for whatever host I'm connected to? |
1,420,476,502,000 |
If you have gnome-terminal running, and want a new instance of the program, you might think that running gnome-terminal & from a shell would do the trick.
Astonishingly, this new instance behaves like some insipid Windows or Mac program; it only sends a message to the existing, running gnome-terminal to create a new window. If this one gnome-terminal process crashes, you lose all of the terminal windows!
(Of course, each window has its own shell, which is an independent process, but the actual terminal emulator and its GUI are managed from a single instance of the application.)
How can we create independent instances of gnome-terminal, each running in their own process, so that killing that process only destroys the window(s) associated with that process?
|
According to man gnome-terminal, the option you're looking for appears to be the confusingly-named
--disable-factory
Do not register with the activation name server, do
not re-use an active terminal.
However, the option is apparently removed in more recent releases so should not be relied on.
| Run true multiple process instances of gnome-terminal |
1,420,476,502,000 |
I need to run several Bash scripts (the same script with different variables to be precise) at the same time. To keep the number of tabs under control, I wish to group them in a single terminal tab.
The scripts regularly output, which I check for any problem.
If I send them to the background as
./script.sh 1 &
./script.sh 2 &
./script.sh 3 &
./script.sh 4
I will lose control over them. For example, I terminate the script by Ctrl+C. With the above code, I should find the pid for each process to kill them.
Note that the above code is the content of my main script (say ./all_scripts.sh) rather than commands to be typed in the terminal.
Is there a way to run the script in the same terminal while treating them as a single outputting script?
|
After testing different methods and programs, I found that the pragmatic solution is GNU Parallel. I post this answer as it may help others.
GNU Parallel has not been built for this task, but perfectly serves the purpose.
If running the scripts as
parallel -u ::: './script.sh 1' './script.sh 2' #(and so forth)
All scripts will be run in parallel.
The -u (--ungroup) flag sends the script outputs into stdout while executing the scripts.
Ctrl+C kills the parallel job, and subsequently all running scripts.
| How can I run multiple Bash scripts simultaneously in a terminal window? |
1,420,476,502,000 |
I am running Fedora 17 gnome (shell) 3 and gnome terminal 3.4.1.1.
I am a user of both gnome-terminal and mc(Midnight Commander). As default gnome-terminal has always used F10 (which I need while using mc), to opening the top menu. So was this time. I was able to disable that behavior in the settings, as always.
Which is new to me, is that after I disabled the setting, it started opening the "right-click menu" at the mouse cursor when I press F10. The key goes to mc too, but it is annoying to have to always close the menu.
I assume it is caused by gnome terminal, as it does not happen in other apps. Is this a "feature" or bug, has anyone else encountered the same problem and how to fix it?
|
Here is a simple solution for the problem described:
For GTK 3 apps like gnome-terminal and nautilus just create (or edit if you have one) the file ~/.config/gtk-3.0/gtk.css with following content:
$ cat ~/.config/gtk-3.0/gtk.css
@binding-set NoKeyboardNavigation {
unbind "F10"
}
* {
gtk-key-bindings: NoKeyboardNavigation
}
| Why does F10 in gnome-terminal open the right-click menu? |
1,420,476,502,000 |
How could I execute a script in Shell when a shortcut key is pressed.
Essentially what I need is when a shortcut key is pressed the script should read from a file and display that content in the terminal.
|
You can use the builtin command, bind to map a keyboard shortcut so that it executes a command/shell script.
Example
Say we want to run the command, pwd, when we press the F12 key.
$ bind '"\e[24~":"pwd\n"'
Now when I press F12 at my prompt, $:
$ pwd
/home/saml
Determining keyboard shortcuts
You can use the following technique to determine the escape code for a given keyboard shortcut. On most systems press Ctrl + V, release, and then press the key you want the code for. There are some other systems it will work with M instead of V
Example
Pressing Ctrl + V then release both Ctrl and V and finally press F12 in a terminal window returns this:
$ ^[[24~
This output can be interpreted as follows, ^[ is the Esc key. So when we want to specify this particular key using the bind command we need to use a \e to denote the Esc key followed by everything else from above. So the bind command looks like this:
$ bind '"\e[24~":"....."'
Executing a command in the middle
You can also make use of bind -x to setup keyboard shortcuts that will run commands while you're in the middle of typing something at the prompt, and these commands' output will be displayed, but what ever you were typing at the prompt will remain intact.
$ bind -x '"\eW":"..."'
NOTE: This method only works with keyboard shortcuts that output 1 character, so F12 won't work here.
Example
Let's alias the keyboard shortcut Alt + Shift + W.
$ bind -x '"\eW":"who"'
Say I'm typing the command finger:
$ finger
Now I hit the keyboard shortcut Alt + Shift + W:
saml tty1 2013-09-01 11:01 (:0)
saml pts/0 2013-09-01 11:03 (:0.0)
saml pts/1 2013-09-01 11:05 (:0.0)
saml pts/2 2013-09-01 11:05 (:0.0)
saml pts/5 2013-09-03 22:45 (:0.0)
$ finger
What's going on is bind is running the command defined, who, taking its output and inserting it in front of the prompt. If you repeat it you'll see what's going on, here's output from me hitting it 2 times:
saml tty1 2013-09-01 11:01 (:0)
saml pts/0 2013-09-01 11:03 (:0.0)
saml pts/1 2013-09-01 11:05 (:0.0)
saml pts/2 2013-09-01 11:05 (:0.0)
saml pts/5 2013-09-03 22:45 (:0.0)
saml tty1 2013-09-01 11:01 (:0)
saml pts/0 2013-09-01 11:03 (:0.0)
saml pts/1 2013-09-01 11:05 (:0.0)
saml pts/2 2013-09-01 11:05 (:0.0)
saml pts/5 2013-09-03 22:45 (:0.0)
$ finger
Your problem
So one idea would be to use the bind -x method above and cat to display this text file at your prompt:
$ bind -x '"\eW":"cat someinfo.txt"'
Now when I run commands I can see this file like so:
This is text from some
multi-line file reminding
me how to do some
stuff
$ finger
The output of file someinfo.txt is being displayed above my finger command above.
References
In bash, how do I bind a function key to a command?
| How to execute a script in shell when a shortcut key is pressed |
1,420,476,502,000 |
I opened a terminal on Ubuntu using Ctrl+Alt+T and a different terminal by going to a directory and then right clicking and choosing "Open in Terminal".
I did an echo $0 in both cases.
In the first case:
$ echo $0
-bash
In the second case:
$ echo $0
/bin/bash
Why this difference?
|
If the output of echo $0 command is -bash it means that bash was invoked as a login shell. If the output is only bash, then you are in a non-login shell.
man bash says somewhere at line 126:
A login shell is one whose first character of argument zero is a -, or
one started with the --login option.
See more about here: Difference between Login Shell and Non-Login Shell?.
Now, to explain why you get /bin/bash in the second case, I can say that a program (in your case your file manager, probably nautilus) or a script can change its own $0 to something else. As example see what's happening with $0 in my terminal (the same terminal all the time):
| Why 'echo $0' gives different result for two different terminals? |
1,420,476,502,000 |
I am using GNOME Terminal 2.7.3 and zsh 4.3.9 (x86_64-unknown-linux-gnu)
Home and End are not working. Nothing happens and nothing gets displayed when I press them. but they work when I press shift + Home (Scrolls to the beginning of shell output.) and also work in other GUI programs.
I googled and tried the following. No change :(
885 bindkey "\e[1~" beginning-of-line
886 bindkey "\e[H" beginning-of-line
887 bindkey "\e1~" beginning-of-line
888 bindkey "\eH" beginning-of-line
889 bindkey "\e[0H" beginning-of-line
PS: When I am in the last tab and press Ctrl + pagedown I get ;5~ printed on the screen. Does that give any clue?
|
Escape sequences sent by function and cursor keys consist of an escape character followed by printable characters. Press Ctrl+V then Home. This will insert the escape sequence literally. Then add a bindkey instruction to your ~/.zshrc.
The instruction is likely to be (note O, not 0):
bindkey '\e[OH' beginning-of-line
bindkey '\e[OF' end-of-line
| Home key not working in terminal |
1,420,476,502,000 |
Double clicking on a word in gnome terminal selects the whole word. Unfortunately, this selection doesn't include colons such that URLs aren't completely selected, e.g. with
http://foo.example.org/
only
//foo.example.org/
is selected.
How do I configure this selection behavior such that complete URLs are selected?
See also:
How to configure the double click behavior in an X terminal? - the described resources aren't interpreted by Gnome Terminal
gnome classic terminal mouse double click selection - the Gnome Shell Terminal profile preference dialog doesn't have this option, anymore
|
How much is selected on double click can be configured via adding additional character classes to the default set. That means that adding a colon and other special characters that may show up in URLs leads to double click also selecting complete URLs.
This can be configured via the gnome config database. For that one has to get the id of the gnome shell profile. To get the default one:
puuid=$(gsettings get org.gnome.Terminal.ProfilesList default | tr -d "'")
Adding some URL related characters:
gsettings set \
org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:$puuid/ \
word-char-exceptions '@ms "-=&#:/.?@+~_%;"'
Note that:
@ms denotes the maybe-string gvariant type
the character class syntax matches the regex one, i.e. a-z specifies a range, where -az specified the literal 3 characters. Thus, I have explicitly put the - in the first position
History: In classic Gnome Terminal versions, the profile preference dialog contained a field for configuring those additional characters. With Gnome 3, UI experts have removed this option from the dialog because they thought it was too complicated to use, though. The default was also changed after Fedora 21.
| Double click selection in Gnome Terminal |
1,420,476,502,000 |
Usually my terminal prompt was
username place$
now it only shows
bash-4.2$
and all the color settings have been lost (on the terminal profile I have the same color scheme, but it just don't show colors)
I don't have any idea of what happens (and I don't know how to search for this).
It changes from nothing, I was working with eclipse and maven, opened a new terminal and the new terminal didn't have colors.
Note: I don't have a ~/.bashrc file, but I have a ~/.bash_profile.
|
The prompt variable $PS1 was probably not set, so the built-in default \s-\v\$ is used.
When bash starts up interactively, it sources a configuration file, usually either ~/.bashrc or ~/.bash_profile, presuming they exist, and this is how a fancier prompt is set. From man bash:
INVOCATION
[...]
When bash is invoked as an interactive login shell, or as a
non-interactive shell with the --login
option, it first reads and executes commands from the file /etc/profile, if that file exists. After
reading that file, it looks for ~/.bash_profile, ~/.bash_login, and
~/.profile, in that order [...]
[...] When an interactive shell that is not a login shell is started, bash reads and executes commands from
~/.bashrc, if that file exists.
Not having your prompt set can occur in two different contexts then, login shells and non-login shells. If you use a display manager to log directly into the GUI, you don't encounter login shells unless you switch to a virtual console (via, e.g. CtrlAlt + F1 to F6). However, you can test your bash login profile in the GUI by opening a new login shell explicitly: bash -l.
Problem occurs with non-login shells
If the problem occurs with, e.g., normal GUI terminals, then either your ~/.bashrc is missing, or it has been edited to exclude sourcing a global file, probably /etc/bashrc.
If ~/.bashrc does not exist, there should be a /etc/skel/.bashrc used to create it for new users. Simply copy that file into your home directory, and your default prompt should come back for the next new shell you open.
If ~/.bashrc does exist, check to see if there is a line somewhere that sources /etc/bashrc:
. /etc/bashrc
-OR-
source /etc/bashrc
If not, check if that file exists (it should, at least on most linux distros) and add such a line to your ~/.bashrc.
Problem occurs with login shells
If the problem occurs with login shells as well as non-login shells, the problem is probably the same as above. If it occurs only with login shells, you either don't have one of the files mentioned for login shells under the INVOCATION quote above, or they don't source your ~/.bashrc, which is normal on most linux distros. If none of those files exists, create ~/.bash_profile with this in it:
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
This allows you, for the most part, to keep your configuration in one file (~/.bashrc).
If no matter what you do you cannot get a prompt back, you can create one and put it into ~/.bashrc this way:
if [ "$PS1 ]; then
PS1= .... # see below
fi
This is because $PS1 is set and has a default value for interactive shells, and you don't want to set it otherwise since other things may use this value to determine whether this is an interactive environment.
The bash man page contains a section PROMPTING which describes how to set a prompt with dynamic features such as your user name and current working directory, which would be, e.g.,:
PS1="\u \w:"
There's a guide to using color here. Pay attention to the fact that you should enclose non-printed characters in \[ and \] (there's a discussion of this at the end of the answer about colors).
| Terminal, Prompt changed to "-Bash-4.2" and colors lost |
1,420,476,502,000 |
I'm running gnome 3.10.1 on Arch with Zsh.
I'm facing that problem that when I create a new tab or window from a terminal window, it resets the current dir to my home dir.
I've already tried this: gnome-terminal: keep track of directory in new tab, but it didn't work.
I tought that maybe it could be some configuration on my .zshrc file, so, I cleaned it up and put just the following line:
. /etc/profile.d/vte.sh
However, it didn't work as expected.
Yes, this file exists and here is its contents:
# Copyright © 2006 Shaun McCance <[email protected]>
# Copyright © 2013 Peter De Wachter <[email protected]>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# Not bash or zsh?
[ -n "$BASH_VERSION" -o -n "$ZSH_VERSION" ] || return 0
# Not an interactive shell?
[[ $- == *i* ]] || return 0
# Not running under vte?
[ "${VTE_VERSION:-0}" -ge 3405 ] || return 0
__vte_urlencode() (
# This is important to make sure string manipulation is handled
# byte-by-byte.
LC_ALL=C
str="$1"
while [ -n "$str" ]; do
safe="${str%%[!a-zA-Z0-9/:_\.\-\!\'\(\)~]*}"
printf "%s" "$safe"
str="${str#"$safe"}"
if [ -n "$str" ]; then
printf "%%%02X" "'$str"
str="${str#?}"
fi
done
)
# Print a warning so that anyone who's added this manually to his PS1 can adapt.
# The function will be removed in a later version.
__vte_ps1() {
echo -n "(__vte_ps1 is obsolete)"
}
__vte_osc7 () {
printf "\033]7;file://%s%s\a" "${HOSTNAME:-}" "$(__vte_urlencode "${PWD}")"
}
__vte_prompt_command() {
printf "\033]0;%s@%s:%s\007%s" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/~}" "$(__vte_osc7)"
}
case "$TERM" in
xterm*|vte*)
[ -n "$BASH_VERSION" ] && PROMPT_COMMAND="__vte_prompt_command"
[ -n "$ZSH_VERSION" ] && chpwd_functions+=(__vte_osc7)
;;
esac
true
This is really bugging me...
Is there any solution?
|
It seems like you have to enable the "Run command as a login shell" option in order to make it work like it should.
The print bellow is in Portuguese, but this is the configuration I've got it to work.
| Gnome-terminal and Zsh: keep current directory on new tab/window |
1,420,476,502,000 |
On my Linux host, Ctrl+C does not seem to work and I do not know how to proceed to make it work. I am using Ubuntu 10.04 with bash 4.1.5(1), and working in Gnome-terminal.
When I pressed Ctrl+C while this script was running, it did not cause it to quit.
#!/bin/bash
for i in `seq 500`
do
ps -e > /dev/null
echo $i
done
|
Try to do this
$ stty sane
and see if it fixes the problem, also check if the intr is set correctly using
$ stty -a
If you find that intr is set to something different than ^C, then you can also fix it by typing
$ stty intr ^v^c
| Ctrl+C does not work in gnome-terminal |
1,420,476,502,000 |
When running
top -n1 | head
the terminal's cursor disappears.
Running top -n1 brings it back.
Tested in gnome-terminal and tilix in Ubuntu 16.04 and CentOS 7.5.
Running top -n1 | tail doesn't have this issue, so I think, something at the end of top output let the cursor reappear which is not executed when printing the head only.
What causes this and how can I get back the cursor more elegantly ?
|
I wasn't able to recreate this behavior everywhere, but it does show up on Ubuntu 18.04
It is instructive to examine hex dumps of the top output:
$ top -n1 | head -n1 | xxd
00000000: 1b5b 3f31 681b 3d1b 5b3f 3235 6c1b 5b48 .[?1h.=.[?25l.[H
00000010: 1b5b 324a 1b28 421b 5b6d 746f 7020 2d20 .[2J.(B.[mtop -
00000020: 3133 3a34 333a 3034 2075 7020 3120 6d69 13:43:04 up 1 mi
00000030: 6e2c 2020 3120 7573 6572 2c20 206c 6f61 n, 1 user, loa
00000040: 6420 6176 6572 6167 653a 2030 2e38 312c d average: 0.81,
00000050: 2030 2e35 342c 2030 2e32 321b 2842 1b5b 0.54, 0.22.(B.[
00000060: 6d1b 5b33 393b 3439 6d1b 2842 1b5b 6d1b m.[39;49m.(B.[m.
00000070: 5b33 393b 3439 6d1b 5b4b 0a [39;49m.[K.
$ top -n1 | tail -n1 | xxd
00000000: 1b5b 3f31 326c 1b5b 3f32 3568 1b5b 4b .[?12l.[?25h.[K
$
In particular, the sequences starting 0x1b5b3f are ANSI escape sequences, which effectively are meta-data to control things like cursor position and text colour.
In particular, towards the start of the first line of top output, there is ESC [?25l, and towards the end of the last line is ESC [?25h. As per the wikipedia page, these are the respective codes to hide and show the cursor.
By piping the top -n1 output to head, the terminal will receive the hide-cursor command at the start, but not the show-cursor command at the end, and hence the cursor will remain invisible until some other action turns it on again.
@MrShunz suggestion to use the -b option to top is right on. This option disables all of the ANSI escape sequences in top's output, instead just outputting plain ASCII printable text. No cursors will be harmed during the execution of top with -b:
$ top -b -n1 | head -n1 | xxd
00000000: 746f 7020 2d20 3133 3a35 393a 3236 2075 top - 13:59:26 u
00000010: 7020 3138 206d 696e 2c20 2031 2075 7365 p 18 min, 1 use
00000020: 722c 2020 6c6f 6164 2061 7665 7261 6765 r, load average
00000030: 3a20 302e 3134 2c20 302e 3036 2c20 302e : 0.14, 0.06, 0.
00000040: 3037 0a 07.
$
| Cursor disappears when running `top -n1 | head` |
1,420,476,502,000 |
I'm using bash version 4.3.42(1)-release in an ArchLinux/Gnome environment.
When I type my commands some of the written characters gets transformed in some weird ones. Overall, all displayed text looks strange.
My character encoding is set to Unicode (UTF-8). I also checked my input language, which is correct. Since it worked before I assume it has something to do with an update but I'm not sure.
The following picture shows the output of bash -version and at the bottom the two words minus and moreover where you can see the strange behavior.
How can i fix this?
The output of my locale
$ locale
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=
Following my set font in /etc/vconsole.conf
KEYMAP=de
FONT=lat9w-16
|
For terminal emulators, you should choose a monospace (a.k.a. fixed with) font. The letters are positioned in a grid, rather than as it would look nice according to the width of each individual letter.
| Strange character overlap in terminal |
1,420,476,502,000 |
In a small bash script I'm running I am attempting to chown a new directory that is created. I've added:
sudo chown $USER:$USER /var/www/$sitename
sudo chmod 775 /var/www/$sitename
after the line where I mkdir (sudo mkdir /var/www/$sitename).
For some reason the chown is not executing. I can execute it manually but when written in the file it doesn't work. I have noticed that "chown" is not highlighted in the same color as "mkdir" and "chmod" but I can't figure out my problem.
Why doesn't chown work here?
Is it an issue with $USER:$USER?
EDIT
Here is the full script. How would I chown the file to whichever non root user executed the script?
#!/bin/sh
#!/bin/bash
# New Site
cd /etc/apache2/sites-available/
echo "New site name (test.my):"
read sitename
echo "<VirtualHost *:80>
ServerAdmin admin@$sitename
ServerName $sitename
ServerAlias $sitename
DocumentRoot /var/www/$sitename
<Directory />
Options FollowSymLinks
AllowOverride All
</Directory>
<Directory /var/www/$sitename>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>" > $sitename.conf
sudo mkdir /var/www/$sitename
sudo chown $USER:$USER /var/www/$sitename
echo USER is $USER
sudo chmod 775 /var/www/$sitename
sudo a2ensite $sitename.conf
sudo apachectl restart
echo "New site created"
|
If for some reason, $USER is not set, you can use the id command to obtain the identity of the real user. So the first time you use the $USER variable, you can use the shell expansion to supply a default value. Change the chown line in your script to:
sudo chown "${USER:=$(/usr/bin/id -run)}:$USER" "/var/www/$sitename"
If USER is empty or unset when this is run, bash will set the USER variable to the output of /usr/bin/id -run.
| Using chown $USER:$USER inside bash script |
1,420,476,502,000 |
Is there any way that we can edit the terminal preferences like background, colors, etc., from within the command line itself? The terminal is Gnome-terminal.
I'm using Ubuntu 14.04 trusty tahr.
|
Here's what I did:
Install gconf-editor sudo apt-get install gconf-editor
Fired it up from terminal gconf-editor
Went to apps>gnome-terminal>profiles>Default inside gnome-editor
This will open up the key-value pairs for preferences.
Edit the value corresponding to the required key.
Thanks for pointing me in the direction rather than giving the exact answer @jasonwryan . I learnt some other things along the way.
Now, I'm going to try to use gconftool-2 to do the exact same thing. I'm trying to eliminate the need for a GUI :)
Useful Links: What is Gconf
Addition: Using gconftool-2
The program gconftool-2 allows the user to interact with Gconf from the command-line.
For example, you wish to set the background darkness level of terminal
So, we have to set the key /apps/gnome-terminal/profiles/Default/background_darkness with a value (let's say 0.50)
gconftool-2 --set /apps/gnome-terminal/profiles/Default/background_darkness --type=float 0.50
Similar to this, we can set change other values corresponding to different keys.
| Changing the preferences of Gnome-terminal from within the terminal |
1,420,476,502,000 |
I like to work in Linux without using the mouse, because of that I would like to know if there is any method to set a keyboard shortcut to set gnome-terminal tab title.
|
From Edit -> Keyboard Shortcuts... you can set a shortcut to Set Title. I don't have a default one.
| Keyboard shortcut to set gnome-terminal tab title |
1,420,476,502,000 |
I am trying to configure my bash ~/.inputrc to these settings
(Note: ←, → mean the left and right arrow keys)
Ctrl + ← - should jump back a word
Ctrl + → - should jump forward a word
Currently I have this in my ~/.inputrc and it doesn't work. Ctrl + arrow produces nothing.
"\eC-5C":forward-word
"\eC-5D":backward-word
I'm sure my escape sequence is wrong.
What are the correct escape sequences for the Ctrl + arrow combinations?
terminal: tmux inside gnome-terminal
|
Gnome-terminal (more properly VTE) imitates some version of xterm's escape sequences. How closely it does this, depends on the version of VTE.
The relevant xterm documentation is in the PC-Style Function Keys section of XTerm Control Sequences.
What you are looking for is a string like \e[1;5D (for control left-arrow), where the 5 denotes the control modifier.
In ncurses, you can see these strings using infocmp -x, as the values for kUP5, kDN5, kLFT5 and kRIT5. For example:
kDN5=\E[1;5B,
kLFT5=\E[1;5D,
kRIT5=\E[1;5C,
kUP5=\E[1;5A,
| What is the gnome-terminal ANSI escape sequence for "CTRL + arrow/s"? |
1,420,476,502,000 |
Running in xterm (or gnome-terminal) the following command sets the so-called "Icon Name":
echo -en "\e]1;some_value\a"
What does this do?
Note that it is possible to set both "Window Title" and "Icon Name" to the same value with the same command, so I don't understand how "Icon Name" could be a path to, say, an image.
|
A long time ago, there was a window manager called twm—actually, it still exists and runs perfectly well. Instead of minimizing a window to a bar at the bottom of the screen (or similar) like MS Windows, Mac OS X, and many modern window managers, it shrunk them to labeled icons ("iconfify").
The Wikipedia twm article has some nice pictures, such as:
The window title is what goes in the titlebar (e.g., the "Calculator" or "xterm"). The icon name is what goes under the icon when iconified (the "xclock"). Modern window managers probably all ignore the icon name because they don't use the icon UI.
A full description of both can be found in the ICCCM.
| In xterm, what is "Icon Name"? |
1,420,476,502,000 |
I'm running Awesome WM on the latest Arch Linux with Gnome Terminal and the default bash. I've managed to get this working, but I wonder if any form of improvement is possible with this implementation. The question does NOT relate to opening new tabs, only to spawning new terminal windows with Awesome WM.
I have rewritten the "cd" command to save the current working directory in the ".cd_extend" file:
~/.bashrc
alias cd='source ~/.cd_extend'
~/.cd_extend
#!/bin/bash
command cd $1
echo $(pwd) > ~/.terminal_directory
When I spawn a new terminal, the ".terminal_directory" is read and appended as an argument to gnome terminal's "--working-directory" flag.
~/.dotfiles/open_terminal.sh
#!/bin/bash
DIR=$(cat ~/.terminal_directory)
gnome-terminal --working-directory=$DIR
awesomewm rc.lua
terminal = "~/.dotfiles/open_terminal.sh"
awful.key({ modkey, }, "Return", function () awful.util.spawn(terminal) end)
I wonder if I have missed any internal bash functionality which could have simplified this and if there is room for improvement.
|
After a few days of testing and asking around, this seems to be the easiest implementation. It could be done with a global state which Awesome WM reads, however to keep predictability and ease of implementation I'm keeping this.
~/.bashrc
function cd {
command cd "$1"
pwd > /tmp/terminal_pwd
}
Afterwards I can open the terminal, which reads from the /tmp/terminal_pwd file and opens a new gnome shell with the given working directory.
Awesome WM - rc.lua
-- Terminal
awful.key({ modkey, }, 'Return',
function()
awful.spawn.easy_async_with_shell(
"if [[ -s /tmp/terminal_pwd ]]; then cat /tmp/terminal_pwd; else echo '~'; fi",
function(path)
awful.spawn.easy_async_with_shell('gnome-terminal --working-directory '..path, function() end)
end)
end),
| Spawn new terminal window with the same directory as the previous window |
1,420,476,502,000 |
Something equivalent to Windows' "cmd prompt here", that will open a gnome-terminal on a specific folder?
|
There is a nautilus (gnome's file manager) extension for that:
http://packages.debian.org/sid/nautilus-open-terminal
That is the package for debian. You should look in the repository of your distribution for a similar package.
| Is there a "Open terminal here" from File Browser? |
1,420,476,502,000 |
I'm trying to learn how the $LANG variable behaves with gnome-terminal (and its character encoding preference option). I've been using iso8859-1 (latin1) as my main character-set and all my filenames are encoded as such.
For the following tests I'll do an ls -l of a directory with Spanish accented characters in their filenames:
Case #1:
gnome-terminal configured for ISO-8859-1
LANG set to "en_US-iso8859-1"
Result: I see all files correctly
Case #2:
gnome-terminal configured for UTF-8
LANG set to "en_US-iso8859-1"
Result: I see garbage characters for all spanish characters. This is expected as I changed the character-encoding for the terminal
Case #3:
gnome-terminal configured for ISO-8859-1
LANG set to "en_US-UTF-8"
Result: I see garbage characters for all spanish characters.
Why is that in this last case I see garbled characters? Shouldn't the output of ls send the filenames straight to gnome-terminal as they are? And since gnome-terminal is configured for ISO-8859-1, I would have expected them to look right.
For a moment I thought that, perhaps, maybe bash is considering my $LANG variable and performing some conversion. Then I switched my terminal to UTF-8 but I still can't see the characters right. I even piped the output of ls to xxd and to my surprise I still see the files encoded as they are: ISO-8859-1.
To wrap up: If my listing contains ISO-8859-1 characters and my terminal emulator is configured for the same character-encoding: Who's doing the conversion when LANG is set otherwise?
Thanks for any help you can provide.
Craconia
|
Your setting for LANG must match the terminal's. More precisely, your setting for LC_CTYPE (the character encoding) must match the terminal's encoding, the other locale settings don't need to match. And the terminal's encoding is usually specified by an option of the terminal emulator and not by a locale variable. The LC_CTYPE combines two indications: it tells applications what encoding to use on the terminal (both for input and output), and it tells applications what encoding to use with files. In cases 2 and 3, you've told ls to display output in an encoding that's different from the terminal's, so the output is garbled.
If you work with both UTF-8 and latin-1 encodings at different times, configure your terminal to use UTF-8. This should cause it to set LC_CTYPE to a value indicating UTF-8; don't override this setting. (If the terminal emulator doesn't set LC_CTYPE, do override it in your shell startup file or for your whole session.) To work with latin-1 data in an UTF-8 terminal, use luit (included in the X utility suite).
LC_CTYPE=en_US.iso88591 luit
(You can use any other locale with the same encoding, e.g. LC_CTYPE=es_ES.iso88591 luit.)
| Effect of $LANG on terminal |
1,420,476,502,000 |
I use Shift+(PgUp/PgDown) while scrolling in the terminal. But it seems to scroll one screen (or a half may be) at a time. I feel comfortable scrolling the terminal by line with the mouse, but don't like to touch it every time. After googling I found Ctrl+Shift+(Up/Down) does this on other Linux systems. But it doesn't seem to work on my CentOS.
Could somebody give the easiest solution to this problem?
|
On more recent versions of gnome-terminal, Shift+Ctrl+↑ and Shift+Ctrl+↓ work for scrolling by line, but I have no way of checking for 2.31.
| How to scroll in a terminal by line in GNOME Terminal 2.31.3? |
1,420,476,502,000 |
gnome-terminal:
$ sudo update-grub
[sudo] password for user:
Generating grub configuration file ...
Found background image: .background_cache.png
Found linux image: /boot/vmlinuz-3.16.0-4-amd64
Found initrd image: /boot/initrd.img-3.16.0-4-amd64
done
tty1 as accessed by Ctrl+Alt+F1:
$ sudo update-grub
[sudo] password for user:
Generating grub configuration file ...
Found background image: .background_cache.png
Found linux image: /boot/vmlinuz-3.16.0-4-amd64
Found initrd image: /boot/initrd.img-3.16.0-4-amd64
[ 1603.545926] EXT4-fs (sda2): unable to read superblock
... (repeats twice)
[ 1603.560671] FAT-fs (sda2): invalid media value (0x4c)
... (repeats once)
[ 1603.573245] qnx4: no qnx4 filesystem (no root dir).
done
While attempting to redirect the output of the tty1 to be able to directly copy it here I noticed that these additional lines are not coming from either stdout or stderr of the command. Where from then? Why?
|
They're coming from the kernel. You'll see them also by running
dmesg
Kernel messages are displayed on virtual console by default; they aren't in X terminal emulators (such as GNOME Terminal).
| Why can issuing the same command create more output in tty than in pts/gnome-terminal? |
1,420,476,502,000 |
Could someone explain this? I'm using gnome-terminal. First, some information:
# echo $TERM
xterm
# infocmp xterm
Reconstructed via infocmp from file: /lib/terminfo/x/xterm
colors#8, cols#80, it#8, lines#24, pairs#64
# tput colors
8
I wrote simple script to create codes for extended set of colors:
# Output file (current directory) and text.
OFILE='xterm256_colors_test.sh'
OFILE_COLORS='terminal_256_colors'
OTEXT='Sed ut perspiciatis unde omnis iste natus error sit voluptatem...'
# Clearing the contents from previous runs.
if [ -e $OFILE ] || [ -e $OFILE_COLORS ]
then
> $OFILE
> $OFILE_COLORS
fi
# Bang!
echo -e '#!/bin/bash\n' | tee --append $OFILE $OFILE_COLORS &> /dev/null
echo -e "\necho -e \"" | tee --append $OFILE &> /dev/null
# \x1b is a control character changing behaviour of the shell.
# It is also the <Ctrl+V><Esc> sequence.
for i in {016..255}; do
echo -e "\x1b[38;5;${i}m $OTEXT $i \x1b[0m" >> $OFILE
echo -e "color${i}=\"\[\033[38;5;${i}m\]\"" >> $OFILE_COLORS
done
# End of echo.
echo '"' | tee --append $OFILE &> /dev/null
# The file should be executable.
chmod +x $OFILE
Despite the basic xterm terminal emulator when I run the generated script I can see all 240 colors. Why? I thought I should change $TERM to xterm-256color first.
|
The TERM environment variable is a way that you, the user,
can tell programs (e.g., emacs, grep, less, ls, and vim)
what kind of terminal they are running on, so they will know its parameters, including what capabilities it has and what escape sequences they need to issue to access them. This exists because it’s too hard, in general,
for the software to determine this for itself
(and was pretty much impossible when users interfaced
with computers through terminals that were external,
and only connected to the computer by a data cable).
gnome-terminal is a program that provides terminal-like services
to the user and the programs that the user runs within the terminal.
gnome-terminal may be aware of environment variables
that were set in its environment,
before it was invoked (DISPLAY being the obvious example),
but it has no knowledge of environment variables that are set
in in the processes that are running under it.
So, gnome-terminal has whatever capabilities it has.
It may be possible to adjust/constrain these externally,
e.g., through command-line options, the pre-existing environment,
configuration files, and dialogs in the window frame,
but not by changing TERM in the shell in the window.
If it’s capable of displaying 256 colors,
then it’s capable of displaying 256 colors,
and you will be able to cause it to do so
by sending it the appropriate escape sequences.
But, as long as you have TERM set to xterm,
the programs that you run will believe that you are telling them
that they are running in an eight-color-capable terminal,
and so they will restrict their requests (escape sequences)
to those capabilities.
You need to set TERM to xterm-256color,
not to enable gnome-terminal to display 256 colors,
but to tell programs like grep and ls to ask it
to use more than 8 colors.
| Why xterm displays 256 colors (not xterm-256color)? |
1,424,268,416,000 |
I'm running Fedora 21 which comes with gnome 3.14. In older versions, when I resized a terminal, a little box would appear that showed the dimensions of the terminal (in columns and rows, not pixels; defaulting to 24x80). Now when I resize the terminal, this box doesn't appear. How do I re-enable this feature, or otherwise determine the number of rows and columns in my terminal?
|
From some quick searching, it doesn't look like there is a way to get gnome to display the dimensions.
You can run these commands inside the terminal window to get the lines and columns respectively:
tput lines
tput cols
| How do I determine the number of rows and columns in a gnome-terminal window while resizing? [duplicate] |
1,424,268,416,000 |
How can I change the transparency of the Terminal windows in Ubuntu with a command?
I already know about the profile method but want a command so that I can quickly swap between transparent and opaque.
My terminal is GNOME Terminal 2.30.2
|
You can use gconftool with the key /apps/gnome-terminal/profiles/Default/background_type (you might have to use a different profile name than "Default"):
gconftool -s -t string /apps/gnome-terminal/profiles/Default/background_type solid
gconftool -s -t string /apps/gnome-terminal/profiles/Default/background_type transparent
This was tested in version 3.0.1, but the command should be the same.
| Changing gnome terminal transparency with a command in Ubuntu? |
1,424,268,416,000 |
I use Gnome-Terminal for a lot of my work, and like separating my windows by color based on the task that I'm doing, so I've set up several profiles using the Preferences GUI.
I found some color themes online that I like and would like to use as a base for some of my profiles, including any that I create in the future. However, the Preferences GUI only has a few color theme options, and I would need to change all of the colors manually any time I want to use one of these custom themes.
Is there a way I can add custom themes to my Preferences GUI? If that's not possible, is there another way I can easily set a custom color theme for a profile? I know I can manually change the colors in other places, like gconf-editor, but I'd prefer an easy way to just tell it the color theme by name and have it handle the rest (like what you can do with the GUI).
|
The color palettes are all hard-coded so adding custom themes to gnome-terminal built-in Prefs Menu is not possible unless you are willing to patch the source code and recompile the application.
One way of setting a custom color themes for your profile is via scripts. Have a look at how solarize does it:
gnome-terminal-colors-solarized
Note, though, that gconf is EOL and future releases of gnome-terminal will use gsettings backend.
| How to add color themes to Gnome-Terminal's GUI preferences? |
1,424,268,416,000 |
Possible Duplicate:
Getting 256 colors to work in tmux
I want to set my terminal to 256 colors. I normally use the Gnome terminal which is shipped by default in Ubuntu but I also downloaded Terminator and tried Xterm and all them return 8 when I call tput color inside Tmux.
How can I arrange to have 256 colors in Tmux inside Gnome terminal so I can use Vim's 256-color scheme?
|
Even though OP answered the question in the above comments, I'll add the details here for easy reference. The quick solution is to add the following to your .tmux.conf file:
set -g default-terminal screen-256color
For more detailed info, check out the Tmux page on ArchWiki, or this helpful answer to the same question.
| Terminal 256 colors don't work through Tmux [duplicate] |
1,424,268,416,000 |
I am trying to modify the Gnome Shell preferences (in this case the key bindings) using the terminal. I have tried:
gsettings set org.gnome.Terminal.Legacy.Keybindings switch-to-tab-1 '<Alt>1'
But it is giving me an error:
Schema 'org.gnome.Terminal.Legacy.Keybindings' is relocatable (path must be specified)
So I am stuck in there. How can I specify the path? Also, I see the word "Legacy" in there... Is there a better way to do this?
Note: Using Fedora 24 with all upgrades: GNOME Shell 3.20.3, GNOME Terminal 3.20.2.
|
Thanks to @don_crissti's help and the answer they pointed me to.
In order to change Gnome Terminal keybindings a path must be provided for the schema (as it is relocatable). So we need to define both a schema and a path:
GSETTINGS_SCHEMA=org.gnome.Terminal.Legacy.Keybindings
GSETTINGS_PATH=/org/gnome/terminal/legacy/keybindings/
SCHEMA_PATH=$GSETTINGS_SCHEMA:$GSETTINGS_PATH
Then we can easily set our keybindings:
gsettings set $SCHEMA_PATH switch-to-tab-1 '<Primary><Alt>1'
gsettings set $SCHEMA_PATH switch-to-tab-2 '<Primary><Alt>2'
...
gsettings set $SCHEMA_PATH prev-tab '<Primary><Alt>9'
In order to list all the available keybindings (and also to check they are properly set):
gsettings list-recursively | grep Terminal.Legacy.Keybindings
| Configuring Gnome Shell key bindings from the command line |
1,424,268,416,000 |
On mu Ubuntu 12.04 setups my tmux clipboard copy and paste commands are setup as follows:
set -g prefix M-a
unbind C-b
bind C-c run "tmux save-buffer - | xclip -i -sel clipboard"
bind C-v run "tmux set-buffer \"$(xclip -o -sel clipboard)\"; tmux paste-buffer"
This worked great for the longest time up until a month or so ago, when I suspect some configuration change or package change was made that broke the above. In GNOME terminal, pasting still works fine with both prefix+ctrl-v and ctrl-shift-v.
However the xclip copy command no longer works no matter what I do, and I have tried removing the custom prefix binding above, using -select instead of -sel, not using clipboard etc. This is pretty much a show stopper for a GVim user like me, since I don't even have the GNOME terminal workaround of ctrl-shift-c with tmux taking over the shell. I go into copy mode, select text with space+movement, and when I execute prefix+ctrl-c absolutely nothing happens. Before this broke, tmux would display a confirmation message in the notification section at the bottom.
Does anybody have suggestions as far as how one might debug this? This is a pretty big productivity hit. I can probably use the temporary file workaround trick for now, but it'd be great to know just what happened to xclip.
|
The xsel utility is similar to xclip, but implemented a little differently. Normally I would expect them to behave in the same way, but they don't make exactly the same X library call, so it's possible that in some corner cases xsel will work but not xclip, or vice versa. Try:
bind C-c run "tmux save-buffer - | xsel -ib"
bind C-v run "tmux set-buffer \"$(xsel -ob)\"; tmux paste-buffer"
| tmux xclip copy no longer working |
1,424,268,416,000 |
I used to be able to copy&paste (or type if I load respective keyboard layout)
any kind of characters (eg. é ö ñ ß و 好) in my console/terminal.
Now I bought a new computer and it does not work any more, only English/ASCII characters (but in other programs, e.g. firefox, it still works).
Distribution: Ubuntu. Terminals tried: gnome-terminal, xterm, konsole.
I tried setting LANG in /etc/environment to en_US.UTF-8 but after reboot echo $LANG still gives C. I also tried setting Character encoding to Unicode(UTF-8) in the gnome-terminal Terminal-menu - without effect.
Question: How can I get a terminal that is able to deal with non-English characters?
|
Locales are built upon request, because they can take a lot of space. You need to activate the locale by generating the associated data. Ubuntu undoubtedly has a GUI where you can set this, but I don't know where it is offhand. Run this once and for all in a terminal:
locale-gen en_US.UTF-8
You may need to log out and back in for the LANG value not to be sanitized down to C, but you should be able to test right now by running LANG=en_US.UTF-8 gnome-terminal.
By the way, I recommend LC_CTYPE instead of LANG. LC_CTYPE controls the character set only; LANG also affects other locale categories, in particular collation (i.e. character ordering), which can cause trouble occasionally.
| terminal: non-english characters |
1,424,268,416,000 |
How can one progmatically change the background colour of a terminal window, based on the hostname you ssh into?
i.e When I am ssh'd into live embedded systems on production hardware, I wish the terminal background to change to red - to "maintain awareness" of which server I am on. Having just the hostname in PS1 is not always sufficient.
Am using gnome-terminal, but would accept any workable solution under Linux.
|
You can use the ssh LocalCommand to emit the ANSI escape sequence to change background color, and have a section per host (or host pattern) to select the appropriate color you want to correspond to the remote host.
If your production servers follow a naming convention like "starts with prod", you can try the following snippet in your ~/.ssh/config file:
Host prod*
PermitLocalCommand yes
LocalCommand printf "\x1b[41m\x1b[2JPRODUCTION SYSTEM [%n]\n\n"
If there isn't a handy naming convention to make use of wildcard patterns, you could just list the hostnames separated by spaces. You can create additional Host blocks with different color values and strings for various other non-production servers as well.
After connecting to a host that matches the pattern, the corresponding printf will be executed locally, changing the background color to red (the [41m chooses red as the background color, the [2J part repaints the entire screen with the updated background color. See https://en.wikipedia.org/wiki/ANSI_escape_code for lots more options)
The biggest nuisance about this approach is that the background color persists on exit from the ssh session; There is no counterpart to LocalCommand to be run on disconnect (that I am aware of). An alias or shell wrapper script for ssh could invoke printf "\x1b[0m" as a reset. On the other hand, having the background color set via LocalCommand means that you will get the color set even if ssh is not run via a wrapper script or alias.
| How to automatically change terminal background, based on ssh hostname? |
1,424,268,416,000 |
I would like to use screen (from GNOME Terminal, via ssh) like I use GNOME Terminal without screen, or as close as possible to that. Specifically:
In GNOME Terminal, I can scroll back using the mouse wheel, the scrollbar or Shift+PgUp/PgDn.
In screen, I have to go to copy mode (Ctrl+A,[) to be able to scroll back (mouse wheel works after that). Scrolling behavior can be changed (see this answer and this answer) but this solution has the following flaws:
When I open a file with less or vim, I can scroll above the editor 'window' with my mouse wheel and see the previous contents of the terminal.
When I close the editor, its contents stay in the scrollback buffer (sometimes in several copies) instead of disappearing.
This behavior can be changed using altscreen on (see this answer) but the only effect is that when the editor is closed, the old terminal contents are appended to the scrollback buffer in my terminal window so I can still see the editor crap when I scroll back using my mouse wheel.
Does this mean it's not possible to have nice scrolling in screen? Basically, all I'd like is being able to scroll just like in copy mode (using the mouse wheel, and scrollbar if possible) but without having to enter copy mode.
|
Perhaps you cannot have what you are asking.
From the terminal's standpoint:
screen is a full-screen (no pun) application just like vi or less.
the terminal implements scrolling and an alternate screen.
when the terminal is in alternate-screen mode, it does not add to its scrollback area as it would in normal mode.
in gnome-terminal (and perhaps some others — an option in xterm), the terminal will send up/down arrow keys to the application when it is in alternate-screen mode.
when not in alternate screen mode, your terminal will scroll through the visible screen and the terminal's scrollback area without any notification to the application running inside it.
From screen:
screen does not know anything about mice or scrolling; it passes that information to the application running inside screen.
screen simulates an alternate screen; it has no way to access the alternate screen of the terminal.
you can disable the alternate screen feature of the terminal, as indicated in the question.
In short, because screen does not have any way to access the scrollback of the terminal, your available choices are those that the terminal provides.
| Make screen work like a terminal (scrolling + alternate screen) [duplicate] |
1,424,268,416,000 |
When i type Ctrl+Left or Ctrl+Right within Guake or gnome-terminal the last one's behaviour turns to a some kind of non-usual mode: - key acts like arrow up and + like arrow down, v runs Nano, etc. How can i disable this feature ?
UPD: my friend told me that's X.org hotkeys... How can i disable 'em? Googling does not help at all...
UPD2: here's a video showing what's going on.
|
The solution was pretty elegant and simple: editing /etc/inputrc and disabling vi mode.
Here's the renewed inputrc file:
# /etc/inputrc - global inputrc for libreadline
# See readline(3readline) and `info rluserman' for more information.
# Be 8 bit clean.
set input-meta on
set output-meta on
#set editing-mode vi
# To allow the use of 8bit-characters like the german umlauts, uncomment
# the line below. However this makes the meta key not work as a meta key,
# which is annoying to those which don't need to type in 8-bit characters.
# set convert-meta off
# try to enable the application keypad when it is called. Some systems
# need this to enable the arrow keys.
# set enable-keypad on
# see /usr/share/doc/bash/inputrc.arrows for other codes of arrow keys
# do not bell on tab-completion
# set bell-style none
# set bell-style visible
# some defaults / modifications for the emacs mode
#$if mode=emacs
# allow the use of the Home/End keys
"\e[1~": beginning-of-line
"\e[4~": end-of-line
# allow the use of the Delete/Insert keys
"\e[3~": delete-char
"\e[2~": quoted-insert
# mappings for "page up" and "page down" to step to the beginning/end
# of the history
# "\e[5~": beginning-of-history
# "\e[6~": end-of-history
# alternate mappings for "page up" and "page down" to search the history
# "\e[5~": history-search-backward
# "\e[6~": history-search-forward
# mappings for Ctrl-left-arrow and Ctrl-right-arrow for word moving
"\e[1;5C": forward-word
"\e[1;5D": backward-word
"\e[5C": forward-word
"\e[5D": backward-word
"\e\e[C": forward-word
"\e\e[D": backward-word
$if term=rxvt
"\e[8~": end-of-line
"\eOc": forward-word
"\eOd": backward-word
$endif
# for non RH/Debian xterm, can't hurt for RH/Debian xterm
# "\eOH": beginning-of-line
# "\eOF": end-of-line
# for freebsd console
# "\e[H": beginning-of-line
# "\e[F": end-of-line
#$endif
Should read more 'bout that modes. Thanks everybody for the trouble-taking!
| Why does Ctrl+Arrow make my terminal switch to a strange mode? |
1,424,268,416,000 |
With the help of Display command in xterm titlebar I've got gnome-terminal changing the title to reflect the running command, so that I can see which terminal Mutt is running it. But what I'd really like is to push my Mutt status up to the title. I have this in my .muttrc:
set status_format = "%n new | %M in %f [%v]."
and I'd love to push that whole status to my gnome-terminal title. Is there a way to do that in my .bashrc? Or another way?
There's a discussion of how to do this from w/in vim at http://vim.wikia.com/wiki/Automatically_set_screen_title but...that's vim.
|
mutt can already do this.
man muttrc
ts_enabled
Type: boolean
Default: no
Controls whether mutt tries to set the terminal status line and
icon name. Most terminal emulators emulate the status line in
the window title.
ts_status_format
Type: string
Default: “Mutt with %?m?%m messages&no messages?%?n? [%n NEW]?”
Controls the format of the terminal status line (or window
title), provided that “$ts_enabled” has been set. This string is
identical in formatting to the one used by “$status_format”.
Unfortunately it doesn't change the title back, when you exit mutt.
| Set terminal title from within Mutt? |
1,424,268,416,000 |
According the gnome-terminal usage:
You can also scroll up or down one line at a time by pressing Control+Shift+Up or Control+Shift+Down.
In this document shows: Control + Shift + Up / Down can scroll up or scroll down the gnome-terminal one line. And, yes, they can!
Now, I want to re-map these two shortcut keys, like: Alt + J / K (Vimer habit).
My understanding
Here some signal must be triggered after press Ctrl + Alt + Up | Down.
The question is, what signal is triggered?
Here are some questions:
0x115 is the signal of windows scrolling. what about Linux?
Can the scrolling be executed by command in gnome-terminal? (Some command inputted and gnome-terminal scrolling up/down)
I've download the source code of Gnome-Terminal, and tried to find the answer. But my C is terrible...
By the way, my Linux is Ubuntu 13.10, and gnome-terminal is 3.6:
$ gnome-terminal --version
GNOME Terminal 3.6.1
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 13.10
Release: 13.10
Codename: saucy
|
[OPTIONAL]
I'm a vimer too and I feel uncomfortable with the default Ctrl position so I remapped the Window's Meta to be an additional Ctrl key. NOTE: you'll need xmodmap.
remove Control = Control_L Control_R
remove mod4 = Super_L Super_R
add Control = Control_L Super_L
[STEPS]
To remap Ctrl + J and Ctrl + K in Konsole follow these steps:
Go to Settings -> Configure Current Profile -> Input
Edit the Linux Console key binding
Add a new key binding to scroll down a line at a time: J + Ctrl -> ScrollLineDown
Add a new key binding to scroll up a line at a time: K + Ctrl -> ScrollLineUp
Some screenshots
NOTE: Now you'll be able to scroll up and scroll down a line at a time using the configured shortcuts.
EDIT #1
Alt does work!! Just change Ctrl with Alt in the bindings.
| How can I remap the shortcut keys for scroll down/up in gnome terminal |
1,424,268,416,000 |
When I use clear command to clear the screen. It is not cleared (see screenshot when I scroll up a bit after command done)
So I double the command to get right behavior:
$ clear && clear && DD=0 ...
Why do I need to double the command to get cleared screen?
UPD
Actually if I just clear I got cleared screen. But I can scroll up and see last 25lines (if screen is 80x25). When I run clear;clear I got those lines cleared.
|
The important thing to note here is the tag on the question. This behaviour is specific to GNOME Terminal and any other terminal emulators that are built upon libvte. You won't see this in Xterm, or in Unicode RXVT, or in the terminal emulator built into the Linux kernel, or on the FreeBSD console.
What happens in general is this.
The clear command looks at terminfo/termcap and issues appropriate control sequences.
If the terminfo/termcap entry has an E3 capability it, it first writes out that. This issues control sequences to clear the scrollback buffer. This and the history behind it are documented in detail in the Dickey ncurses manual page for the clear command.
It then uses the clear capability to clear the visible screen.
The control sequences in the terminfo/termcap entry are determined by the terminal type; but, with the exceptions of the (nowadays rare) terminals that use FormFeed to clear the screen (which DEC VTs and their imitators do not), they are either just plain old ECMA-48 control sequences or extensions thereto. For examples:
The putty entry defines E3=\E[3J which is the Xterm extension control sequence.
The NetBSD console's pcvtxx entry is one of many that define clear=\E[H\E[J or something similar. This is two ordinary ECMA-48 control sequences.
The terminal emulator acts upon the control sequences. As defined by ECMA-48 and the Xterm extension to it:
CSI H (CUP) homes the cursor.
CSI 0 J (ED 0) or just CSI J erases from the current cursor position to the end of the screen.
CSI 2 J (ED 2) erases the whole screen.
CSI 3 J (ED 3) erases the scrollback buffer.
When it comes to GNOME Terminal in particular:
The terminal type is properly gnome, but some people leave it erroneously set to xterm.
The gnome terminfo entry does not define an E3 capability, and on many systems — still! — neither does the xterm entry as this has not percolated down from Dickey terminfo. So clear just writes out the contents of the clear capability.
The contents of the clear capability for those terminfo entries are the control sequences to home the cursor followed by erase the whole screen.
But GNOME Terminal does not implement erase the whole screen correctly. More specifically, the library that it is based upon, libvte, does not do that in the code of its VteTerminalPrivate::seq_clear_screen() function. Rather, libvte scrolls the screen down an entire screen's worth of blank lines, and moves the cursor position to the first of those blank lines.
This is why you see what you see. libvte is not erasing the whole screen when told to. Rather it is doing something that has a superficial resemblance to that, until one does exactly what the questioner has done here: scroll the terminal window back to look at the scroll back buffer. Then the difference is blatant.
On other terminal emulators such as Xterm and Unicode RXVT, the ED 2 control sequence really does erase the screen, erasing every position on the screen in place, from the top down, and not altering the scrollback buffer. But on libvte terminal emulators, it just pushes the current screen up into the scrollback buffer and adds a screen's worth of blank lines. The prior screen contents are not erased but shifted into the scrollback buffer.
And if you run the clear command twice, it adds two screen's worth of blank lines. If your scroll back buffer is large enough, you can still find the original screen contents, simply further up in the scrollback buffer.
Further reading
Control Functions for Coded Character Sets. ECMA-48. 1976.
Georgi Kirilov (2007-12-30). Ctrl-L adds blank space to the scrollback buffer. GNOME bug #506438.
To what extent are the xterm, xterm-color, and linux terminal emulators based on VT100?
Clearing the "old" scrollback buffer
Bash clear command weird behavior deletes scrollback buffer.
https://superuser.com/questions/1094599/
Thomas Dickey (2018). "Known Bugs in XTerm and Look–alikes: GNOME Terminal". XTerm Frequently Asked Questions. invisible-island.net.
Thomas Dickey (2018). "Known Bugs in XTerm and Look–alikes: Notes on VTE". XTerm Frequently Asked Questions. invisible-island.net.
| Why `clear` do not clear whole screen? |
1,424,268,416,000 |
I know that I can set a TMOUT variable to automatically end a bash session after a specified period of inactivity. However, what I want is to apply that only to my 6 built-in virtual consoles, which are accessed by ctrl+alt+{F1...F6}.
I almost always use a Terminal app when I want to open a terminal. When I leave my computer, I lock the screen, which prevents anyone from accessing those terminals. So I would like to not have a timeout on those.
However, on rare occasions I will use one of my virtual consoles to work on my computer. Usually it is due to my main Gnome session being frozen or otherwise unusable. I kill the offending app, then switch back to my main session.
On top of that, a few times I have forgotten to exit out of my virtual console when I have restored my Gnome session. Thus, my computer is completely unprotected if I walk away, since locking the screen on Gnome only locks the GUI; a user could switch to a virtual console and kill my gnome lockscreen or otherwise mess with my computer.
Can I set a timeout value for the built-in virtual consoles only, while allowing a Terminal app session to remain inactive indefinitely?
|
You could check if you are running in a graphical terminal and only set TMOUT if you are not. An easy way to do this is the tty command:
tty - print the file name of the terminal connected to standard input
When run from a GUI terminal emulator:
$ tty
/dev/pts/5
When run from a virtual console:
$ tty
/dev/tty2
So, adding these lines to your ~/.profile should kill your bash session after ten minutes:
tty | grep tty >/dev/null && TMOUT=600
| Can I set a bash timeout only for virtual consoles (ctrl+alt+{f1-f6}) |
1,424,268,416,000 |
In gnome-terminal if I choose File->"Open Terminal" or "Open Tab" I get a new window in the same directory as the current window. I would like to create a gnome-terminal profile that starts in a particular directory. I have experimented with the "run a custom command" option in the "Title and Command" section of the profile's properties, but so far all my attempts result in the terminal immediately exiting. Is there a way to do this?
|
I did some testing, and the following worked for me as a custom command:
sh -c "cd /path/to/dir; exec bash"
| Set starting directory for gnome-terminal profile |
1,424,268,416,000 |
Is it possible to select a different language for a specific application? On some systems I run Fedora15/Gnome in German, but want to use the Terminal in English including for the simple prompt questions like: Y/N instead of j/N = Ja/Nein etc.
|
You can launch any program with a different language by setting the LC_MESSAGES environment variable (or LANG to include other regional settings besides display language such as sort order, number and date formatting, etc).
$ LANG=en_US gnome-terminal
Keep in mind that anything you launch FROM that terminal will inherit the language. If you specifically want a program to run with your you could start it up with:
$ LANG=de_DE program_to_run_in_german
| How to get gnome-terminal in English? |
1,424,268,416,000 |
xterm has a modifyOtherKeys option that tells it to construct an escape sequence for various key combinations that are normally not available. That option can be enabled in .Xdefaults, or with a control sequence from within the terminal (echo -n -e '\033[>4;1m' does the trick for me).
This option allows for more key combinations to be bound to commands in text mode programs, e.g. in Emacs. For example C-' (Ctrl + ') will normally generate a single ' character, which is useless, but will turn into a complex - but usable - escape sequence when the modifyOtherKeys option is enabled.
Does gnome-terminal have a similar ability? I could not find anything in the menus on my system (Mageia Linux 4, gnome-terminal-3.10.2), but perhaps there is some control sequence with the same effect?
|
No, but there's an open bug asking for this: https://bugzilla.gnome.org/show_bug.cgi?id=730157
| Does gnome-terminal have an equivalent for xterm's modifyOtherKeys? |
1,424,268,416,000 |
I probably misconfigured something, but I don't know what. (see UPDATE 1 and 2 below) In gnome-terminal, when I hit Alt (without any other key), it immediately sends ^[< to the terminal (I tested by hitting Ctrl+V before Alt). Since I use Alt+Tab a lot, this is very unfortunate, because the control sequence will, for example, move to the beginning of history or do strange stuff in vim.
The Alt+Tab, however,
does still work and cycles through the windows as wanted.
What might be the reason and how can I restore the default behavior in gnome-terminal?
OS: Linux Mint 19.3 Tricia x86_64
Kernel: 5.3.0-24-generic
Shell: bash 4.4.20
GNOME Terminal 3.28.1 using VTE 0.52.2 +GNUTLS -PCRE2
UPDATE 1
I found out that this happens only on the laptops keyboard itself, but not using an external attached usb keyboard. While the external keyboard is attached both Alt-keys behave differently.
The laptop is a Lenovo P53.
I still don't know how to fix it for the laptops keyboard but at least I am closer to the origins of the issue.
UPDATE 2
Running xev I shortly hit (pressed and immediately released) Alt a single time; first on the laptops keyboard and then on the external USB keyboard:
# LAPTOP KEYBOARD ALT-KEY
MappingNotify event, serial 39, synthetic NO, window 0x0,
request MappingKeyboard, first_keycode 8, count 248
KeyPress event, serial 39, synthetic NO, window 0x6a00001,
root 0x2b6, subw 0x0, time 9398319, (162,-8), root:(903,449),
state 0x10, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyPress event, serial 39, synthetic NO, window 0x6a00001,
root 0x2b6, subw 0x0, time 9398319, (162,-8), root:(903,449),
state 0x18, keycode 94 (keysym 0x3c, less), same_screen YES,
XLookupString gives 1 bytes: (3c) "<"
XmbLookupString gives 1 bytes: (3c) "<"
XFilterEvent returns: False
KeyRelease event, serial 40, synthetic NO, window 0x6a00001,
root 0x2b6, subw 0x0, time 9398360, (162,-8), root:(903,449),
state 0x18, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
KeyRelease event, serial 40, synthetic NO, window 0x6a00001,
root 0x2b6, subw 0x0, time 9398360, (162,-8), root:(903,449),
state 0x10, keycode 94 (keysym 0x3c, less), same_screen YES,
XLookupString gives 1 bytes: (3c) "<"
XFilterEvent returns: False
# EXTERNAL USB KEYBOARD ALT-KEY
MappingNotify event, serial 40, synthetic NO, window 0x0,
request MappingKeyboard, first_keycode 8, count 248
KeyPress event, serial 40, synthetic NO, window 0x6a00001,
root 0x2b6, subw 0x0, time 9402608, (162,-8), root:(903,449),
state 0x10, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyRelease event, serial 41, synthetic NO, window 0x6a00001,
root 0x2b6, subw 0x0, time 9402704, (162,-8), root:(903,449),
state 0x18, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
UPDATE 3
It's probably a hardware defect (see comments and answer). I will get a new keyboard from the manufacturer.
|
It is a hardware defect and was confirmed by the manufacturer. Replacing the keyboard solved the issue. Thanks for helping to investigate!
| gnome-terminal: strange control characters on Alt key |
1,424,268,416,000 |
I am trying to use the solarized color scheme in VIM using gnome terminal (Ubuntu). When I run vim without tmux, it looks great, see below:
If I add the following commands to my .bashrc
# tmux configuration
tmux attach &> /dev/null
if [[ ! $TERM =~ screen ]]; then
exec tmux
fi
and start the terminal with tmux, the colors do not look right, see below:
Here is the contents of the .tmux.conf file
source ~/.local/lib/python2.7/site-packages/powerline/bindings /tmux/powerline.conf
set-option -g default-terminal "screen-256color"
set-option -g history-limit 10000
I am using https://github.com/altercation/vim-colors-solarized for the vim color scheme, and the terminal is: https://github.com/Anthony25/gnome-terminal-colors-solarized.
EDIT:
With tmux:
~$ echo $TERM
screen
Without tmux:
~$ echo $TERM
xterm
|
The value of $TERM must be screen-256color, so that Vim correctly detects the availability of 256 colors. (tmux reuses the terminal definitions of screen, as this tool implements similar multiplexing.)
You either need to set the correct value for TERM inside tmux adding the line
set-option -g default-terminal "screen-256color"
to ~/.tmux.conf, or force 256 colors in your ~/.vimrc via set t_Co=256 (which would be a workaround, and best guarded by if $TERM == 'screen' if you also use non-high color terminals).
| VIM solarized color scheme looks wrong when using tmux |
1,424,268,416,000 |
I'm new to unix. I typed this command in ubuntu terminal:
pwd | echo
I expected to see the output of pwd in terminal(/home/fatemeh/Documents/Code/test)
but the output was just a single empty line.
why this happens?
|
echo does not do anything with standard input; it only parses its parameters. So you are effectively running echo which, by itself, outputs a single empty line, and the standard input is discarded.
If you want to see the behavior you are trying to implement, use a tool designed to parse standard input, such as cat:
$ pwd | cat
/home/username
If you really want to use echo to display the current working directory (or the output of another command), you can use Command Substitution to do this for you:
$ echo "Your shell is currently working in '$(pwd)'."
Your shell is currently working in '/home/username'.
| why piping pwd and echo does not work? [duplicate] |
1,424,268,416,000 |
I've become stumped trying to get my terminal to show unicode characters. I've set the LOCALE/LANG environment variables to en_US.utf8:
locale
LANG=en_US.utf8
LC_CTYPE=en_US.utf8
LC_NUMERIC="en_US.utf8"
LC_TIME="en_US.utf8"
LC_COLLATE="en_US.utf8"
LC_MONETARY="en_US.utf8"
LC_MESSAGES="en_US.utf8"
LC_PAPER="en_US.utf8"
LC_NAME="en_US.utf8"
LC_ADDRESS="en_US.utf8"
LC_TELEPHONE="en_US.utf8"
LC_MEASUREMENT="en_US.utf8"
LC_IDENTIFICATION="en_US.utf8"
LC_ALL=
echo -e '\xe2\x82\xac'
���
Everything I've found says to set the LANG and LOCALE vars, which I have done, but the problem persists. locale -a shows that the right locale is available:
Laptop:~:0:2030$ locale -a | grep utf
de_AT.utf8
de_BE.utf8
de_CH.utf8
de_DE.utf8
de_LI.utf8
de_LU.utf8
en_AG.utf8
en_AU.utf8
en_BW.utf8
en_CA.utf8
en_DK.utf8
en_GB.utf8
en_HK.utf8
en_IE.utf8
en_IN.utf8
en_NG.utf8
en_NZ.utf8
en_PH.utf8
en_SG.utf8
en_US.utf8
en_ZA.utf8
en_ZM.utf8
en_ZW.utf8
es_AR.utf8
es_BO.utf8
es_CL.utf8
es_CO.utf8
es_CR.utf8
es_DO.utf8
es_EC.utf8
es_ES.utf8
es_GT.utf8
es_HN.utf8
es_MX.utf8
es_NI.utf8
es_PA.utf8
es_PE.utf8
es_PR.utf8
es_PY.utf8
es_SV.utf8
es_US.utf8
es_UY.utf8
es_VE.utf8
fr_BE.utf8
fr_CA.utf8
fr_CH.utf8
fr_FR.utf8
fr_LU.utf8
ga_IE.utf8
nl_AW.utf8
nl_BE.utf8
nl_NL.utf8
pl_PL.utf8
I have also verified that this isn't limited to the CLI. Doing, for instance, u+2713 in VIM (which is something I use often), also gives a <?> character output.
In the gnome-terminal options, I have it set to use the default system font, but have tried all the fonts in the list with no assistance, and googling for "terminal unicode font" just continues the cycle of telling me to set my LOCALE/LANG.
--
Edit: As suggested below, I changed the locale/lang to en_US.UTF-8, which did not solve the problem:
Laptop:~:0:2013$ locale
LANG=en_US.UTF-8
LANGUAGE=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=
Laptop:~:0:2014$ echo -e '\xe2\x82\xac'
���
|
The solution was much simpler. I had to go to the GUI settings for gnome-terminal, visit Terminal -> Set Character Encoding -> UTF-8.
-- To keep this as the default in Ubuntu (and sorry to find out that it's a distro-specific solution in this SE forum):
gconftool --set --type=string /apps/gnome-terminal/profiles/Default/encoding en_US.UTF-8
| gnome-terminal unicode chars not showing - Locale is set to en_US.utf8 |
1,424,268,416,000 |
I used to keep my working directory when opening a new tab in gnome-terminal and want to restore this functionality. My research pointed me to sourcing /etc/profile.d/vte.sh in my ~/.zshrc (I use Z shell), however that does not change the problem, my new tabs still get opened in ~.
How can I restore this functionality? It can be a dirty hack if necessary.
My versions
~$ uname -a
Linux konradslaptop2 3.17.2-1-ARCH #1 SMP PREEMPT Thu Oct 30 20:49:39 CET 2014 x86_64 GNU/Linux
~$ gnome-terminal --version
GNOME-Terminal 3.14.2
~$ zsh --version
zsh 5.0.7 (x86_64-unknown-linux-gnu)
My ~/.zshrc (minimal example)
. /etc/profile.d/vte.sh
# auto generated by .zsh installation
if (( ${+terminfo[smkx]} )) && (( ${+terminfo[rmkx]} )); then
function zle-line-init () {
printf '%s' "${terminfo[smkx]}"
}
function zle-line-finish () {
printf '%s' "${terminfo[rmkx]}"
}
zle -N zle-line-init
zle -N zle-line-finish
fi
|
A very simple workaround for you would be including a function in your ~/.zshrc that remembers the working directory and changes into it when opening zsh:
cd $(<>/dev/shm/$USER-pwd)
__cd(){
\cd "$@"
pwd >/dev/shm/$USER-pwd
}
alias cd=__cd
We use /dev/shm instead of /tmp to avoid disk writes, although /tmp could already be a tmpfs on your system. \cd is used to avoid a fork bomb.
If you would like this feature for gnome-terminal only, you could include an if statement to check your current terminal or active window. Also, if you are concerned that other users might find out what was your last directory, you could modify the permissions for $USER-pwd with chmod:
if xprop -id $(xprop -root 32x ' $0' _NET_ACTIVE_WINDOW | awk '{print $NF}') WM_CLASS | grep -q gnome-terminal; then
cd $(<>/dev/shm/$USER-pwd)
chmod 600 /dev/shm/$USER-pwd
__cd(){
\cd "$@"
pwd >/dev/shm/$USER-pwd
}
alias cd=__cd
fi
| vte.sh does not keep my gnome-terminal directory in new tab |
1,424,268,416,000 |
When copying text from gnome-terminal with zsh trailing whitespace is also copied. For example copying the following clearly adds a vertical scollbar on stackexchange site as trailing whitespace the width of the terminal is included:
$ echo $0
zsh
If I drop into bash this does not happen (no spaces, no scrollbar):
$ echo $0
bash
Is there an option with zsh to fix this?
|
I assume you have $RPS1 variable set (I have current directory there). If you just unset it with
unset RPS1
then trailing whitespace should disappear.
| Trailing spaces when copying from gnome-terminal using zsh |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.