Change terminal font size programatically
is that possible to do that by running a command? Is there any hack that would allow this? I tried using python-uinput to simulate pushing Ctrl+Plus in order to make font bigger but it did not work.
I am trying to display images in the terminal without any need for a gui. this is possible using timg. However the image resolution is quite bad. When I make the font size of the terminal very small, the image is displayed at almost native resolution.
I want to write a script hat will automatically reset the terminal, resize its font to a very small size and finally call timg to display the image. This will allow ssh into a remote robot and displaying the latest image it acquired without having to first copy it back to my computer.
I am mostly working with gnome-terminal or terminator
gnome-terminal fonts
add a comment |
is that possible to do that by running a command? Is there any hack that would allow this? I tried using python-uinput to simulate pushing Ctrl+Plus in order to make font bigger but it did not work.
I am trying to display images in the terminal without any need for a gui. this is possible using timg. However the image resolution is quite bad. When I make the font size of the terminal very small, the image is displayed at almost native resolution.
I want to write a script hat will automatically reset the terminal, resize its font to a very small size and finally call timg to display the image. This will allow ssh into a remote robot and displaying the latest image it acquired without having to first copy it back to my computer.
I am mostly working with gnome-terminal or terminator
gnome-terminal fonts
1
This is handled by the terminal emulator itself. Which one are you using?gnome-terminal
? And could you explain why you would want this? If Ctrl+Plus works for you, why do you need a command for it? I ask because this might be an XY problem, so if you explain your rationale, we might be able to find a different approach.
– terdon♦
Jan 18 at 15:20
add a comment |
is that possible to do that by running a command? Is there any hack that would allow this? I tried using python-uinput to simulate pushing Ctrl+Plus in order to make font bigger but it did not work.
I am trying to display images in the terminal without any need for a gui. this is possible using timg. However the image resolution is quite bad. When I make the font size of the terminal very small, the image is displayed at almost native resolution.
I want to write a script hat will automatically reset the terminal, resize its font to a very small size and finally call timg to display the image. This will allow ssh into a remote robot and displaying the latest image it acquired without having to first copy it back to my computer.
I am mostly working with gnome-terminal or terminator
gnome-terminal fonts
is that possible to do that by running a command? Is there any hack that would allow this? I tried using python-uinput to simulate pushing Ctrl+Plus in order to make font bigger but it did not work.
I am trying to display images in the terminal without any need for a gui. this is possible using timg. However the image resolution is quite bad. When I make the font size of the terminal very small, the image is displayed at almost native resolution.
I want to write a script hat will automatically reset the terminal, resize its font to a very small size and finally call timg to display the image. This will allow ssh into a remote robot and displaying the latest image it acquired without having to first copy it back to my computer.
I am mostly working with gnome-terminal or terminator
gnome-terminal fonts
gnome-terminal fonts
edited Jan 18 at 15:32
Mehdi
asked Jan 18 at 15:05
MehdiMehdi
227313
227313
1
This is handled by the terminal emulator itself. Which one are you using?gnome-terminal
? And could you explain why you would want this? If Ctrl+Plus works for you, why do you need a command for it? I ask because this might be an XY problem, so if you explain your rationale, we might be able to find a different approach.
– terdon♦
Jan 18 at 15:20
add a comment |
1
This is handled by the terminal emulator itself. Which one are you using?gnome-terminal
? And could you explain why you would want this? If Ctrl+Plus works for you, why do you need a command for it? I ask because this might be an XY problem, so if you explain your rationale, we might be able to find a different approach.
– terdon♦
Jan 18 at 15:20
1
1
This is handled by the terminal emulator itself. Which one are you using?
gnome-terminal
? And could you explain why you would want this? If Ctrl+Plus works for you, why do you need a command for it? I ask because this might be an XY problem, so if you explain your rationale, we might be able to find a different approach.– terdon♦
Jan 18 at 15:20
This is handled by the terminal emulator itself. Which one are you using?
gnome-terminal
? And could you explain why you would want this? If Ctrl+Plus works for you, why do you need a command for it? I ask because this might be an XY problem, so if you explain your rationale, we might be able to find a different approach.– terdon♦
Jan 18 at 15:20
add a comment |
2 Answers
2
active
oldest
votes
It comes to mind that unlike e.g. changing colors it is not possible to affect the font size of text on an arbitrary console - but I don't know if you actually try to do that.
Please add more information. Which terminal do you want to control? gnome-terminal? Why do you want it programmatically? For a desktop application, this is normally possible in the terminal application's settings. For the system console, you can use sudo dpkg-reconfigure console-setup
.
1
I added some details
– Mehdi
Jan 18 at 15:27
add a comment |
to change the gnome-terminal font size via command line,
- first we need to know the current profile id of the gnome-terminal.
I am using the default one which is named as "Unnamed"
in my case the profile id is something that is starting with "b1dcc9"
- Custom font square must be ticked.
- run the below command to get the list of profiles
gsettings get org.gnome.Terminal.ProfilesList list
Example:
$ gsettings get org.gnome.Terminal.ProfilesList list
['b1dcc9dd-5262-4d8d-a863-c897e6d979b9', 'd2a064f8-146d-45b5-8da7-d7e2f34da77e', 'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa']
I already know that my current profile is something that is starting with "b1dcc9"
- get the font name and size with the below command
gsettings get org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:b1dcc9dd-5262-4d8d-a863-c897e6d979b9/ font
Example:
$ gsettings get org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:b1dcc9dd-5262-4d8d-a863-c897e6d979b9/ font
'Noto Mono Bold 12'
$
- Set the font name and size with the below command
gsettings set org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:b1dcc9dd-5262-4d8d-a863-c897e6d979b9/ font 'Ubuntu Mono Italic 50'
Example:
$ gsettings set org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:b1dcc9dd-5262-4d8d-a863-c897e6d979b9/ font 'Ubuntu Mono Italic 50'
$
Caution: do not put font size more, it will make the OS unoperatable.
by mistake i press 512 instead of 52 and press enter..struggled a lot to get back.
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1110903%2fchange-terminal-font-size-programatically%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
It comes to mind that unlike e.g. changing colors it is not possible to affect the font size of text on an arbitrary console - but I don't know if you actually try to do that.
Please add more information. Which terminal do you want to control? gnome-terminal? Why do you want it programmatically? For a desktop application, this is normally possible in the terminal application's settings. For the system console, you can use sudo dpkg-reconfigure console-setup
.
1
I added some details
– Mehdi
Jan 18 at 15:27
add a comment |
It comes to mind that unlike e.g. changing colors it is not possible to affect the font size of text on an arbitrary console - but I don't know if you actually try to do that.
Please add more information. Which terminal do you want to control? gnome-terminal? Why do you want it programmatically? For a desktop application, this is normally possible in the terminal application's settings. For the system console, you can use sudo dpkg-reconfigure console-setup
.
1
I added some details
– Mehdi
Jan 18 at 15:27
add a comment |
It comes to mind that unlike e.g. changing colors it is not possible to affect the font size of text on an arbitrary console - but I don't know if you actually try to do that.
Please add more information. Which terminal do you want to control? gnome-terminal? Why do you want it programmatically? For a desktop application, this is normally possible in the terminal application's settings. For the system console, you can use sudo dpkg-reconfigure console-setup
.
It comes to mind that unlike e.g. changing colors it is not possible to affect the font size of text on an arbitrary console - but I don't know if you actually try to do that.
Please add more information. Which terminal do you want to control? gnome-terminal? Why do you want it programmatically? For a desktop application, this is normally possible in the terminal application's settings. For the system console, you can use sudo dpkg-reconfigure console-setup
.
answered Jan 18 at 15:22
Jonas EberleJonas Eberle
1
1
1
I added some details
– Mehdi
Jan 18 at 15:27
add a comment |
1
I added some details
– Mehdi
Jan 18 at 15:27
1
1
I added some details
– Mehdi
Jan 18 at 15:27
I added some details
– Mehdi
Jan 18 at 15:27
add a comment |
to change the gnome-terminal font size via command line,
- first we need to know the current profile id of the gnome-terminal.
I am using the default one which is named as "Unnamed"
in my case the profile id is something that is starting with "b1dcc9"
- Custom font square must be ticked.
- run the below command to get the list of profiles
gsettings get org.gnome.Terminal.ProfilesList list
Example:
$ gsettings get org.gnome.Terminal.ProfilesList list
['b1dcc9dd-5262-4d8d-a863-c897e6d979b9', 'd2a064f8-146d-45b5-8da7-d7e2f34da77e', 'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa']
I already know that my current profile is something that is starting with "b1dcc9"
- get the font name and size with the below command
gsettings get org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:b1dcc9dd-5262-4d8d-a863-c897e6d979b9/ font
Example:
$ gsettings get org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:b1dcc9dd-5262-4d8d-a863-c897e6d979b9/ font
'Noto Mono Bold 12'
$
- Set the font name and size with the below command
gsettings set org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:b1dcc9dd-5262-4d8d-a863-c897e6d979b9/ font 'Ubuntu Mono Italic 50'
Example:
$ gsettings set org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:b1dcc9dd-5262-4d8d-a863-c897e6d979b9/ font 'Ubuntu Mono Italic 50'
$
Caution: do not put font size more, it will make the OS unoperatable.
by mistake i press 512 instead of 52 and press enter..struggled a lot to get back.
add a comment |
to change the gnome-terminal font size via command line,
- first we need to know the current profile id of the gnome-terminal.
I am using the default one which is named as "Unnamed"
in my case the profile id is something that is starting with "b1dcc9"
- Custom font square must be ticked.
- run the below command to get the list of profiles
gsettings get org.gnome.Terminal.ProfilesList list
Example:
$ gsettings get org.gnome.Terminal.ProfilesList list
['b1dcc9dd-5262-4d8d-a863-c897e6d979b9', 'd2a064f8-146d-45b5-8da7-d7e2f34da77e', 'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa']
I already know that my current profile is something that is starting with "b1dcc9"
- get the font name and size with the below command
gsettings get org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:b1dcc9dd-5262-4d8d-a863-c897e6d979b9/ font
Example:
$ gsettings get org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:b1dcc9dd-5262-4d8d-a863-c897e6d979b9/ font
'Noto Mono Bold 12'
$
- Set the font name and size with the below command
gsettings set org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:b1dcc9dd-5262-4d8d-a863-c897e6d979b9/ font 'Ubuntu Mono Italic 50'
Example:
$ gsettings set org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:b1dcc9dd-5262-4d8d-a863-c897e6d979b9/ font 'Ubuntu Mono Italic 50'
$
Caution: do not put font size more, it will make the OS unoperatable.
by mistake i press 512 instead of 52 and press enter..struggled a lot to get back.
add a comment |
to change the gnome-terminal font size via command line,
- first we need to know the current profile id of the gnome-terminal.
I am using the default one which is named as "Unnamed"
in my case the profile id is something that is starting with "b1dcc9"
- Custom font square must be ticked.
- run the below command to get the list of profiles
gsettings get org.gnome.Terminal.ProfilesList list
Example:
$ gsettings get org.gnome.Terminal.ProfilesList list
['b1dcc9dd-5262-4d8d-a863-c897e6d979b9', 'd2a064f8-146d-45b5-8da7-d7e2f34da77e', 'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa']
I already know that my current profile is something that is starting with "b1dcc9"
- get the font name and size with the below command
gsettings get org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:b1dcc9dd-5262-4d8d-a863-c897e6d979b9/ font
Example:
$ gsettings get org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:b1dcc9dd-5262-4d8d-a863-c897e6d979b9/ font
'Noto Mono Bold 12'
$
- Set the font name and size with the below command
gsettings set org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:b1dcc9dd-5262-4d8d-a863-c897e6d979b9/ font 'Ubuntu Mono Italic 50'
Example:
$ gsettings set org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:b1dcc9dd-5262-4d8d-a863-c897e6d979b9/ font 'Ubuntu Mono Italic 50'
$
Caution: do not put font size more, it will make the OS unoperatable.
by mistake i press 512 instead of 52 and press enter..struggled a lot to get back.
to change the gnome-terminal font size via command line,
- first we need to know the current profile id of the gnome-terminal.
I am using the default one which is named as "Unnamed"
in my case the profile id is something that is starting with "b1dcc9"
- Custom font square must be ticked.
- run the below command to get the list of profiles
gsettings get org.gnome.Terminal.ProfilesList list
Example:
$ gsettings get org.gnome.Terminal.ProfilesList list
['b1dcc9dd-5262-4d8d-a863-c897e6d979b9', 'd2a064f8-146d-45b5-8da7-d7e2f34da77e', 'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa']
I already know that my current profile is something that is starting with "b1dcc9"
- get the font name and size with the below command
gsettings get org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:b1dcc9dd-5262-4d8d-a863-c897e6d979b9/ font
Example:
$ gsettings get org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:b1dcc9dd-5262-4d8d-a863-c897e6d979b9/ font
'Noto Mono Bold 12'
$
- Set the font name and size with the below command
gsettings set org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:b1dcc9dd-5262-4d8d-a863-c897e6d979b9/ font 'Ubuntu Mono Italic 50'
Example:
$ gsettings set org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:b1dcc9dd-5262-4d8d-a863-c897e6d979b9/ font 'Ubuntu Mono Italic 50'
$
Caution: do not put font size more, it will make the OS unoperatable.
by mistake i press 512 instead of 52 and press enter..struggled a lot to get back.
edited Jan 19 at 15:47
answered Jan 19 at 15:33
PRATAPPRATAP
2,6102626
2,6102626
add a comment |
add a comment |
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1110903%2fchange-terminal-font-size-programatically%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
This is handled by the terminal emulator itself. Which one are you using?
gnome-terminal
? And could you explain why you would want this? If Ctrl+Plus works for you, why do you need a command for it? I ask because this might be an XY problem, so if you explain your rationale, we might be able to find a different approach.– terdon♦
Jan 18 at 15:20