LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 11-06-2023, 08:19 PM   #1
BenCollver
Rogue Class
 
Registered: Sep 2006
Location: OR, USA
Distribution: Slackware64-15.0
Posts: 376
Blog Entries: 2

Rep: Reputation: 172Reputation: 172
how to display and enter emoji in urxvt with xfce


Learned how to do emoji in urxvt today, and thought i'd share.

To display emoji in urxvt, configure DejaVu Sans as the second font.

Example:
Code:
urxvt -fn 'xft:Source Code Pro,xft:DejaVu Sans'
Example configuration in ~/.Xresources
Code:
URxvt.font:xft:Source Code Pro,xft:DejaVu Sans
To enter emoji, configure a keyboard shortcut.

* Applications
* Settings
* Keyboard
* Application Shortcuts
* + Add
* Command: /usr/bin/gucharmap
* Click OK
* Command: Ctrl .
* Click Close
* Press Ctrl . to open the character map
* Select DejaVu Sans
* View
* By Unicode Block
* Emoticons
* Close character map

To use the keyboard shortcut:

* Press Ctrl . to open the character map
* Double-click desired emoticon
* At "Text to copy:", drag pointer over emoticon to select it
* Press Alt-Tab to switch back to urxvt
* Click middle button to paste the emoji into urxvt

Alternatively, you can look up the Unicode codepoint and then enter that into urxvt. For example, to get the smiling face with sunglasses emoji (codepoint 1F60E):

* While holding down Ctrl-Shift, type: 1f60e
* Release Ctrl-Shift

Note that this only works in urxvt. In a GTK application, it would be Ctrl-Shift-U, release the U, then type 1f60e. 😎
 
Old 11-07-2023, 03:28 PM   #2
MightyBaba
LQ Newbie
 
Registered: Feb 2022
Distribution: Slackware
Posts: 28

Rep: Reputation: Disabled
Interesting, thanks. I have added DejaVu Sans as a secondary font.

But it doesn't work for all emojis: For example, Jack-O-Lantern displays a square when I type the unicode code 1f383. That being said, it is good enough for the most common emojis. Who needs Jack-O-Lantern anyway?

Last edited by MightyBaba; 11-07-2023 at 03:30 PM.
 
Old 11-07-2023, 03:51 PM   #3
MightyBaba
LQ Newbie
 
Registered: Feb 2022
Distribution: Slackware
Posts: 28

Rep: Reputation: Disabled
Strange that my emojis don't even work here. Now, I've got something else to solve �� ��
With Ctrl-Shift-U: �� ��

Last edited by MightyBaba; 11-07-2023 at 10:58 PM.
 
Old 11-07-2023, 03:54 PM   #4
marav
LQ Sage
 
Registered: Sep 2018
Location: Gironde
Distribution: Slackware
Posts: 5,443

Rep: Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194
Quote:
Originally Posted by mightybaba View Post
strange that my emojis don't even work here. Now, i've got something else to solve �� ��
🙈 🙉 🙊
 
Old 11-07-2023, 09:27 PM   #5
MightyBaba
LQ Newbie
 
Registered: Feb 2022
Distribution: Slackware
Posts: 28

Rep: Reputation: Disabled
When I enter unicode 1f60e for the sunglasses emoji in Firefox, it shows the correct emoji in the edit box. I submit it but then it is displayed as UTF-16 "D83DDE0E" (= the sunglasses emoji in UTF-16), which shows as two question marks. However, it seems to work fine in other software and web sites. Since it is limited to LQ, I won't spend any more time on my strange issue. Sorry for the derail.
 
Old 11-07-2023, 11:40 PM   #6
Gerard Lally
Senior Member
 
Registered: Sep 2009
Location: Leinster, IE
Distribution: Slackware, NetBSD
Posts: 2,200

Rep: Reputation: 1777Reputation: 1777Reputation: 1777Reputation: 1777Reputation: 1777Reputation: 1777Reputation: 1777Reputation: 1777Reputation: 1777Reputation: 1777Reputation: 1777
Excuse my ignorance : can urxvt display variable-width fonts like DejaVu Sans? Should it not be DejaVu Sans Mono?
 
Old 11-08-2023, 10:40 AM   #7
BenCollver
Rogue Class
 
Registered: Sep 2006
Location: OR, USA
Distribution: Slackware64-15.0
Posts: 376

Original Poster
Blog Entries: 2

Rep: Reputation: 172Reputation: 172
I don't understand why, but my example doesn't work in urxvt with DejaVu Sans Mono. Instead of the 😎 smiling face with sunglasses emoji, it displays an empty box outline.

Last edited by BenCollver; 11-08-2023 at 10:42 AM. Reason: replace emoji
 
1 members found this post helpful.
Old 12-14-2023, 10:55 AM   #8
BenCollver
Rogue Class
 
Registered: Sep 2006
Location: OR, USA
Distribution: Slackware64-15.0
Posts: 376

Original Poster
Blog Entries: 2

Rep: Reputation: 172Reputation: 172
It has also been brought to my attention that urxvt can't display certain emojis. One example is the camera emoji, codepoint 1F4F7 ��

urxvt does give me some cryptic error messages:

Code:
urxvt: + X Error of failed request: BadLength (poly request too large or internal Xlib length error)
urxvt: + Major opcode of failed request:  138
urxvt: + (which is an unknown extension)
urxvt: + Minor opcode of failed request:  20

Last edited by BenCollver; 12-14-2023 at 11:01 AM. Reason: adding more details
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
What Fonts Needed To Display Emoji-Images? SlackIT Slackware 6 08-27-2023 04:52 PM
urxvt how to enter unicode characters bong.mau Linux - Desktop 4 04-29-2020 12:35 AM
LXer: How to get Emoji to display on Fedora LXer Syndicated Linux News 0 03-20-2015 09:27 PM
LXer: Get ready for Middle Finger Emoji, aka Flipping The Bird Emoji LXer Syndicated Linux News 0 06-18-2014 05:40 AM
how to let urxvt kow C-enter haiyuan_victor Linux - Software 16 02-17-2012 10:35 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 11:17 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration